Hi,
on my last project, I tried to enter the LPC51U68 in USART0 ISP Mode by invoking the function IAP_ReinvokeISP. USART 0 is routed to PIO0_0 and PIO0_1 and configured inside BOARD_InitBootPeripherals(); function.
Here below the code I add to my application, that isn't working.
I tryed the ispType 0, 1, 4, 8 wit same result, the function returns always error 10228 (0x27f4)
I tryed also using ISP pins and connecting USART0 to external serial, and ISP answer right to command "?" (0x3f)
Where I wrong?
Could help me to solve this issue?
Many thank
Abele Barbieri - Italy
Hello @abele_barbieri
The parameter for selecting the ISP mode is set as 1, which represents USART.
Please note that you should enable the clocks for the default USART RXD and TXD pins before calling this command.
BR
Alice
Many thanks Alice for the quick reply
The UART0 (as I writed) is configured and activated BEFORE invoking the function. I tried further tests, and I discovered that the IAP_ReinvokeISP seems "wrong" in the project where I need to enter ISP by user code (this project is several years old)
I tried in new project, and it works fine. Here below the "upgraded" IAP_ReinvokeISP that I have found in fsl_iap.c file
Using this versione It work also on this old project.
A further important question:
the board that need to program via ISP has only the UART0 RX & TX signals ruoted the ISP host board (that perform the programming), and we heve no chance to power off o reset the target board to restart it.
There is an ISP command that can be sent to target to force "exit" from ISP mode at end of programming?
Abele Barbieri
Thanks Alice
This means that I has to know what the address of reset code, in other words, where is locate the ResetISR() startup function?
I'm sorry Alice, but if I invoke the "GO" command with address 0 the board never restart
Thne, I have "sniffed" the comunication at end of Flash Magic, an here below the result
Seems the GO is on RAM address ... could you help me about?
Hello Alice,
I tried to send "G" command using Flash Magic as you said ...
Here below the test I made, but the target don't restart
If I try as here, the target restarts. It seems that needs to load a code into RAM and then send G command to this area. Could you verify and send me more details about this behaviour and how I can integrate it on my code?
Thanks
Abele