FlexSPI Init RT1176

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

FlexSPI Init RT1176

跳至解决方案
4,124 次查看
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 解答
4,039 次查看
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 回复数
4,099 次查看
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 项奖励
回复
4,040 次查看
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 项奖励
回复
4,105 次查看
Masmiseim
Senior Contributor I

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

0 项奖励
回复