RT1051 and QSPI

cancel
Showing results for 
Search instead for 
Did you mean: 

RT1051 and QSPI

910 Views
giuseppescarpi
Contributor III

Hello everybody,

I am currently working on a custom board with RT1051 and a QSPI flash memory - same type than EVKB, just smaller.

We can read and write the board via SWD/JLink, but we are unable to start the board from QSPI despite the fact that we burned the correct fuse (just BT_FUSE_SEL, because the other default values are OK) and that we have BOOT_SEL pins both to GND.

I was unable to understand the problem so far. Hopefully, someone can share his/her experience in order to help me understand what is wrong.

Cheers

Giuseppe

6 Replies

346 Views
jay_heng
NXP Employee
NXP Employee

You can also try this tool, with this tool, You can flash bare image into various boot devices easily and don't need to care about headers (ivt, boot data...)

GitHub - JayHeng/nxp-sec-boot-ui: A one-stop GUI tool to work with NXP MCU (Kinetis, i.MXRT, LPC) RO... 

0 Kudos

346 Views
giuseppescarpi
Contributor III

Hello Jay, thank you for the suggestion.

I see that your tool works with USB or UART1, but unfortunately we have access to neither of these peripherals.

We connect to the MCU with Segger J-Link via SWD interface.

346 Views
giuseppescarpi
Contributor III

In the end, we discovered that the QE bit (QSPI Enable) was not set in the flash.

According to the local FAE, if we program the board via SWD as we do, then we need to manually set the flag.

It seems that, using openSDA, this operation is automagically executed by some init script.

Anyway... problem solved.

Giuseppe

346 Views
m_spahlinger
Contributor I

Hi Giuseppe,

could you explain how you are writing the QE-bit manually?

Thanks, Michael

0 Kudos

346 Views
giuseppescarpi
Contributor III

Hi Michael, sorry for the late answer. I suppose you already solved the issue, but I post the answer for future reference.

Basically I started from the MCUXpresso project called flexspi_nor_polling_transfer.

Then I just modified it to read and write the bit.

Here is the code that performs the read/write operation:

    /* Check if the QE bit is already set */
    completed = true;
    if ( (flexspi_nor_read_status_register(EXAMPLE_FLEXSPI) & 0x40) != 0x40)
    {
        /* Enable QE bit */
        status = flexspi_nor_enable_quad_mode(EXAMPLE_FLEXSPI);
        if (status != kStatus_Success)
        {
            return status;
        }
        completed = ( (flexspi_nor_read_status_register(EXAMPLE_FLEXSPI) & 0x40) == 0x40);
    }

346 Views
Yuri
NXP TechSupport
NXP TechSupport

 

Hello,

 

 

  Please check Your QSPI image, if it is correctly prepared, as described

in app note AN12108 (How to Enable Boot from QSPI Flash, Rev. 3, 09/2018)

 

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

 

  Also, app note AN12183 (How to Enable Debugging for FLEXSPI NOR

Flash) may be useful.

 

https://www.nxp.com/docs/en/nxp/application-notes/AN12183.pdf

 

Have a great day,

Yuri

 

------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer

button. Thank you!

0 Kudos