Trouble flashing custom board designed based on the 1020 Eval Kit

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

Trouble flashing custom board designed based on the 1020 Eval Kit

Jump to solution
2,344 Views
VolcanicCheese
Contributor III

Hello, I am currently designing a board based on the 1020 Eval Kit. I having trouble flashing my custom board successfully. The program we are flashing is the PIT_timer example project. The board design is nearly identical to the Eval kit without additional components that I do need for my project and the MCU is MIMXRT1021CAG4A instead of MIMXRT1021DAG5A. For powering on and off the MCU, the VDD_SNVS_IN supply is connected (shorted) with the VDD_HIGH_IN supply. It is powered by supplying a 3.3 V. On idle when powering the MCU, all the pins for the boot mode are a low signal. Because the efuse is a low voltage signal, it should boot up the MCU in serial downloader mode. I used JTAG to flash the program. The screenshot below is what I see when trying to flash the program. In addition, I attached the schematic of my custom 1020 board. The file name is OBC SCHEMATIC. I was wondering what is causing the program not to flash successfully. It never goes to main. Thank you for all the help!

image.png

 

0 Kudos
Reply
1 Solution
2,191 Views
diego_charles
NXP TechSupport
NXP TechSupport

Hi @VolcanicCheese 

Thanks for your reply! 

You can use UART, in this particular case the serial downloader supports LPUART 1 pins and you can specify the UART port setup with the MCU boot utility. 

diego_charles_0-1645230256722.png

Therefore  you can your  use the MCU-Link as bridge

 

 

View solution in original post

6 Replies
2,321 Views
diego_charles
NXP TechSupport
NXP TechSupport

Hi @VolcanicCheese 

I hope you are doing great! my apologies for the delayed response. 

I was trying to replicate your issue , for instance I modified to boot from serial downloader mode my I.MX RT1020 EVK.

diego_charles_0-1643846398515.png

To be able to debug the application properly I just had to set to boot application from external flash, what corresponds to the serial downloader setup we have done. 

diego_charles_1-1643846502035.png

It seems that the program counter is at the BOOT ROM memory address.

diego_charles_3-1643846839366.png

So , as quick feedback , could you  please try to debug when with the option to boot from external flash?

Let me know your results! and many thanks for your patience.

Diego

Edit > I missed that you said that you programmed a fuse, to get the board in serial downloader mode. In that case I think that you are not able to simple modify voltages externally as I did. Could you confirm? 

 

2,307 Views
VolcanicCheese
Contributor III

Hello diego_charles, thank you for looking into this problem. The custom design of the board is fixed traces. What I mean by that is that the custom board does not have SW8 like the dev board to change the boot mode. I looked through the reference manual for the MCU and look at the schematics of the custom board to figure out what boot mode it would be. I used an oscilloscope to make sure the pins on the MCU are the signals I expected. Thus, I do not think I could simply modify the voltage externally,

Also, I will try to look into this problem tomorrow and get back to you about it regarding booting from external flash.

2,259 Views
VolcanicCheese
Contributor III

Hello @diego_charles,

I tried looking at options on how to use the external flash with how my custom board is set up. I tried using the MCUbootutility and jlink commander to reconfigure the MCU to boot with the external flash. However, I am new to this and was not able to figure out how to do that. With how my custom board is set up, is there a way I could configure the MCU to boot with the external flash? Also, would using the external flash be a problem for using a watchdog timer?

0 Kudos
Reply
2,218 Views
diego_charles
NXP TechSupport
NXP TechSupport

Hi @VolcanicCheese 

Thanks for your reply!

If you have the boot pins set to 00 and you want to avoid entering to serial downloader mode you will have to burn BT_FUSE_SEL as 1. Then, specify the boot config to boot from your memory option. That way you can boot from your external flash.

As you mention, the MCU boot utility will let you do this. Here is an snapshot showing the boot config 1 with the BT_FUSE_SEL. 

diego_charles_0-1645074389598.png

Our colleague who made the utility gives a quick overview on the github page.

Also, with this  you should be able to  debug your application as expected. However the inconvenient that I can see is  that if  BT_FUSE_SEL is burned, you won't be able to enter serial downloader mode again.

The serial downloader mode can be used to regain debug access during  development process. As a  problematic image, that crashes the MCU,  can be prevented from running be replaced by a good one. That  is a reason  why fuse burning is recommend for production stage.

Regarding the watchdog : I do not see any problem. You are using the  same flash memory that the 1020 EVK uses a default boot option.

Let me know if you are still having inquiries that we could address.

Diego

 

2,210 Views
VolcanicCheese
Contributor III

Thanks that is really helpful! This makes a lot of sense. Currently, our OBC is designed to be only flashed with JTAG. Looking at the MCUbootutility, it seems like it is only designed for communicating through the USB connection. I was wondering how I could use a JTAG to blow the eFuse. If I cannot by JTAG, could I use the MCU Link to blow the eFuse through UART1 port? Also, is there any documentation on how I could do this through UART?

0 Kudos
Reply
2,192 Views
diego_charles
NXP TechSupport
NXP TechSupport

Hi @VolcanicCheese 

Thanks for your reply! 

You can use UART, in this particular case the serial downloader supports LPUART 1 pins and you can specify the UART port setup with the MCU boot utility. 

diego_charles_0-1645230256722.png

Therefore  you can your  use the MCU-Link as bridge