LPC1549 CAN ISP

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

LPC1549 CAN ISP

1,714 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by tapgar on Mon Apr 28 08:51:04 MST 2014
I am using Flash Magic to flash LPC1549 over CAN.  It looks like everything is working correctly in Flash Magic except for writing to RAM.

In the LPC15XX data sheet it says -
"SDO block transfer mode is not supported."

However under the Write to RAM section it says -
"Set RAM write address by writing to [0x5015, 0]. Then write the binary data to [0x1F50, 1].
Since this is a DOMAIN entry, the data can be continuously written."

Here is the CAN traffic while monitoring a write to RAM in Flash Magic.

067D  8  21 50 1F 01 00 04 00 00
05FD  8  60 50 1F 01 00 00 00 00 - first write message successful
067D  8  00 13 44 58 1A 70 47 00
05FD  8  80 50 1F 01 04 00 00 0F - error message SDOABORT_SRC_ADDR_NOT_MAPPED

Since SDO block transfer is not supported should the second message include the SDO register to write to (0x1F50, 1)?
Labels (1)
0 Kudos
11 Replies

1,516 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by tapgar on Tue May 06 04:21:27 MST 2014
Works!
Thanks everybody for your help.

Taylor
0 Kudos

1,516 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Andy ESAcademy on Tue May 06 03:41:13 MST 2014
Please give version 7.85 a try and report back. Thanks.

Andy
0 Kudos

1,516 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Wouter on Fri May 02 15:09:00 MST 2014
Thanks for the clarification tcomins! Now I understand the issue :)

I just gave it a quick try myself, and am indeed not able to program the LPC1549 over CAN using Flash Magic. I assume indeed the LPC1549 CAN algorithm is a copy of the LPC11Cxx and they forgot to update the RAM address.

I've forwarded the issue to the Flash Magic team, I'd expect an update to be released soon.

Tapgar, thanks for bringing this issue to our attention!

Regards,
Wouter
0 Kudos

1,516 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Fri May 02 07:11:15 MST 2014

Quote: tcomins
The problem is that FlashMagic isn't able to program the FLASH correctly.

Why is FlashMagic trying to use an invalid address? What can be done to fix this problem?



He should log the CAN traffic to show the complete Flash Sequence (Select RAM address, SDO download ...).

This log is showing which address is used. If FlashMagic setup is correct (MCU= LPC1549) it's obviously a software problem and he should report that to FlashMagic.

http://forum.flashmagictool.com/index.php?board=13.0

Perhaps this 1549 Flash sequence is a copy of the 11C1X sequence and this RAM address is still an 11C1X address?



0 Kudos

1,516 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by tcomins on Fri May 02 06:43:44 MST 2014
tapgar is trying to use FlashMagic to program the LPC1549 via CAN ISP with a PEAK USB-to-CAN adapter.

[list]
  [*]A CAN transceiver is connected to the LPCXpresso board and it is working fine.
  [*]The LPC1549 goes into CAN ISP mode without any issues.
  [*]There are no problems reading memory via FlashMagic using CAN.
[/list]

The problem is that FlashMagic isn't able to program the FLASH correctly.

Why is FlashMagic trying to use an invalid address? What can be done to fix this problem?


0 Kudos

1,516 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Thu May 01 15:17:09 MST 2014

Quote: tapgar
I am still having a hard time finding out where that start address is coming from. 



I'm not sure what you are trying to do. Usually RAM is used to store data before they are flashed.

Therfore SDO download is selecting a correct RAM address. This address is no correct RAM address.

If SDO Download is started after setting this address this download will fail, of course.

What's not clear there?

BTW: 0x10000300 is a valid RAM address for LPC11Cxx...
0 Kudos

1,516 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by tapgar on Thu May 01 14:45:09 MST 2014
Thanks Wouter,

I am still having a hard time finding out where that start address is coming from. 

Here is the first line of my Hex file -
:10100000004000026F110000391100003B11000088
Start code - :
Byte Count - 0x10
Address - 0x1000
Record type - 00
Data - 004000026F110000391100003B110000
Check sum - 88

So I am confused why flash magic is starting at 0x10000300.  Any ideas?

Thanks again!
0 Kudos

1,516 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Wouter on Mon Apr 28 14:49:00 MST 2014
Hi Taylor,

Address 0x10000300 is not SRAM for the LPC1549, it's reserved memory...

You may want to try again at a valid SRAM addrees. Also keep in mind the ISP requires some RAM:
USB and C_CAN ISP commands use a fixed on-chip RAM location from 0x0200 0100 to
0x0200 09E4. The user could use this area, but the contents may be lost upon reset.
Flash programming commands use the top 32 bytes of on-chip RAM. The stack is located
at RAM top - 32 bytes. The maximum stack usage is 256 bytes and grows downwards.
Memory for the UART ISP commands is allocated dynamically.

Regards,
Wouter
0 Kudos

1,516 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by tapgar on Mon Apr 28 13:58:48 MST 2014
Thanks for the quick response!

I am writing to RAM address 0x10000300 - here is the CAN message:
067D  8  23 15 50 00 00 03 00 10
05FD  8  60 15 50 00 00 00 00 00

Why is this the wrong address?
0 Kudos

1,516 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by tcomins on Mon Apr 28 13:31:27 MST 2014
It's not clear how to resolve this issue. Any suggestions on where/how to fix the incorrect source address?
0 Kudos

1,516 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Mon Apr 28 10:02:12 MST 2014

Quote: tapgar
Since SDO block transfer is not supported should the second message include the SDO register to write to (0x1F50, 1)?



No    :O

See: http://www.lpcware.com/content/forum/lpc11c24-can-bootloader-assistance

Your problem is a wrong (RAM) address  :)

That's not little-endian...

SDOABORT_[color=#f00]SRC_ADDR_NOT_MAPPED[/color]

BTW: That's called 'segmented transfer'...

See: http://www.can-cia.org/index.php?id=152
0 Kudos