New i.MX RT1166 controller do not access the external flash using FLEXSPI1 for the very first time

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

New i.MX RT1166 controller do not access the external flash using FLEXSPI1 for the very first time

718件の閲覧回数
Shashank_IntelliPredikt
Contributor I

we programmed / flashed the LED blink test application for the first time on a new i.MX RT1166 controller on our custom board to the external flash memory through MCUXpresso IDE / J-Flash using Segger J-Link plus debugger but the LED does not blink.

Using Segger J-Flash tool we read the external flash memory, the LED blink test application is not present and garbage data was present.

We tried the to erase the flash but blank check test fails.

The Boot Mode is configured to Internal Boot i.e BOOT_MODE[1:0] = 10b

Since we were unable to program / flash the external flash memory, we tried running the application in RAM memory then the application works.

Then we tried to flash the application to the external flash then the application started working.

This was tried on 3 boards with new controllers and the results were found to be same.

Why is it that the application is not flashed in the external flash memory for the first time on a new controller? Is there any other steps to be taken care during flashing for the first time?

Note: However after application started working from external flash memory, the subsequent any application flash works (no need to run on RAM)

0 件の賞賛
3 返答(返信)

702件の閲覧回数
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @Shashank_IntelliPredikt ,

  Which detail external flash you are using in the RT1166?

  Is it QSPI flash?

  If yes, it should mainly related to the QE bit, quad enable bit, as you know, this bit in the external flash is non-volatile bit, you need to enable it at first, then you can use the quad mode to boot.

  You can run this code at first:

SDK_2_11_1_MIMXRT1160-EVK\boards\evkmimxrt1160\driver_examples\flexspi\nor\polling_transfer

  Please also check your own flash datasheet, make sure the QE position is the same as the code.

 

Best Regards,

kerry

0 件の賞賛

697件の閲覧回数
Shashank_IntelliPredikt
Contributor I

Hello Kerry,

Thanks for the answer we are able to verify that the QE bit is not set to 1 by default or during power up, and the example 

SDK_2_11_1_MIMXRT1160-EVK\boards\evkmimxrt1160\driver_examples\flexspi\nor\polling_transfer

sets the QE bit only when it is run on RAM. Hence after that all other programs are working.

The external flash part that we are using is IS25WP032 from ISSI.

Currently we are looking into the methods that can be used to set the QE bit (preferably in the application build itself) in the external flash. We have found out the following methods.

1. Try adding the command sequence to write QE bit to 1 in flexspi_nor_config block in the file evkmimxrt1160_flexspi_nor_config.c present in XIP folder, 

        a. Add the LUT sequence to write the QE bit to 1 in the lookuptable section.

        b. Then configure the Device mode configuration parameters in the flexspi_nor_config block which             executes first before starting to execute the application.

---> We have tried this method and it did not work and the controller is pointing to an unknown location 0xdeadbeee

2. Use J-Flash / J-Flash SPI to enable and program the QE bit to 1 and then flash the application using segger J-link plus device - currently we do not know the procedure using J-Flash, we know using J-Flash SPI.

3. Use MCUXpresso provisoning tool to set the QE bit to 1 - currently we do not know the procedure for this yet.

Please let me know whether the above methods are right, if not which methods are to be used and not be used.

0 件の賞賛

693件の閲覧回数
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @Shashank_IntelliPredikt ,

   Thanks for your confirmation that is really related to the QE bit, OK, now it is easy to resolve it.

   Now, you just need to use the flashdriver for the JLINK which can enable the QE bit is OK.

  We have a flashdriver named as RT-UFL which can be used to the JLINK:

https://github.com/JayHeng/RT-UFL/archive/refs/tags/v1.0.zip

This is the install method:

https://www.cnblogs.com/henjay724/p/14942574.html

device select: MIMXRT1160_UFL_L0

If you are using the MCUXPresso IDE, refer to this one after you install it:

https://www.cnblogs.com/henjay724/p/14190485.html

Wish it helps you!

Best Regards,

Kerry

 

0 件の賞賛