RT1051 and QSPI

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

RT1051 and QSPI

3,962 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

7 Replies

3,398 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
Reply

3,398 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.

3,398 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

3,398 Views
m_spahlinger
Contributor I

Hi Giuseppe,

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

Thanks, Michael

0 Kudos
Reply

3,398 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);
    }

2,930 Views
Babycat
Contributor III

In my case, I am working with i.MX RT1010, I build the custom board with same MCU and SPI Flash IC on the MIMXRT1010 EVK.

I was not able to write the code into Flash IC because of the QE bit, so I enabled it with your suggested code as below. I also have to run it from RAM by tick on "Link Application to Ram"

Capture1.JPGCapture2.JPG

Now I can download the code into Flash with MCU Falsh tool. The code runs, (LED is blinking) but somehow I can get it run in debug mode. MCUXpresso shows msg: 

Break at address "0x20ea90" with no debug information available, or outside of program code. 

Do you have any idea? Feel free to help

Thank you.

0 Kudos
Reply

3,398 Views
Yuri
NXP Employee
NXP Employee

 

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
Reply