MIMXRT1170 EVK flexspi_nor_debug ThreadX example

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

MIMXRT1170 EVK flexspi_nor_debug ThreadX example

1,105 Views
GLantzTCore
Contributor III

I am building and running the uart_example for the ThreadX OS using flexspi_nor_debug build target in the IAR EW IDE.  Builds, loads and executes correctly. I was using the CMSIS DAP debugging method.  We have an i-jet jtag debugger, so we made the appropriate hardware changes to the EVK.  I went back to build and load the project using the i-jet debugger.  I get a generic error - The flash loader program reported an error.  Everything else works.  I can build the debug target and execute it without error.

 

Any suggestions on why I can't reburn the spi flash would be helpful.

0 Kudos
Reply
5 Replies

1,069 Views
Gavin_Jia
NXP TechSupport
NXP TechSupport

Hi @GLantzTCore ,

Thanks for your interest in NXP MIMXRT series!

We recommend that you check the code in pinmux.c to prevent previous code from multiplexing the JTag pins to something else:
And, it is better to try with JLink's JTag mode first, because this is the one we tested without problems. i-Jet has not tested it.

 

  IOMUXC_SetPinMux(
	 IOMUXC_GPIO_LPSR_10_JTAG_MUX_TRSTB,     
      0U);
  IOMUXC_SetPinMux(
	 IOMUXC_GPIO_LPSR_11_JTAG_MUX_TDO,     
      0U);
  IOMUXC_SetPinMux(
	  IOMUXC_GPIO_LPSR_12_JTAG_MUX_TDI,      
      0U);                                   
  IOMUXC_SetPinMux(
	 IOMUXC_GPIO_LPSR_13_JTAG_MUX_MOD,      
      0U);                                   
  IOMUXC_SetPinMux(
	  IOMUXC_GPIO_LPSR_14_JTAG_MUX_TCK,    
      0U);                                  
  IOMUXC_SetPinMux(
	  IOMUXC_GPIO_LPSR_15_JTAG_MUX_TMS,  
      0U);

 

Best regards,
Gavin

0 Kudos
Reply

1,048 Views
GLantzTCore
Contributor III

Thanks, Gavin.

I did use the pin config tool to set up the jtag debug interface and it generated the same code as you included.

The inability to reprogram flash first occurred when using the CMSIS DAP debug interface.  I then modified the board per the user guide, ran the pin config tool, verified I could build, download and run the sdram build target.  Then attempted to build/download the flexspi_nor_debug target and it failed.

Buying another jtag debugger is not practical for our project.

 

0 Kudos
Reply

991 Views
GLantzTCore
Contributor III

I changed SW2 to be 0001 and got further.  The download "succeeded" but the verification found a single address that didn't match and the application would not run.

0 Kudos
Reply

988 Views
GLantzTCore
Contributor III

According to the map file, the location that won't verify is the boot.hdr.config.  The code is trying to set a value of 0x46, memory is 0x40.

0 Kudos
Reply

983 Views
Gavin_Jia
NXP TechSupport
NXP TechSupport

Hi @GLantzTCore ,

Thanks for your update!

Turning the switch to 0-0-0-1 will put it into serial download(SDP) mode. Since we don't have an i-jet, let's assume for the moment that the problem is not related to the debugger. Can you clarify for me which debugger was used in the previous scenario where there was no problem? Was it the on-board debugger on top of the RT1170-EVK or an external debugger? If it's on-board, which firmware is it?

Then, let's analyze the situation as it is now. I suggest you first try to flash your image using MCUBootUtility in SDP mode. I've attached a description of how to use the software and recommend that you erase the contents of the original flash before flashing a new image.

Gavin_Jia_0-1712736790936.png

 

Best regards,
Gavin

0 Kudos
Reply