AnsweredAssumed Answered

Use the ROM bootloader to configure the QSPI

Question asked by Javier Soriano on Mar 7, 2017
Latest reply on Apr 3, 2017 by Javier Soriano

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

Outcomes