LPC54114 flash programming using UART(ISP Mode)

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

LPC54114 flash programming using UART(ISP Mode)

2,477 Views
seku
Contributor I

Step 1 : 

---------

I have OM13089 LPCeXPRESSO 5411X Rev B. Using MCUXpresso IDE, developed small LED code to glow LED as RED P_0_29. Verified that code in IDE and generated the bin file using the below command in IDE. 

arm-none-eabi-size "${BuildArtifactFileName}"
arm-none-eabi-objcopy -v -O binary "${BuildArtifactFileName}" "${BuildArtifactFileBaseName}.bin"
checksum -p ${TargetChip} -d "${BuildArtifactFileBaseName}.bin"
arm-none-eabi-objcopy -I binary -O ihex "${BuildArtifactFileBaseName}.bin" "${BuildArtifactFileBaseName}.hex"

Step 2 :

---------

      - Connected LPC5411x UART pin with USB-TTL. From my PC, opened the COM port using RealTerm serial application and sent the following sequence.

- Put the LPC in ISP mode

- Sent "?\r\n" -> Received "Synchronized"

- Sent "Synchronized" -> Received "Ok"

- Sent "J\r\n" -> Received the proper Device ID. 

- Copied the generated .bin file MCUXpress to my PC local directory. 

- Sent "W 536870912 14224" -> Write at RAM address 0x2000 0000(SRAM0 - start address) bytes - 14224. 

         -> Received "0"

-> Uploaded the bin file 

-> Sent "R 536870912 14224" -> Able to read the content that i have uploaded. 

-> Sent "U 23130" -> Received "0"

-> Sent "G 536870912 A" -> No response and the code is not getting executed. 

I tried with SRAM1 start address as well. Same observation. 

The same code is working in MCUXpress. Am i missing somethings? Please share your thoughts/inputs. 

Labels (1)
0 Kudos
12 Replies

2,066 Views
seku
Contributor I

Hi Alice,

I have used the SRAM address (0x2001_0000) in the Real term terminal to load the *.bin file and initiated the Go command. The code is executed successfully. 

Now I am following the same sequence in c code from IMX8M host. It is not working . I am debugging the same.

Thanks,

Senthil

0 Kudos

2,066 Views
seku
Contributor I

Hi Alice,

I have tried the below from my host (IMX8M Mini). 

root@imx8:~# echo -e -n "?" > /dev/ttymxc2
root@imx8:~# echo -e -n "Synchronized" > /dev/ttymxc2
root@imx8:~# echo -e -n "J" > /dev/ttymxc2
root@imx8:~# echo -e -n "J" > /dev/ttymxc2

If I pass the single command in the echo as mentioned above, I could see the results but for the below commands, always receiving "1" output and that indicating "INVALID ISP command"


root@imx8:~# echo -e -n "U 23130" > /dev/ttymxc2

root@imx8:~# echo -e -n "W 536936448 14240" > /dev/ttymxc2

Not sure why LPC responds "1" for U and W command. 

Thanks,

Senthil

0 Kudos

2,066 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Senthil,

I use the  Flash Magic Terminal to test,  the "U" and "W" commands can work well:

pastedImage_2.png

It can communicate well with Real term terminal  on PC, meaning there is no problem in LPC54114,

I don't know IMX8M Mini well, about this product, you can ask on I.MX thread:

i.MX Processors 

Hope it helps,

Alice

0 Kudos

2,066 Views
seku
Contributor I

Hi Alice,

Unfortunately my project has some build issues. I cannot share at this moment. However I can live with the demo led_blink hex file.

Can you please point out the right SRAM address to load the file through Realterm and verify through Go command. So that I will use that SRARM address in my c code to program the LPC from host (IMX8M Mini)

Thanks,

Senthil

0 Kudos

2,066 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Senthil Kumaresan,

First of all, I recommend you using Flash Magic download your hex file, check whether it can work well.

Thus we can confirm the ISP mode and hex file can work well.

Then check the commands.

Please let me know the result using Flash Magic. If it also not work, how about a simple hex file, or you can send

your hex file to me , I will test it on my side.

Hope it helps,

BR

Alice

0 Kudos

2,066 Views
seku
Contributor I

Hi Alice,

Thanks for the reply.

I have downloaded the flash magic and programmed my hex file. The programming is done but the verification is getting failed. Not sure what is the reason. Attached the screen shot for reference and also my hex file. 

Thanks,

Senthil

FM_2.jpg

0 Kudos

2,066 Views
seku
Contributor I

Hi Alice,

I have chosen the Erase blocks used by firmware option. Now I did over cover the verifying error. The programming has been finished. However after reset, the code is not executing, the LED is not glowing in RED.

My code is just glowing the LED in RED (P_0_29)

Thanks,

Senthil

FM_3.JPG 

0 Kudos

2,066 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Senthil,

Your .hex file really can't work, please test my attachment.

Hope it helps,


Have a great day,
TIC

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

0 Kudos

2,066 Views
seku
Contributor I

Hi Alice,

I will try the attached one. Can I know the reason why my hex file will not work?

Thanks,

Senthil

0 Kudos

2,066 Views
seku
Contributor I

Hi Alice,

I could see your hex file is working in flash magic. Please let me know the difference between yours and mine because I have generated through MCUXpresso IDE. 

I want to test my hex file in LPC. Please share your inputs.

Thanks,

Senthil

0 Kudos

2,066 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Senthil Kumaresan,

The hex file I send you just a SDK demo.

What about your project? Does it can work well when debug mode ? You can send your project to me ,

I will check it on my side.

BR

Alice

0 Kudos

2,066 Views
seku
Contributor I

In addition that, if I need to use to realterm terminal , which is the right RAM address to load the binary file and verify in the RAM itself before programming in to the flash. 

0 Kudos