MCUBootUtility fails to configure external memory with custom MIMXRT1064

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

MCUBootUtility fails to configure external memory with custom MIMXRT1064

Jump to solution
1,811 Views
johnreepDK
Contributor II

To whom it may concern:

We have both an MIMXRT1064 EVK (A1) and a custom PCA based on the RT1064.  The custom board was developed without SDRAM and instead supports HyperRam over Octal SPI on pin GPIO SD B1[00 to 11] for various signals.  Initial development started on the EVK, simple examples run and we have had a few issues with Segger that we are addressing that direction. 

On the custom board and after checking out power, clocks, etc., we have been able to connect our custom board over USB to a host PC.  Using the MCU Boot Utility (v3.2.0), we can connect to the board and download the default flashloader.

In 'entry mode' with 'one step' checked, MCUbootUtility fails with a message "MCU has entered Flashloader but failed to configure external memory, Pelase reset board and set proper boot device then try again!"

In Master mode, the same message occurs after connecting to device and then connecting to 'flashloader' which downloads a default bl into RAM, then the button states "Configure boot device" and pressing this causes the above issue.

Have we mis-configured the HW or a boot setting to not allow flash downloading and booting from the internal 4MB flash?

 

Labels (1)
0 Kudos
1 Solution
1,775 Views
johnreepDK
Contributor II

Hi jeremyzhou,

I have since resolved the issue today. 

The crux of the issue surrounded the power rails.  On the custom PCA, there is not an SNVS to a coincell path and so the design ties VDD_SNVS_IN and VDD_HIGH_IN both to an always on 3.3V.  The core and DCDC sections (DCDC_IN and DCDC_PSWITCH [through an RC]) also tie to this always on 3.3V For other power savings and control reasons, there is a separate SMPS that generates a separate 3.3V which ties to NVCC GPIO and NVCC SD0.  To resolve the issue, I ended up disconnecting the secondary 3.3V supply and bridging that net to the always on 3.3V on the custom board.

With this done, the power rails then matched the EVK and everything worked as expected.  The RM definitely stipulates and warns about voltage rail sequencing, etc.  I assume that the original as-designed configuration either does not abide by an internal monitor OR having NVCC GPIO tied to a secondary/not-always-on 3.3V causes the internal Flash to not be initialized appropriately.

Thank you for bouncing ideas and confirming or clarifying various assumptions.  As the issue resolves around the power supply configuration, the resolution is board specific to our custom board. 

Please mark this ticket as closed as needed. 

View solution in original post

6 Replies
1,776 Views
johnreepDK
Contributor II

Hi jeremyzhou,

I have since resolved the issue today. 

The crux of the issue surrounded the power rails.  On the custom PCA, there is not an SNVS to a coincell path and so the design ties VDD_SNVS_IN and VDD_HIGH_IN both to an always on 3.3V.  The core and DCDC sections (DCDC_IN and DCDC_PSWITCH [through an RC]) also tie to this always on 3.3V For other power savings and control reasons, there is a separate SMPS that generates a separate 3.3V which ties to NVCC GPIO and NVCC SD0.  To resolve the issue, I ended up disconnecting the secondary 3.3V supply and bridging that net to the always on 3.3V on the custom board.

With this done, the power rails then matched the EVK and everything worked as expected.  The RM definitely stipulates and warns about voltage rail sequencing, etc.  I assume that the original as-designed configuration either does not abide by an internal monitor OR having NVCC GPIO tied to a secondary/not-always-on 3.3V causes the internal Flash to not be initialized appropriately.

Thank you for bouncing ideas and confirming or clarifying various assumptions.  As the issue resolves around the power supply configuration, the resolution is board specific to our custom board. 

Please mark this ticket as closed as needed. 

1,769 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thanks for your reply.
I'm glad to hear that your issue was resolved.
Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
1,806 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
Firstly, I'd like to suggest you check the circuit of your custom board, especially for the power supply and boot setting parts.
Next, I was wondering if you can share the log of the MCUbootUtility, as it records the contact process between the MCUbootUtility and your board.
Looking forward to your reply.
Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
1,801 Views
johnreepDK
Contributor II

Hi TIC,

Thank you for the prompt reply.  A copy of log.txt from MCUbootUtility:

=====================================================================

Executing C:\Users\john_reep\Downloads\NXP-MCUBootUtility-3.2.0\NXP-MCUBootUtility-master\tools\sdphost\win\sdphost -t 50000 -u 0x1FC9,0x0135 -j -- error-status
Executing C:\Users\john_reep\Downloads\NXP-MCUBootUtility-3.2.0\NXP-MCUBootUtility-master\tools\sdphost\win\sdphost -t 50000 -u 0x1FC9,0x0135 -j -- read-register 1075790864 32 4 C:\Users\john_reep\Downloads\NXP-MCUBootUtility-3.2.0\NXP-MCUBootUtility-master\tools\sdphost\win\vectors\readReg.dat
Executing C:\Users\john_reep\Downloads\NXP-MCUBootUtility-3.2.0\NXP-MCUBootUtility-master\tools\sdphost\win\sdphost -t 50000 -u 0x1FC9,0x0135 -j -- read-register 1075790880 32 4 C:\Users\john_reep\Downloads\NXP-MCUBootUtility-3.2.0\NXP-MCUBootUtility-master\tools\sdphost\win\vectors\readReg.dat
Executing C:\Users\john_reep\Downloads\NXP-MCUBootUtility-3.2.0\NXP-MCUBootUtility-master\tools\sdphost\win\sdphost -t 50000 -u 0x1FC9,0x0135 -j -- read-register 1074757636 32 4 C:\Users\john_reep\Downloads\NXP-MCUBootUtility-3.2.0\NXP-MCUBootUtility-master\tools\sdphost\win\vectors\readReg.dat
Executing C:\Users\john_reep\Downloads\NXP-MCUBootUtility-3.2.0\NXP-MCUBootUtility-master\tools\sdphost\win\sdphost -t 50000 -u 0x1FC9,0x0135 -j -- read-register 1074757660 32 4 C:\Users\john_reep\Downloads\NXP-MCUBootUtility-3.2.0\NXP-MCUBootUtility-master\tools\sdphost\win\vectors\readReg.dat
Executing C:\Users\john_reep\Downloads\NXP-MCUBootUtility-3.2.0\NXP-MCUBootUtility-master\tools\sdphost\win\sdphost -t 50000 -u 0x1FC9,0x0135 -j -- read-register 1074757660 32 4 C:\Users\john_reep\Downloads\NXP-MCUBootUtility-3.2.0\NXP-MCUBootUtility-master\tools\sdphost\win\vectors\readReg.dat
Executing C:\Users\john_reep\Downloads\NXP-MCUBootUtility-3.2.0\NXP-MCUBootUtility-master\tools\sdphost\win\sdphost -t 50000 -u 0x1FC9,0x0135 -j -- write-file 539001344 C:\Users\john_reep\Downloads\NXP-MCUBootUtility-3.2.0\NXP-MCUBootUtility-master\src\targets\MIMXRT1064\ivt_flashloader.bin
Executing C:\Users\john_reep\Downloads\NXP-MCUBootUtility-3.2.0\NXP-MCUBootUtility-master\tools\sdphost\win\sdphost -t 50000 -u 0x1FC9,0x0135 -j -- jump-address 539001344
'Connect to xxx' button is clicked
Executing C:\Users\john_reep\Downloads\NXP-MCUBootUtility-3.2.0\NXP-MCUBootUtility-master\tools\blhost2_3\win\blhost -t 50000 -u 0x15A2,0x0073 -j -- get-property 1 0
Executing C:\Users\john_reep\Downloads\NXP-MCUBootUtility-3.2.0\NXP-MCUBootUtility-master\tools\blhost2_3\win\blhost -t 50000 -u 0x15A2,0x0073 -j -- get-property 1 0
Executing C:\Users\john_reep\Downloads\NXP-MCUBootUtility-3.2.0\NXP-MCUBootUtility-master\tools\blhost2_3\win\blhost -t 50000 -u 0x15A2,0x0073 -j -- get-property 24 0
Executing C:\Users\john_reep\Downloads\NXP-MCUBootUtility-3.2.0\NXP-MCUBootUtility-master\tools\blhost2_3\win\blhost -t 50000 -u 0x15A2,0x0073 -j -- efuse-read-once 5
Executing C:\Users\john_reep\Downloads\NXP-MCUBootUtility-3.2.0\NXP-MCUBootUtility-master\tools\blhost2_3\win\blhost -t 50000 -u 0x15A2,0x0073 -j -- efuse-read-once 6
Executing C:\Users\john_reep\Downloads\NXP-MCUBootUtility-3.2.0\NXP-MCUBootUtility-master\tools\blhost2_3\win\blhost -t 50000 -u 0x15A2,0x0073 -j -- efuse-read-once 7
Executing C:\Users\john_reep\Downloads\NXP-MCUBootUtility-3.2.0\NXP-MCUBootUtility-master\tools\blhost2_3\win\blhost -t 50000 -u 0x15A2,0x0073 -j -- efuse-read-once 6
Executing C:\Users\john_reep\Downloads\NXP-MCUBootUtility-3.2.0\NXP-MCUBootUtility-master\tools\blhost2_3\win\blhost -t 5242000 -u 0x15A2,0x0073 -j -- read-memory 1074446400 4 C:\Users\john_reep\Downloads\NXP-MCUBootUtility-3.2.0\NXP-MCUBootUtility-master\tools\blhost2_3\win\vectors\readReg.dat 0
Executing C:\Users\john_reep\Downloads\NXP-MCUBootUtility-3.2.0\NXP-MCUBootUtility-master\tools\blhost2_3\win\blhost -t 5242000 -u 0x15A2,0x0073 -j -- read-memory 1075791568 4 C:\Users\john_reep\Downloads\NXP-MCUBootUtility-3.2.0\NXP-MCUBootUtility-master\tools\blhost2_3\win\vectors\readReg.dat 0
'Connect to xxx' button is clicked
Executing C:\Users\john_reep\Downloads\NXP-MCUBootUtility-3.2.0\NXP-MCUBootUtility-master\tools\blhost2_3\win\blhost -t 5242000 -u 0x15A2,0x0073 -j -- fill-memory 538976256 4 3221225479 word
Executing C:\Users\john_reep\Downloads\NXP-MCUBootUtility-3.2.0\NXP-MCUBootUtility-master\tools\blhost2_3\win\blhost -t 5242000 -u 0x15A2,0x0073 -j -- fill-memory 538976260 4 0 word
Executing C:\Users\john_reep\Downloads\NXP-MCUBootUtility-3.2.0\NXP-MCUBootUtility-master\tools\blhost2_3\win\blhost -t 50000 -u 0x15A2,0x0073 -j -- configure-memory 9 538976256

=========================================================================

A few confirmations:

I can confirm the RT1064 is running as the flashloader is running in OCRAM.  I have previous experience with blhost on other NXP microcontrollers.  I manually used blhost and could poll various parameters from the flashloader running in ram. 

I have been wondering if the 'default' RT1064 flashloader is somehow attempting to set up the external SDRAM or external HyperFlash from the EVK.  As the custom PCA does not have these items, this would clearly fail. 

I confirmed that the configure-memory command with id=9 is supposed to be external FlexSPI.  I cannot tell if this is the 4MB 'external' flash or the FlexSPI1 which would typically have the HyperFlash on the EVK.  If it is the later, are there instructions to rebuild a flashloader without these features?  I have taken a look at the SDK examples for the flashloader and I don't know if that will present a resolution to the custom PCA.

Thank you again for the support,

John

 

0 Kudos
1,795 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thanks for your reply.
1) I have been wondering if the 'default' RT1064 flashloader is somehow attempting to set up the external SDRAM or external HyperFlash from the EVK
-- No, I'm afraid not.
2) I confirmed that the configure-memory command with id=9 is supposed to be external FlexSPI. I cannot tell if this is the 4MB 'external' flash or the FlexSPI1 which would typically have the HyperFlash on the EVK. If it is the later, are there instructions to rebuild a flashloader without these features?
-- Regard the RT1064, the integrated 'internal flash' is a QSPI flash that connects to the FlexSPI pins, however, the FlexSPI pins are not assigned in the package.
So below command is right and can you tell what error message this command returns after fails to execute?
blhost -t 50000 -u 0x15A2,0x0073 -j -- configure-memory 9 538976256
Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
1,787 Views
johnreepDK
Contributor II

Hi,

Regarding the response to the command "blhost -t 50000 -u 0x15A2,0x0073 -j -- configure-memory 9 538976256":

The response from the output terminal of MCUBootUtility:
=================================
toolStatus: 0
commandOutput: {
"command" : "configure-memory",
"response" : [ ]
"status" : {
"description" : "20107 (0x4EBB) kStatus_FlexSPINOR_SFDP_NotFound",
"value" : 20107
}
}
=================================

Also as a follow up to a couple of other items:

(1) I have confirmed the voltage rails appear valid.
* This -- I believe -- is further confirmed by ivt_flashloader.bin being loaded in to RAM and accessible via USB and blhost commands

(2) I have successfully used the "Boot device memory" tab of MCUBootUtility
* I have been able to read starting at offset 0 (of what I think is 0x70000000)
* I have been able to write and then readback a binary file and confirm it mathces from a hex editor output
* I have then shutdown the system and disconnected
* After some time, I have reconnected everything to the point of having the flashloader running.
* Another read back reconfirms and compares to the original binary identically
* Does this not indicate that the internal 4MB flash is active and available? I'm not sure why the failed blhost command...

Regards,

John

0 Kudos