2024-07-01 02:54 AM
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
2024-07-02 02:51 AM - edited 2024-07-02 02:51 AM
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.
2024-07-02 05:04 AM
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.
2024-07-02 10:38 PM
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?
2024-07-03 06:18 AM
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 ?
2024-07-03 09:21 PM
@SHs Yes. I was planning on doing this. I am not sure whether this will help.
2024-07-05 04:38 AM - edited 2024-07-05 05:17 AM
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.