Cannot read and write flash when programing to flash using MIMXRT1170_UFL_L2

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Cannot read and write flash when programing to flash using MIMXRT1170_UFL_L2

ソリューションへジャンプ
2,513件の閲覧回数
yalin
Contributor II

I have a custom board with hyperflash S26KS512 on rt1170, I can program to flash using the super flashing algorithm "MIMXRT1170_UFL_L2" normally. For reading and writing flash, I port the SDK "evkbimxrt1050_flexspi_hyper_flash_polling_transfer" to rt1170, and it can read and write flash normally when programing to ram, but failed when programing to flash, and I check that the program will get stuck when running to "FLEXSPI_SoftwareReset(base)".

Is this problem related to the super flashing algorithm "MIMXRT1170_UFL_L2"? I check the development board which uses the default flashing algorithm with QSPI, and it can read and write flash normally when programing to flash.

Is there anything else to do for reading and writing flash when programing to flash?

Thanks.

0 件の賞賛
返信
1 解決策
2,430件の閲覧回数
jingpan
NXP TechSupport
NXP TechSupport

Hi @yalin ,

Please check the original demo's .ld file carefully. The flexspi related code located in SRAM. There is a linkscripts folder in the project. It can add something to link file.

 

Regards,

Jing

元の投稿で解決策を見る

6 返答(返信)
2,484件の閲覧回数
jingpan
NXP TechSupport
NXP TechSupport

Hi @yalin ,

If the code is XIP, the cpu can't get next instruction when the flash is reset.

 

Regards,

Jing

0 件の賞賛
返信
2,472件の閲覧回数
yalin
Contributor II

Hi @jingpan, Thanks for support. So do you mean it is related to the super flashing algorithm "MIMXRT1170_UFL_L2"? Because the development board can read and write flash normally when programing to flash which uses the default flashing algorithm with QSPI "MIMXRT1170_SFDP_QSPI.cfx", which also has FLEXSPI_SoftwareReset(base) in it.

0 件の賞賛
返信
2,451件の閲覧回数
jingpan
NXP TechSupport
NXP TechSupport

Hi @yalin ,

It's not related to flash download algorithm. Their work is finished after you download your code. In the flexspi demo, the flash driver is located in SRAM. Does your code located in SRAM?

 

Regards,

Jing

0 件の賞賛
返信
2,446件の閲覧回数
yalin
Contributor II

Hi @jingpan

I use the project 'evkmimxrt1170_flexspi_nor_polling_transfer_cm7' by installing SDK 2.11.0 of RT1170, the flash driver is located in BOARD_FLASH by default, not SRAM.

0 件の賞賛
返信
2,431件の閲覧回数
jingpan
NXP TechSupport
NXP TechSupport

Hi @yalin ,

Please check the original demo's .ld file carefully. The flexspi related code located in SRAM. There is a linkscripts folder in the project. It can add something to link file.

 

Regards,

Jing

2,425件の閲覧回数
yalin
Contributor II

Hi @jingpan 

Sorry about making you confused. What I mean is that, when I select the 'Link application to RAM' (when programing to ram), it can read and write the hyper flash normally. But when I don't select 'Link application to RAM' (when programing to flash), the program will get stuck when running to the first "FLEXSPI_SoftwareReset(base)".

Link application to RAMLink application to RAM

And Thanks for your mention of 'linkscripts', I solve the problem by adding 'fsl_clock.o' to SRAM, it can read and write the hyper flash when programing to flash. But the program will get stuck at the second 'FLEXSPI_SoftwareReset(base);' in function 'flexspi_nor_flash_page_program' and lead to a fault, and if I remove it, the program can run normally. I'm not sure the reason why only this 'FLEXSPI_SoftwareReset(base);' will lead to a problem. And I also found that if I run the flexspi_nor_flash_page_program by one step, the program won't get stuck at the second 'FLEXSPI_SoftwareReset(base);' in function 'flexspi_nor_flash_page_program'.

Thanks a lot.

0 件の賞賛
返信