cancel
Showing results for 
Search instead for 
Did you mean: 

FMC Nor Flash XIP with STM32H7

Hi

I have a custom STM32H743 board with FMC nor flash M29W128GH70ZS6, and I want to run code on this FMC nor flash.

I noticed there is anexample project in STM32Cube_FW_H7_V1.11.0\Projects\STM32H743I-EVAL\Applications\ExtMem_CodeExecution\ExtMem_Application\LedToggling, but I can't find any nor flash initialize function when I choose XIP_NOR_InternalSRAM_Debug, I think it should be called in SystemInit function before running main function. Does FMC nor flash initialize in other place?

3 REPLIES 3

Is there any body help answer this question?

Typically I'd initialize external memory in SystemInit() as it allows the startup code to use it.

HAL/Cube complicate things by delaying a lot of the clocking and peripheral stuff in main() via HAL_Init()

In SystemInit() you'd need to have, or call, code that will initialize all the pins, clock and FMC peripheral. Assuming the memory will map at 0x60000000, but check the other details.

Would suggest first getting the memory visible and tested, there might be some NOR/FMC examples for the H7 EVAL boards. Once you have the mechanics working migrate the functionality of that code into SystemInit(), or a small boot loader which brings up the clocks and the necessary peripherals, and have that call your application code that can then just use the system without reinitializing everything again.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Hi Tesla:

Thank you for you answer.

I was just confused by ST example, because it doesn't have any nor flash initialize function. I think they missed the function.

I am going to try to add initialization function to test whether it will work or not.