FlexSPI Init RT1176

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
3,681件の閲覧回数
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 件の賞賛
返信
1 解決策
3,596件の閲覧回数
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 件の賞賛
返信
3 返答(返信)
3,656件の閲覧回数
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 件の賞賛
返信
3,597件の閲覧回数
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 件の賞賛
返信
3,662件の閲覧回数
Masmiseim
Senior Contributor I

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

0 件の賞賛
返信