cancel
Showing results for 
Search instead for 
Did you mean: 

Programming FSMC NAND Flash using STM32H7

ypiotrp
Senior

Hi!

We have developed a product based on the STM32H7 microcontroller. In it, we use NAND Flash memory connected via FMC. We are approaching the point of mass production and are looking at how to program this memory in production.

So far, we have arrived at a USB-based solution. The NAND memory is connected to a PC via USB as a storage device and is programmed that way. However, the whole process takes a very long time and we are looking for a better solution. We have about 900 MB of data to transfer.

My first thought was External Loader, but it doesn't seem to support NAND memory connected via FMC. I wonder if SWD or JTAG could be used for this purpose. I would receive the data from the SWD/JTAG packages in the bootloader and program the NAND with them. Is this possible?

I am open to any other ideas and suggestions.
Regards

3 REPLIES 3
Pavel A.
Evangelist III

Maybe consider to pre-program the chips with Segger or similar professional programmers?

BW of the debugger interface is limited. We've tried to use semihosting for in-system programming instead of "external loader": a program that opens a file on the host using semihosting I/O, reads by chunks ~ 4KB (I hoped this gets close to the native debugger BW) and writes to the ext. flash. While it worked, performance was not impressing. The MCU is blocked while waiting for semihosting file read, so cannot parallelize writing to flash.

Thanks for your suggestion. Unfortunately our microcontroller (STM32H7B0) is not supported when it comes to NAND flash programming according to SEGGER's website: https://www.segger.com/supported-devices/jlink/st/stm32h7

@ypiotrp Please ask also on the Segger J-Link/J-Flash forum. This list can be outdated. They added support for many new STM32 models recently and keep adding more. Just try to install their latest version, the installer scans for other software which uses the J-LINK DLL and updates the DLL there. If it does not automatically find CubeIDE, replace the DLL manually.