Dear LPC tech support,
Customer name: Versalogic
Please refer to the attached email for reference.
I also have additional questions:
1) Base on table 80, there is no way to reinvoke via IAP method to do a perform a bootloader via USB0/1 with DFU option. However can you manually force a jump to a vector and also change the stack pointer so you can still reinvolk the bootloader to execute via t he USB0/1 with DFU option?
2) If possible can you provide the code snippet to perform that jump?
Regards,
hy
According to Amish,
We have some interesting good news.
For some unexpected reason, the UM for LPC546xx did not mention USB DFU capability using reinvoke ISP command even though the ROM supports it.
Tom has validated this for both (usb0 and usb1) and it is working.
We will update the User Manual right away.
Thanks.
Byte offset | Description |
0 | 00 – Normal 0x55 – Retain clk/pin settings[1] 0xAA – ALT mode select[2] (Selects USB DFU mode) |
1 | ISP type selection: 0: Auto-detect 1: I2C of Flexcomm 1 4: SPI of Flexcomm 3 6: UART of Flexcomm 00 – AUTO DETECT 8 – USB0 [3] 9 – USB13 Others: reserved |
2 - 6 | Reserved, must be 0. |
7 | Check value: XOR of the 7 preceding bytes |
[1] - Only applicable for I2C0 and SPI0 interfaces (not applicable when auto detected)
2 - Applicable only for USB0 and USB1 interfaces
3 - USB0 and USB1 will enter Mass storage class ISP mode when Misc Cfg is not 0xAA
[1] Only applicable for I2C0 and SPI0 interfaces (not applicable when auto detected)
[2] Applicable only for USB0 and USB1 interfaces
[3] USB0 and USB1 will enter Mass storage class ISP mode when Misc Cfg is not 0xAA
Hy,
There is another possible that user can do is set the ISP pins state to USB0 DFU, then allow code to jump to bootrom starting location @0x407D with global interrupt disabled, clear all pending interrupts, clear all interrupts, reset all peripherals that are used in application, and set stack to 0x20028000.
Regards,
TsiChung
Hi Tsi,
Thanks for the finding!.
Yes it can buy setting PC and SP, but we don't suggest to let customer do that way because those 0x407D and 0x20028000 are not documented on UM.
Hi,
1. For LPC55xx the USB DFU update is no longer exsit. replaced by HID/hlbost system.(actually the ROM code arch. is changed and all APIs are changed.)
2. There is no API for reinvoke, the jump will also not work since we don't know the ROM first function entry address. but you do a software reset to let MCU to rebot to enter ROM.