8000 F7disc sdram enabled by forester3 · Pull Request #9 · dpgeorge/micropython · GitHub
[go: up one dir, main page]

Skip to content

F7disc sdram enabled #9

New issue

Have a question about this project? Sign up for a free GitHub 10000 account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 22 commits into from
Closed

Conversation

forester3
Copy link

I try to work SDRAM on STM32F746G-Discovery.
It seems work well.
It takes about 27 ms to copy 1Mbyte.
It takes about 115 ms to copy 2Mbyte.
System clock is downed to 192MHz to work SDRAM, and add MPU config.
I am not sure of 429 I-disco change in mpconfigboard.h.

@dpgeorge
Copy link
Owner
dpgeorge commented Aug 7, 2018

Thanks for this, it's great you got it working!

System clock is downed to 192MHz to work SDRAM

Was this a necessary change? Instead of this, would it be possible to modify the SDRAM timings so it can work with a 216MHz CPU frequency?

add MPU config.

Note that (as far as I know) it's only possible to configure the MPU once, it only has the ability to configure one region of memory. So it will be the last MPU setting that has any effect.

Finally, could you please re-post this as a PR to the main repository at https://github.com/micropython/micropython? Then it can be (eventually) merged there.

@forester3
Copy link
Author
forester3 commented Aug 7, 2018 via email

@forester3
Copy link
Author

@dpgeorge
Copy link
Owner
dpgeorge commented Aug 7, 2018

I heard that it is necessary to set systemclock to 200 MHz or less to operate SDRAM.

Yes you are right. In the data sheet (for STM32F767) it says that FMC_SDCLK must be 100MHz or less. And FMC_SDCLK=HCLK/2, so that limits the HCLK to 200MHz.

About MPU reagion, I think that we can set multiple MPU region.

Yes you're right. You can set up to 8 regions at a time, using the region number.

The MPU setting in the RAM area has an effect. When setting is not done, it takes 40 ms to copy 1 MByte.

But I see that you are configuring the MPU region 0 for the internal SRAM. Why is this needed? I would think that the internal SRAM should not need any MPU.

Since there was a clock down issue, I refrained to pull request to the micropython / micropython repository.

Ok, I see. Since this STM32F7DISC board is used as an example to show how to configure MicroPython, I think it is fair enough to reduce the clock speed and enable the SDRAM. We can add a note in the mpconfigboard.h file that the clock can be put to 216MHz if SDRAM is enabled.

@forester3
Copy link
Author

I am not good at English,and I do not understand this document all.
https://www.st.com/content/ccc/resource/technical/document/application_note/group0/bc/2d/f7/bd/fb/3f/48/47/DM00272912/files/DM00272912.pdf/jcr:content/translations/en.DM00272912.pdf

Since F7mpu has two kinds of RAM areas, I think that such MPU area setting is effective.

@dpgeorge
Copy link
Owner

This was merged upstream, see micropython#4032

@forester3 forester3 deleted the f7disc-sdram branch August 14, 2018 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0