Use the ROM bootloader to configure the QSPI

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

Use the ROM bootloader to configure the QSPI

跳至解决方案
1,055 次查看
javiersoriano
Contributor II

I have been reading a bit about the ROM bootloader, but I am stil not sure I can use it for what I want. I am usign a Freedom K82 dev board.

The manual of the K82 sub-family says that the ROM bootloader can be used to boot an application from the QSPI. I would like to use it slightly different.

Starting point

I have an application that initializes the QSPI and the OTFAD (using the BCA, QCB and keyblob), and then I read/write data from/to it. To get this to work, I had to use the fsl_* drivers in my code, which I took from the Bootloader 2.0 source code.

      - I would not like to reuse the software bootlader, because I already have a bootloader of my own in place. 

      - I tried modifying the FOPT field, but whenever I try to debug, many errors occur. (value 0xBF)

      - Running the microcontroller without the debugger, my app seems ot hang, as if it never gets out of the bootloader, or just some error happens. 

Goal

Ultimately, I would like to have the QSPI and OTFAD initialized by the ROM bootloader, and then jump to my application (residing in internal flash.) My application would then proceed to read and write data, but all the initialization would be done by the ROM bootloader.

I have a few questions:

1. Is my goal even possible?

1. How to force the ROM bootloader to run every time the device is booted?

1. Does Section 2.7.1 from this document apply to the ROM bootloader as well?

2. Would the QSPI remain configured even after exiting the ROM bootloader?

3. What version and type is included as the ROM bootloader? In the example NXP bootloader 2.0, I see a freedom_bootloader, flashloader, and a flashloader_loader. Is the ROM bootloader represented in any of those?

4. Would the QSPI remain configured even after application jumps?

Thanks in advance for the patience and guidance :smileyhappy:

0 项奖励
回复
1 解答
889 次查看
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Javier,

Please see below some feedback about your questions:

1) The QSPI can be configured by the ROM bootloader but it then expects to load an application in QSPI memory or simply jump to an existing application in QSPI memory. The ROM bootloader would not configure QSPI and then jump to an application in internal flash.

The flow diagram for the ROM bootloader with QSPI support can be found in the next documents:

- K82_Reference_Manual

- KBOOT_QSPI_User_Guide

2) The QSPI remains configured but code would actually be executed from QSPI memory.

3) The freedom_bootloader code would be the closest match to the ROM bootloader firmware.

4) Same as [2].

Regards!

Jorge Gonzalez

在原帖中查看解决方案

2 回复数
890 次查看
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Javier,

Please see below some feedback about your questions:

1) The QSPI can be configured by the ROM bootloader but it then expects to load an application in QSPI memory or simply jump to an existing application in QSPI memory. The ROM bootloader would not configure QSPI and then jump to an application in internal flash.

The flow diagram for the ROM bootloader with QSPI support can be found in the next documents:

- K82_Reference_Manual

- KBOOT_QSPI_User_Guide

2) The QSPI remains configured but code would actually be executed from QSPI memory.

3) The freedom_bootloader code would be the closest match to the ROM bootloader firmware.

4) Same as [2].

Regards!

Jorge Gonzalez

889 次查看
javiersoriano
Contributor II

Hello Jorge, 

Thanks for the detailed and accurate information. I had already feared that it would not be entirely possible to use it in the way I wanted. So I ended up doing it in a different way. Basically configuring the QSPI/OTFAD from the user app, which is stored in the internal flash. 

Cheers!

Javier

0 项奖励
回复