i.MX RT1064-EVK Second stage bootloader

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

i.MX RT1064-EVK Second stage bootloader

2,635 次查看
jernejturnsek
Contributor I

Hi. I am developing a second stage bootloader for MIMXRT1064-EVK, where I would like to write to two internal Flash image partitions, while bootloader is XIP from it. From the Reference Manual I can see the ROM bootloader API for reading and writting to NOR Flash, but if look into MCUXpresso demo, there is a special flash driver linked to RAM instead XIP from Flash. Is there a reason not to use ROM API for the Flash access in demo? What is the preffered way of doing it? Thanks.

0 项奖励
回复
7 回复数

2,489 次查看
jernejturnsek
Contributor I

I have found a solution. The trick was to disable ICache and DCache while erasing the flash. Also interrupts need to be disabled too. The caches can be enabled again when erase operation is done.

0 项奖励
回复

2,494 次查看
jernejturnsek
Contributor I

I have found this

https://community.nxp.com/t5/i-MX-RT/Programming-the-internal-Flash-of-RT1064/td-p/883989

and I have followed the example and I have still not been able to erase the sector at 0x70040000, while running the code bellow that address. The catch was in that irq_disable, but when stepping through flexspi_nor_flash_erase function, nothing happens.

Please. Is there a working example of how to use ROM API in RT1064 EVK board?

 

Regards,

Jernej

0 项奖励
回复

2,580 次查看
Pavel_Hernandez
NXP TechSupport
NXP TechSupport

Hello, sorry for the late response, I'm following your case, but I do not understand a lot are you trying to make the partition during the bootloader? I find a thread about this that maybe could help you.

RT1050 - Booting from serial NOR flash to SDRAM - NXP Community

Best regards,
Pavel

 

0 项奖励
回复

2,557 次查看
jernejturnsek
Contributor I

Is there an example of how to do it with the help of ROM API?

0 项奖励
回复

2,575 次查看
jernejturnsek
Contributor I

Hi, 

I have a MCUBoot loader running XIP on FlexSPI2 NOR Flash (internal one) and I need to read and write (through MTD) two image partitions, which are on the same Flash device in order to implement OTA. Because bootloader is rather large, I do not want to run it from RAM (and I do not plan to use SDRAM), thus when reading and writting, those routines should be ran from RAM or ROM. Mcuxpresso way of doing it is from RAM and why not the ROM API? Thanks.

0 项奖励
回复

2,540 次查看
Pavel_Hernandez
NXP TechSupport
NXP TechSupport

Hello, I read the next app note and maybe could help you.

Implement RWW on i.MX RT Series (nxp.com)

Best regards,
Pavel

 

0 项奖励
回复

2,619 次查看
Pavel_Hernandez
NXP TechSupport
NXP TechSupport

Hello, my name is Pavel, and I will be supporting your case, let me investigate more information about your questions.

Best regards,
Pavel

0 项奖励
回复