Flash Programming And Boot In i.MXRT 1052

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

Flash Programming And Boot In i.MXRT 1052

Jump to solution
3,096 Views
omerkaanbasakin
Contributor IV
Hello, we are using the IMXRT1052 processor on a custom board, MCUXpresso IDE for programming, and PE Micro UniversalMultilink for debugging. On the custom board, we used IS25LP064A as an external QSPI flash. We can program QSPI flash by making changes on the IMX RT 1020 XIP folder and using the IS25WP064 driver. 
During the boot process, we relocate code from QSPI flash to ram with the linker script we wrote with reference from MCUXpresso User Guide chapter 17.15.1 "Relocating code from FLASH to Ram".
So far everything tested and we did not encounter any bugs or omissions. 

I examined the evkbimxrt1050_flexspi_nor_polling_transfer in SDK_2.8.6_MIMXRT1052xxxxB. In the example, the XIP_BOOT_HEADER_ENABLE parameter is not equal to true, and also the example runs from ram. In the example, created a custom lookup table.
Example's flow: Initialize Flexspi, and get Vendor ID of flash. Execute erase, program, and read operations. Also I tested evkbimxrt1050_flexspi_hyper_flash_polling_transfer example.
 
We only have one flash on the custom board and we want to store session data, configuration, etc... and also we want to use the flash for boot. After some research, I saw that the flash cannot be used for two jobs at the same time. 
 
My first question is: 
Can we split the flash memory into two parts? The first part for booting and the second part for data storage.

My second question is:
In both examples, page programming is made by sector addresses. Do we have to use the sector (4kByte) for a single write operation (256Byte)?

P.S.: We cannot configure custom board using a USB or UART. So I can't use the MFG tool, MCUBOOTUTILITY, and flash loader.
Labels (1)
0 Kudos
Reply
1 Solution
3,064 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi omerkaanbasakin,

   About the RWW flash chip, you need to select the related flash chip which can support the RWW, the AN mentioned the details need to check the flash which support the RWW datasheet.

   If you copy the flash operation code to the internal TCM, you don't need to use the RWW chip.

   P&E Multilink tool should still can support your code loading.

 

Wish it helps you!

Best Regards,

Kerry

View solution in original post

0 Kudos
Reply
4 Replies
3,083 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi omerkaanbasakin,

  Answer your two questions:

1:Can we split the flash memory into two parts? The first part for booting and the second part for data storage.

Answer: You can split the flash memory to two part, but please note, when you do the flash related operation, eg, write, erase, you need to copy the related code to the internal TCM. As the Flash chip can't support the RWW mode directly.

BTW, we have an application, which will used to  Implement RWW on i.MX RT Series:

https://www.nxp.com/docs/en/application-note/AN12564.pdf

2:In both examples, page programming is made by sector addresses. Do we have to use the sector (4kByte) for a single write operation (256Byte)?
P.S.: We cannot configure custom board using a USB or UART. So I can't use the MFG tool, MCUBOOTUTILITY, and flash loader.
Answer: In fact, you can check the related QSPI flash datasheet, the related operation command,  if you want to use the page program, you can use the page related instruction.
If you can't configure customer board with USB or UART, you can use the JTAG/SWD interface to download the code with the debugger.
 
Wish it helps you!
Best Regards,
Kerry
0 Kudos
Reply
3,073 Views
omerkaanbasakin
Contributor IV

Hi kerryzhou,

Thanks for your reply, I overlooked the application AN12564.

I reviewed the AN12564.pdf and found a description of the question I'm trying to wrap around in title 3.2. I examined the datasheet of the flash we used on the board, but I could not see the RWW feature mentioned in the AN12564 application. We are currently copying most of the code in flash to Ram 2. I guess it would not be a problem for us to set up a structure like the application AN12564.

We are using PE Micro Universal Multilink over the JTAG connection to upload the code. Does the driver used to load the code cause problem for the partitioned flash memory?

Thanks for your time.

Kind Regards,

Kaan

 

 

 

 

0 Kudos
Reply
3,065 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi omerkaanbasakin,

   About the RWW flash chip, you need to select the related flash chip which can support the RWW, the AN mentioned the details need to check the flash which support the RWW datasheet.

   If you copy the flash operation code to the internal TCM, you don't need to use the RWW chip.

   P&E Multilink tool should still can support your code loading.

 

Wish it helps you!

Best Regards,

Kerry

0 Kudos
Reply
3,053 Views
omerkaanbasakin
Contributor IV

Hi kerryzhou,

Thank you for your reply and your time.

Kind Regards.

Kaan

0 Kudos
Reply