iMXRT1024 unable to access (internal) flash

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

iMXRT1024 unable to access (internal) flash

737 Views
Mike_Gerlach
Contributor II

Not sure this is the correct title/problem, but I have to start somewhere.

We are using a iMRT1024 using MCUXpresso IDE 11.7.1. I should mention this is the initial board bring up of a new design - first time using this IMXRT device as well as MCUXpresso.  All board power supplies, clocks, config pins (including boot mode pins) have been verified. We have even verified through memory/register peeks that the FUSE and CONFIG registers are read correctly and match the EVK board.

At this point we have a very simple main routine that initializes the board, prints "hello world", increments a counter, and toggles a GPIO/LED.  When the program executes from flash - nothing happens (assume it is crashing). When we run in debug mode it errors out. The variable counter is not even getting set correctly.

mickeyG_3-1686859105264.png

mickeyG_0-1686858174263.png

We have used the same main routine on an EVK board and the programs works and debugs properly (just uses different IO pins for the LED blink function). 

One area we are investigating is the flash.  We can successfully program the flash via JTAG (in MCUXpresso) and also view the contents using a PEMicro PROGACMP programming tool.  But in the MCUXpresso IDE debug mode investigating the same area of flash (~0x60002XXX) returns all 0's as if it is not programmed.  Additionally the disassembly also shows all movs r0,r0.

Doing the same thing with the EVK the memory is not all 0's and the disassembly code shows 

mickeyG_2-1686858925398.png

mickeyG_1-1686858846529.png

mickeyG_6-1686859417269.png

Its almost as if the MCU can't access the flash OR is trying to access a different area of memory that is unprogrammed.  We thought it could have been in some form of secure boot or the serial_download mode, but believe the CFG/boot jumpers are correct.  As mentioned, we verified the registers match the EVK board/project.

Any thoughts on how to debug would be greatly appreciated or if there is some special hints/tricks to get more info.   

Labels (1)
0 Kudos
4 Replies

474 Views
Mike_Gerlach
Contributor II

Not sure if this was the {only} solution or not... but we did build this project from scratch and the attached the memory requires the driver for the internal memory of the MIMXRT1024. We thought this would have been automatic since it was part of the internal memory of the device. Now that it is added the flash memory is working.  

0 Kudos

692 Views
Mike_Gerlach
Contributor II

Thanks, will try, but have a few questions since I am new to using the tools.  

1. Being a brand new HW design, we are not sure the serial download method works (although it should). Does serial download imply USB connection or SD card?  USB plugged into my PC doesn't recognize the USB device - but I didn't research too far.  If I use SD, I assume I have to set the CFG pin, then do I just include the axf file on the SD card?  

2.  How to set the project to run in SRAM?  We only have the internal memory of the RT1024, the design does not have any external SRAM.  

3. CFG and BOOT pins have been verified.  All CFG lines are pulled down = 0 and the boot mode pins are set via jumpers to be BOOT0 = 0, BOOT1 = 1.

0 Kudos

651 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi @Mike_Gerlach ,

1. Serial download mode means waiting for connection in UART and USB.

2. IDE can download code to internal SRAM and running there. Just allocate and compile the project in internal SRAM(ITCM/DTCM/OCRAM).

3. BOOT0 = 0, BOOT1 = 1. this is flexspi boot.

0 Kudos

705 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi @Mike_Gerlach ,

I have a PEmicro Multilink Universal and I tested to use this debug probe to download code to EVK. It works fine.

It seems RT1024 has boot up correctly. But it stay in ROM code because application code didn't download to Flash. Please test

1. Switch to serial download mode and see if Secure Provisioning  Tool can connect to RT1024;

2. Set the project running in SRAM to see if debug probe can work properly.

3. Check BOOT_CFG pins and BOOT_MODE pins.

Regards,

Jing

0 Kudos