ISP Command manual bugs

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

ISP Command manual bugs

2,933 Views
mark_stokes
Contributor II

I've written a Windows program that will download firmware code from .hex (converted to bin) and into our device.  In doing this project, I noticed these errors? in the manual.  Not sure they are errors, but wanted to put them down to see what the experts think.

Writing to RAM w/ ISP/IAP command ('W')

1. When using the “Write to RAM” Command, the datasheet (UM10800.pdf) shows on page 372 under section 25.6.1.4 that the proper sequence is:

1. Write command to uC ("W [Address] [length]")

2. uC replies with result of command request (CMD_SUCCESS hopefully)

3. Write the data to be written to the RAM

4. When complete, the uC will reply with “OK\r\n”.  <-- This does not happen.

When using this command, it is fairly clear that I’m using the command correctly (by not waiting for “OK” since it never happens) because when I issue the next command it works just fine.  Indicating to me that the internal state machine is in the proper state.  Namely, the ready_to_receive_command or whatever and not in the still_accepting_RAM_data state, etc.

 

When restarting after the code is completely copied and CRC checked (yes, including FLASH from 0x00 to 0x01FF), I issue the Go command.  The datasheet says I can't use an address lower than 0x0200.  This is incorrect as I am issuing the command "GO 0 T" and it's working just fine.  Is this ok?  Do I need to write a little booter program to put in flash that loads the stack pointer and then updates the PC to the value at 0x0004?  Seems like a lot of work if the actual command seems to work.  I have read in other places on this forum where this seems to work for some uC's and not for others.  Was there an update?

Thanks

-Mark

Labels (1)
0 Kudos
Reply
5 Replies

1,901 Views
schoeler
Contributor I

Hi Mark,

I have seen exactly what you have seen during development of a mechanism to program the LPC over UART from another microcontroller using the ISP interface.  I asked a similiar question a while back here: LPC 822 ISP Write to RAM echoes correctly, but OK response never received! 

So I do believe it's a bug that needs to be added to the errata on the datasheet.

Regarding your second question, my understanding is that on boot PC initializes to address 0, and the built in bootloader runs a checksum against data contained within the user code memory boundaries.  If it fails, or there is nothing there, the LPC enters ISP mode.  I would think this would be the preferred method of restarting the LPC if you don't have the ability to flip the reset pin externally.

Hope that helps.

Ben

0 Kudos
Reply

1,900 Views
mark_stokes
Contributor II

An even more confusing result:

FlashMagicSig.jpg

-Mark

0 Kudos
Reply

1,901 Views
mark_stokes
Contributor II

Actually a good question.  One that would be nice to know there's a difference!  I got these replies:

Echo On:
Send: 'K'4B 0D 0A
Recv: 'K'4B 0D 0A '0'30 0D 0A '1'31 0D 0A '1'31 '3'33 0D 0A

Echo Off:
Send: 'K'4B 0D 0A
Recv: '0'30 0D 0A '1'31 0D 0A '1'31 '3'33 0D 0A

Problem is, neither of these match the reply the user manual says I should be getting, which is a simple Command reply plus the two bytes for Major and Minor version followed by the CRLF (25.6.1.12 (user manual): "CMD_SUCCESS followed by 2 bytes of boot code version number in ASCII format. It is to be interpreted as <byte1(Major)>.<byte0(Minor)>.")

So, in answer, I don't know.  It looks like Major is 1 and Minor is 3.  But the part "'1'31 0D 0A" doesn't make any sense.  It's like it replied to the request twice.  But that would mean the first '1' is an Invalid command reply.

Or, do I interpret that as Major: 1 Minor: 13 ?

-Mark

0 Kudos
Reply

1,901 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Mark,

Thanks for your reply.

I'd like to recommend you to get the information about the MCU via Flash Magic tool, please go to download the tool via the link below.

Flash Magic - Welcome 

You can get the these information via following sequence.

屏幕截图.jpg

Fig 1

2017-03-03_16-14-25.jpg

Fig 2


Have a great day,
Ping

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

0 Kudos
Reply

1,901 Views
jeremyzhou
NXP Employee
NXP Employee
Hi Mark,
Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
I need to know the more information.
I was wondering if you can tell me the Boot code version via Read Boot code version command.
I'm looking forward to your reply.
Have a great day.

Ping

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

0 Kudos
Reply