cancel
Showing results for 
Search instead for 
Did you mean: 

STM32Cubemx configure FMC Nor Flash

When I use stm32cubemx to configure FMC Nor Flash, I can only configure Timing with Address setup time in HCLK clock cycles/Data setup time in HCLK clock cycles and Bus turn around time in HCLK clock cycles, but I think it should have more settings to configure, like BusTurnAroundDuration and CLKDivision and so on0693W00000AO4aaQAD.bmp 

1 ACCEPTED SOLUTION

Accepted Solutions
Petr DAVID
ST Employee

Hello Zhou JIanQiang,

thank you for sending the .ioc file. It made it easier to find what could be wrong. I must clarify, that I my knowledge about FMC is bit limited. But I contacted my colleague and he pointed me in the right direction. Anyway the reason you cannot see setting for CLKDivision and AccessMode is due to current setting for the FMC.

If you would like to use CLK output it is currently blocked by DCMI peripheral. In case you disable it and reset the pins, then you can select clock - burst read option together with address valid option. Then you can found CLK clock divide ration in NOR/PSRAM timing settings.

To solve the problems with selecting access mode is easier. You just need to set extended mode to Enabled and then you are able to set the access mode. I just would like to point out that the extended mode are available only when using asynchronous transactions.

In case my answer help you please consider to mark my answer as Best answer as it helps with orientation about solved questions. If you still have some further questions, please do not hesitate and let me know.

View solution in original post

5 REPLIES 5
Petr DAVID
ST Employee

Hello Zhou JianQiang,

the settings in the STM32CubeMX try closely related to register setting of the MCU. The setting for the individual peripheral try to follow the structure of peripheral registers. For example the BusTurnAroundDuration would be depending on the HCLK frequency and so you define it in terms of HCLK clock cycles. All the configuration for the internal clocks could be found in the specified tab Clock Configuration. Let me know what other parameters you would like to edit maybe I can further help you.

Hi David:

Thank you for you reply.

in order to explain my confuse directly, I upload the project I used.

I don't know how to change below code in stm32cubemx project

Timing.CLKDivision = 16;
...
Timing.AccessMode = FMC_ACCESS_MODE_A;

where can I change CLKDivision and AccessMode?

Petr DAVID
ST Employee

Hello Zhou JIanQiang,

thank you for sending the .ioc file. It made it easier to find what could be wrong. I must clarify, that I my knowledge about FMC is bit limited. But I contacted my colleague and he pointed me in the right direction. Anyway the reason you cannot see setting for CLKDivision and AccessMode is due to current setting for the FMC.

If you would like to use CLK output it is currently blocked by DCMI peripheral. In case you disable it and reset the pins, then you can select clock - burst read option together with address valid option. Then you can found CLK clock divide ration in NOR/PSRAM timing settings.

To solve the problems with selecting access mode is easier. You just need to set extended mode to Enabled and then you are able to set the access mode. I just would like to point out that the extended mode are available only when using asynchronous transactions.

In case my answer help you please consider to mark my answer as Best answer as it helps with orientation about solved questions. If you still have some further questions, please do not hesitate and let me know.

Hi David:

Thank you for your answer.

I tried what you said, you are correct. This solved a lot of my doubts

Hello Zhaou I am glad I could help and thank you for selecting my answer as best. Good luck with your project.