I want to simulate UART ISP on an Olimex Eval Board because the target hardware is not ready.
The target will use an LPC1313 and therefore ISP will be on the UART.
The Olimex Eval Board has an LPC1343 with the USB boot mode pin strapped high.
This cannot be changed.
So I wrote code to reinvoke ISP via the IAP command in the reset handler.
However, the part goes into USB mode ISP, and not UART.
How can I make the device enter UART ISP?
NB: The ISP checksum of my code is correct.
My Code:
movs r0, sRam ; r0 --> 0x10000000
adds r1, r0, 0x20 ; r1 --> 0x10000020
sub sp, 32 ; set stack (IAP friendly)
movs r2, 57 ; IAP command: Reinvoke ISP
str r2, [r0] ;
ldr r3, =0x1FFF1FF1 ; IAP entry point (thumb bit)
bx r3 ; IAP(r0, r1)
Cheers, Mike.
Did you actually READ ALL of the original post? I know full well that the level on Port 0.3 selects between UART and USB mode,
THAT is the problem in a nutshell.
What [1] NXP engineer put the VBUS function on the same pin as the USB/UART pin-strap?
For a bus powered system it is IMPOSSIBLE to pull this pin to ground! That would short out the USB power pins
and, moreover would de-power the device so ANY boot function would fail. See the schematic attached.
Please, I would like a proper solution to invoking the UART ISP mode on a bus powered system with this device.
Perhaps, someone at NXP with access to the LPC1343 version 5.2 boot ROM source code could provide
an address to jump to that is after the test for port 0.3 low and will begin the UART mode ISP.
I really have not got either the time or the inclination to disassemble the boot ROM code myself.
[1] Insert you own adjective here.
Regards, Mike
In your schematic I see there is a 1k resistor (R9) between USB_VBUS and PIO0_3. This will limit the extra current drawn from VBus to 5 mA when you short P0_3 to gnd. That should not be a problem if you want to experiment with UART ISP.
Hope this helps
In addition to the valid solution which Rene suggested, there is also a software hack available.
You could use for your benefit what tons of people have done wrong by accident: Disconnect the digital input stage of the I/O pin! Right before calling the IAP_Reinvoke_ISP function, write 0x00000000 to the IOCON_PIO0_3 register. Then regardless of the actual voltage at the PIO0_3 pin, the boot code will always read it as 0, and should enter UART instead of USB mode.
Hi,
After execute the Reinvoke ISP command, the state of the PIO0_3 determines whether the UART or USB interface will be used.
Have a great day,
Ping
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------