cancel
Showing results for 
Search instead for 
Did you mean: 

Problem reading NAND Flash ID with STM32H725

NorbertB
Associate

Hello all,
we have built a board with an STM32H725. The FMC-Interface is used for a PSRAM connection to an FPGA and a connection to a NAND flash with 8 Bit databus.

The initialization routines are created by STM32CubeMX. The PSRAM interface to the FPGA is working well. At the moment, I would like to read the ID of the flash with the routine "HAL_NAND_Read_ID()", but there is a problem with the access to the flash.

As most signals to the flash are also connected to the FPGA, I use the internal logic analyzer of the FPGA to verify the signals. Instead of just writing the command 0x90 using CLE, the interface generates four extra cycles with the value 0x00. Same happens to the write access for the address with ALE being high.

NorbertB_1-1699533504148.png

I have also extracted the write access to the command register from the ID read routine, but also in this case, there are five write accesses instead of one.

Does anybody know what can cause this misbehavior?

Thanks for your help.

2 REPLIES 2
Imen.D
ST Employee

Hello @NorbertB,

Maybe this behavior is related to the limitation described in the STM32H72xx device errata. (Please see 2.6 FMC).

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

Hello @Imen.D,
thanks for your reply. I went through the errata document for the FMC-interface

2.6.1 Dummy read cycles inserted when reading synchronous memories:
The extra cycles occur during write access (one command byte as it should be, plus four additional write accesses). I have reduced the write access to just one instruction by stepping throug the Disassembly-window and still see these extra cycles. The instruction is an STRB-command "STRB r1,[r0,#00]".

2.6.2 Wrong data read from a busy NAND memory:
The values for "ComSpaceTiming" and "AttSpaceTiming" are all set to the default value 255 in the initializaiton routine. These values are also listed in the FMC-window in debug-mode.

2.6.3 Unsupported read access with unaligned address:
This error occurs only with a read access, but I see the error with a write access.

Please let me know, if you have other ideas that can fix this misbehaviour.

Norbert