LPC804 ISP communication error

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

LPC804 ISP communication error

Jump to solution
2,520 Views
phatpaul
Contributor III

LPCXpresso804 dev board with LPC804M101JDH24

I'm having trouble to communicate with the ISP bootloader on the LPC804. 

I have tried FlashMagic versions 13.45 and 11.2.  I also tried lpc21isp 1.97, lpcisp 1.07, and lpcprog 1.07 (from lpctools package) on Ubuntu 20. 

I have tried on 2 of the same model dev board with the same results.  SWD debugging works fine on one board.  SWD is disabled on the other dev board b/c I set CRP2 (and I am trying to unsecure it with a mass-erase).

Of course I've tried different baud-rates from 9600 to 256000.  The bootloader is definitely there because I get the 'Synchronized' response after sending a '?' using TeraTerm.  But I can't get any further in the sync process.

I have the LPCXpresso804 dev board connected via USB and have verified UART comms with the PC (tried both Win10 and Ubuntu 20) using the on-board USB-serial bridge/debugger (LPC11U35FHI33).

I scoped the serial lines with a logic analyzer and see that the bootloader does respond with 'Synchronized' after the host sends '?'.  But then the bootloader doesn't wait for the host to reply with 'Synchronized', instead it echos 'S' before the host has a chance to send the string.

I'll follow-up with some error traces.

lpc21isp trace:

Spoiler
paul@mastershake:~$ sudo lpc21isp -detectonly -debug5 /dev/ttyACM0 9600 1
Turn on debug, level: 5.
lpc21isp version 1.97
COM-Port /dev/ttyACM0 opened...
Synchronizing (ESC to abort).Sending '?'
Read(Length=1): 'S'
Read(Length=1): 'y'
Read(Length=1): 'n'
Read(Length=1): 'c'
Read(Length=1): 'h'
Read(Length=1): 'r'
Read(Length=1): 'o'
Read(Length=1): 'n'
Read(Length=1): 'i'
Read(Length=1): 'z'
Read(Length=1): 'e'
Read(Length=1): 'd'
Read(Length=1): '(0D)'
Read(Length=1): '(0A)'
Answer(Length=14): 'Synchronized(0D)(0A)'
StrippedAnswer(Length=14): 'Synchronized(0D)(0A)'
OK
Sending 'Synchronized(0D)(0A)'
Read(Length=1): 'S'
Read(Length=0): ''
Answer(Length=1): 'S'
No answer on 'Synchronized'

 lpcprog trace:

Spoiler
paul@mastershake:~$ sudo lpcprog -d /dev/ttyACM0 -b 9600 -c blank -t
Serial device : /dev/ttyACM0
Command : blank
Sending 1 octet(s) :
00000000 3f |?|
Received 14 octet(s) :
00000000 53 79 6e 63 68 72 6f 6e 69 7a 65 64 0d 0a |Synchronized..|
Sending 14 octet(s) :
00000000 53 79 6e 63 68 72 6f 6e 69 7a 65 64 0d 0a |Synchronized..|
Received 1 octet(s) :
00000000 53 |S|
Unable to synchronize, synchro not acknowledged.
Sending 3 octet(s) :
00000000 4a 0d 0a |J..|
Received 1 octet(s) :
00000000 4a |J|
Received 0 octet(s) :
Error reading part ID.
Sending 3 octet(s) :
00000000 4a 0d 0a |J..|
Received 1 octet(s) :
00000000 4a |J|
Received 0 octet(s) :
Error reading part ID.
Unable to connect to target, consider hard reset of target or link
Tags (2)
0 Kudos
1 Solution
2,445 Views
phatpaul
Contributor III

Hi Alice,

I was not able to access the link you provided (Access Denied).  But I searched for instructions to update the debugger and found it.

Seems the issue is described here: https://community.nxp.com/t5/LPC-Microcontrollers-Knowledge/LPCXpresso804-board-OM40001-on-board-deb...

LPCXpresso804 board has a on-board debugger developed with LPC11U35. Old batches of the board uses the old firmware for LPC11U35 debugger.

The old firmware has some issues such as that when you send a string through the debug COM port the LPC804 only can receive the first byte.

The solution is easy. We can download the newest firmware for LPC11U35 and update the firmware for LPC11U35.

That may describe what I was seeing.  When I sent the "Synchronized" string, the target only responded with 'S'.

After updating the debugger using the instructions given in that link, I'm able to use FlashMagic now.

BTW, I don't have to "always press the ISP button."

Thanks for you help.  It's a shame that NXP is still selling these old broken dev boards and the instructions to fix it is not easy to find.

View solution in original post

8 Replies
2,450 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello phatpaul,

There is really some different with other LPC chips when enter ISP mode.

We need always press the ISP button. I test on my side, it works well, please see my attachment.

Please try on your side, if still can't work, update the firmware of on board debugger lpc11u35, about detail refer to:

https://community.nxp.com/t5/LPC-Support/Update-the-firmware-of-the-LPC800-via-ISP-mode/ta-p/1105041 

 

BR

Alice

 

2,446 Views
phatpaul
Contributor III

Hi Alice,

I was not able to access the link you provided (Access Denied).  But I searched for instructions to update the debugger and found it.

Seems the issue is described here: https://community.nxp.com/t5/LPC-Microcontrollers-Knowledge/LPCXpresso804-board-OM40001-on-board-deb...

LPCXpresso804 board has a on-board debugger developed with LPC11U35. Old batches of the board uses the old firmware for LPC11U35 debugger.

The old firmware has some issues such as that when you send a string through the debug COM port the LPC804 only can receive the first byte.

The solution is easy. We can download the newest firmware for LPC11U35 and update the firmware for LPC11U35.

That may describe what I was seeing.  When I sent the "Synchronized" string, the target only responded with 'S'.

After updating the debugger using the instructions given in that link, I'm able to use FlashMagic now.

BTW, I don't have to "always press the ISP button."

Thanks for you help.  It's a shame that NXP is still selling these old broken dev boards and the instructions to fix it is not easy to find.

1,114 Views
jrevans
Contributor III

This was the same issue that I was seeing.  The LPC804 Dev Board would enter ISP mode just fine via my PuTTY serial terminal session, but Flash Magic and my own C program would not work properly, most often responding only with an 'S' when I sent the "Synchronized" string.

I too was not able to access the link @Alice_Yang provided (Access Denied), but the link that @phatpaul provided directed me to the instructions and ZIP file.  I followed the directions and installed the new firmware.bin and now FlashMagic works. 

Here is what I did:

  • I unzipped the file from that link into: LPC11Uxx-Debug-Probe-VCOM
  • I unplugged the dev board and ran the LPC11Uxx_Debug_Probe_VCOM_v1.0.0.EXE program which installed a device driver.
  • I held down the RST button and plugged in the LPC804 dev board and a CRP_DISABLED drive appeared as the instructions said.
  • I deleted the firmware.bin file from there, and copied in the new firmware.bin file from the ZIP file.
  • I then ejected the drive through Windows and then unplugged and replugged the dev board.
  • After than the LPC804 Dev Board now responded to Flash Magic.

This problem was driving me crazy last week and I wouldn't have guessed that I had to update the debugger firmware to fix it!

0 Kudos
2,507 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello phatpaul,

How about use the function in GUI of Flash Magic? 

Alice_Yang_0-1639101966993.png

 

BR

Alice

 

0 Kudos
2,493 Views
phatpaul
Contributor III

Hi Alice, thanks for your response.

As I said in my original post, I have tried FlashMagic versions 13.45 and 11.2. But I get various errors like Synchronization failed, or communication error.  The FlashMagic debugging output seems to be a proprietary binary format, so I didn't post it here.

Can you confirm that it works for you with FlashMagic on the LPCXpresso804 dev board?

-Paul

0 Kudos
2,484 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Paul,

I meaning use the buttons on GUI, not command , I will test on my side tomorrow.

 

BR

Alice

0 Kudos
2,467 Views
phatpaul
Contributor III

Alice,  I've tried the Flashmagic GUI already.  Does it work on your end?

0 Kudos
2,459 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello,

I will take a video for you tomorrow,  Flash Magic in Windows, please wait me a moment, thanks.

 

BR

Alice

0 Kudos