cancel
Showing results for 
Search instead for 
Did you mean: 

Support with fmc nand flash

HDesa.1
Senior

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

-Regards
Hrishikesh
15 REPLIES 15
HDesa.1
Senior

Hello,

@SofLit @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.

 

-Regards
Hrishikesh

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 on "Accept as Solution" on the reply which solved your issue or answered your question.

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?

-Regards
Hrishikesh

Hello @HDesa.1 ,

Do you mean toggling manually the GPIOs that correspond to these lines (as GPO) after the first read operation to ensure they are in the correct state ?

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

@SHs Yes. I was planning on doing this. I am not sure whether this will help.

-Regards
Hrishikesh
SHs
ST Employee

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.