Skip to main content
HDesa.1
Associate III
July 1, 2024
Question

Support with fmc nand flash

  • July 1, 2024
  • 4 replies
  • 4064 views

Hello,

I am running a NAND flash with STM32H7 microcontroller using FMC interface. I have referred to Using the high-density STM32F30xxD/E FMC peripheral to drive external memories datasheet for the programming purpose.

While communicating with the device, I observed that whenever I read the device for the first time I get the desired data. But when I try to access it once again using different command the data section doesn't update. I read the old read data. For example,

If I send the command to read the id for the first time then the ID is properly read. But then when I send the command to read the status register then the old data doesn't get updated.

I even tried to reset the device before each command but the device read register doesn't update. Can you help me with this? What could be the problem?

-Regards

4 replies

Tesla DeLorean
Guru
July 1, 2024

You'll have to read the documentation more thoroughly and use a logic analyzer on the signals to ensure your understanding matches the signaling presented in reality. 

Perhaps look at EVAL board doing the same or similar.

For storage consider eMMC. 

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
mƎALLEm
Technical Moderator
July 1, 2024

Hello,

Most probably it's due to the cache. What if you disable it? or just configure the MPU on that region: Strongly Ordered/Or Device?

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.
HDesa.1
HDesa.1Author
Associate III
July 1, 2024

Sorry, I didn't get you exactly. Which parameter are you referring to? Can you please specify with reference to CubeIDE?

-RegardsHrishikesh
mƎALLEm
Technical Moderator
July 1, 2024

In CubeMx. All is in Cortex_M7 menu:

SofLit_0-1719832002835.png

 

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.
HDesa.1
HDesa.1Author
Associate III
July 2, 2024

Hello,

@mƎALLEm @Tesla DeLorean Since I am using FMC interface for communication, is there any way to take control of the pins separately? Like can I use the FMC pins to separately set or reset them.

My suspect is that the control pins are not getting enabled the second time.

 

-RegardsHrishikesh
mƎALLEm
Technical Moderator
July 2, 2024

Since I am using FMC interface for communication, is there any way to take control of the pins separately? Like can I use the FMC pins to separately set or reset them.

 

 Not sure what do you mean by that! do you mean to replace some FMC AFs by some GPIOs that you will control them yourself? if yes I don't think so.

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.
HDesa.1
HDesa.1Author
Associate III
July 3, 2024

I assumption is that the control pins assigned to the FMC protocol is not resetting post data fetching. Probably this is causing the register to read or send the previous data. Is there a way to access the existing ones then?

-RegardsHrishikesh
ST Employee
July 5, 2024

Hello @HDesa.1 ,

Sorry for late reply.

The approach is generally safe if done correctly, the GPIO toggling must occur after the FMC read operation is complete and before the next command is issued to avoid timing issues, you could introduce small delays to ensure the hardware has enough time to register the changes, use functions like HAL_Delay() or precise timer functions and flags or status checks to confirm that the FMC operation is complete.

Also a fundamental requirement is to do a voltage level check , to ensure proper communication between the STM32H7 microcontroller and the NAND flash, meaning to verify that the GPIO voltage levels are within the specifications for both devices.

"Please close this topic by clicking on “Accept as solution"" button if it fully answered your question."