MCU Boot utility connection with custom board - connection failure

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

MCU Boot utility connection with custom board - connection failure

Jump to solution
5,715 Views
Shiva-2022
Contributor III

Hello Support team,

I am trying to connect the MCU boot utility with custom board via UART, but its not connecting. getting the error saying "Make sure that you have put MCU in SDP".

But I have made the boot mode configurations to 2'b01.

Attached image FYR.

Please suggest what could be issue.

Thank you.

 

0 Kudos
1 Solution
5,569 Views
diego_charles
NXP TechSupport
NXP TechSupport

Hi @Shiva-2022 

Thanks for letting me know, 

I am glad that you have this working.

Diego

View solution in original post

0 Kudos
10 Replies
5,702 Views
diego_charles
NXP TechSupport
NXP TechSupport

Hi @Shiva-2022 

I hope you are doing well. 

I have seen in your picture that some BLHOST commands are being executed. But first the some SDPHOST commands need to be send, just to load the flashloader in internal SRAM. Then, flashloader will run and receive BLHOST commands. 

diego_charles_0-1666133634636.png

Please  disable one step check box and click on reconnect and share with me full debug log from the tool. Also,  take a look  at the below  pointers to check:

-Is MCU being powered properly?

-Is VCOM correct?

-Did you reset or power cycled the MCU before entering serial downloader mode.

-Any previous fuse settings?

- If you debug by JTAG after setting serial mode . Where is the program counter?

-Do you have latest MCUboot Utility release?

 

Please let me know your results! 

Diego

 

 

 

 

0 Kudos
5,697 Views
Shiva-2022
Contributor III

Hello Diego,

Thanks for the quick reply.

I have disabled the "One step" option in MCU utility and tried to reconect but the behaviour is same getting the same error as earlier.

Attached debug log from tool FYR.

Below are the answers for your points.

-Is MCU being powered properly?

Ans: Yes

-Is VCOM correct?

Ans: Yes

-Did you reset or power cycled the MCU before entering serial downloader mode.

Ans: Made the Boot mode configurations on switches and turned on MCU then started checking connection with board.

-Any previous fuse settings?

Ans: We didn't do any fuse settings.

- If you debug by JTAG after setting serial mode . Where is the program counter?

Ans: We have not tried with debugger. Please let us know which workspace to use for this purpose.

-Do you have latest MCUboot Utility release?

Ans: I have downloaded the MCUBoot utility tool from https://github.com/JayHeng/NXP-MCUBootUtility

 

FYI. We are using LPUART1 interface with MCU utility.
On our custom board we dont have any specific connector for connecting to UPART1, so we took LPUART1 Tx and Rx pinout and connected those wires to USB to UART tx and rx pins along with ground.

 

Please suggest your inputs.

Have a good day.

0 Kudos
5,684 Views
diego_charles
NXP TechSupport
NXP TechSupport

Hi @Shiva-2022 

Thanks for your reply and for providing more information !

 Regarding  :We have not tried with debugger. Please let us know which workspace to use for this purpose.

You can use and stand alone  debugger and any project. Here I halted the processor and read the PC. the address that I am reading commonly is related to bootROM execution.

diego_charles_0-1666203064790.png

Regarding: On our custom board we dont have any specific connector for connecting to UPART1, so we took LPUART1 Tx and Rx pinout and connected those wires to USB to UART tx and rx pins along with ground.

Good point , please double check that you are using the specific LPUART1 pins for your part. Below the ones for RT1064 as example. 

diego_charles_1-1666203341541.png

Also, SDK examples will use the same LPUART1 interface than the bootloader. It will be good to check using an LPUART example from the SDK. Where you can see data printed and type data in using a serial terminal.

Another thing, if you got USB1  available you can try with this port as well, just to narrow down the issue further.

Best regards,

Diego.

 

0 Kudos
5,666 Views
Shiva-2022
Contributor III

Hello Diego,

Thank you.

We are able to connect with MCUBoot tool now.

And now we stuck in configure boot device.

When i click on configure boot device, getting the failure msg. Plz refer attached image.

I have done below configurations:

Boot mode: SDP 2'01b

Boot_cfg[7:4]: 1

Boot_cfg[7:4]: 111xb

Attached ext.NAND flash manual.

Also attached the boot device configuration in MCUboot tool.

 

Please suggest.

Thank you.

0 Kudos
5,645 Views
diego_charles
NXP TechSupport
NXP TechSupport

Hi @Shiva-2022 

Thanks for your patience, 

You can try to diagnose further by using our MCUXpresso Secure Provisioning tool ( version V5 added support for a NAND flash template)

diego_charles_0-1666818747368.png

I am recommending to use the tool to test your memory configuration (you can edit the  default one for MT29F1xxx ), as you can see in the above image. 

If you continue to have errors could you tell me which FlexSPI port are you using?

 

Best regards,

Diego

0 Kudos
5,640 Views
Shiva-2022
Contributor III

Hello Diego,

Thanks for the details.

As you suggested i have started using the Secure provisioning tool.

I am able to connect to target using via UART and made ext. flash configurations.

Tried to read the ext. memory i think it worked, showing the data as 0xff.

But when i try to erase or write its throwing error as invalid argument.

Please find the attached image FYR.

Your inputs helped and help in further debugging the issue.

Thank you so much.

Quick response is much appreciated

0 Kudos
5,638 Views
Shiva-2022
Contributor III

Hello Diego,

Firstly thank you so much, your inputs helped!

We have used "MCUX Secure Provisioning Tool  v5.0" to test the flashing of external flash as you suggested.
Winbond NAND flash is not listed in the device list, so we took Flex SPI NAND /MT29F1G0xx as a boot device and applied our Winbond flash configurations and tested the simple communication.
 
Now we are able to build the image and write the image into external flash using the above tool, and we have verified the flashed data by reading back using flash programmer which is available in the same tool.
 
Out of curiosity we tried whether it boots from NAND flash or not, but booting didn't work.
 We are thinking that the image flashed by the tool is as per the NAND flash bootable image.
  
Please find the attached images and log FYR.
Please check them and let us know your feedback.
 
 
 
0 Kudos
5,631 Views
diego_charles
NXP TechSupport
NXP TechSupport

Hi @Shiva-2022 

It is great that  you where able to program your NAND flash memory! 

Are you sure that you have the proper boot mode and boot config pin settings?  Please refer to the RM description or our EVK description.

Best regards, and good luck!

Diego

5,580 Views
Shiva-2022
Contributor III

Hello Diego,

Thanks for al the inputs.

all working as expected.

 

 

0 Kudos
5,570 Views
diego_charles
NXP TechSupport
NXP TechSupport

Hi @Shiva-2022 

Thanks for letting me know, 

I am glad that you have this working.

Diego

0 Kudos