FlexSPI Init RT1176

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

FlexSPI Init RT1176

Jump to solution
3,574 Views
Bkaya
Contributor III

Hello,

In my application, i am using NOR Flash, which is AT25SF321B. I want to try to execute simple functions in "flexspi_nor_polling_transfer_cm7". Set same configs into my project to execute but while initializing FlexSpi, my app crushed. 

I shared my config and driver folders. Can you help me to find what is wrong?

0 Kudos
1 Solution
3,489 Views
Masmiseim
Senior Contributor I

Hello @Bkaya 

 

While the flash is being written or deleted, it must not be accessed in any other way. In particular, this means no code execution. Executing the FlexSPI code from the RAM is a good idea, but don't forget the constants from the '.rodata' section, which is also located in the flash. However, no other code may be executed, especially interrupts can cause problems.

 

Regards

View solution in original post

0 Kudos
3 Replies
3,549 Views
Bkaya
Contributor III

Hi @Masmiseim ,

Yes, i execute the code from the external flash(XiP). I have external 4MB flash and 32MB ram .

Bkaya_0-1707985962018.png

I write linker script because but not same in example because datas is bigger than SRAM_OC1 in my app. After that ı debug the code but crashed after flex_spi_nor_flash_init().

Bkaya_1-1707986008003.png

So my questions are;

1) I set .bss section to my external ram as you can see above but example set them into SRAM_DTC_cm7 section. is this can be reason of crash?

Bkaya_2-1707986306562.png

2) I linked flexspi_nor_flash_ops.c file to SRAM_OC1 so why does not my code work?

3) Can i debug step by step this example? Or should i run the code and follow steps from console?

Best Regards. 

 

 

0 Kudos
3,490 Views
Masmiseim
Senior Contributor I

Hello @Bkaya 

 

While the flash is being written or deleted, it must not be accessed in any other way. In particular, this means no code execution. Executing the FlexSPI code from the RAM is a good idea, but don't forget the constants from the '.rodata' section, which is also located in the flash. However, no other code may be executed, especially interrupts can cause problems.

 

Regards

0 Kudos
3,555 Views
Masmiseim
Senior Contributor I

Hello @Bkaya,
do you execute the code from the flash (XiP)?

0 Kudos