Hi,
I'am trying to Reinvoke ISP UART0 from IAP with no success.
ECRP say ISP and IAP mode are authorized.
The function Reinvoke is called and doesn't return (no error).
But the ISP tested with FlashMagic doesn't respond.
The bootloader is called, because if i set the ISP0 pin to low level, it's Ok.
But my need is to go in ISP mode without open the box and put the pin to ground.
Why when calling IAP with ispmode=6 the UART doesn't work ?
Does anyone have any advice ?
Thanks, Philippe
Hello @gph
I highly recommend you refer to:
https://community.nxp.com/t5/LPC-Microcontrollers/Problem-with-ReinvokeISP-on-LPC54618/m-p/1351500
Please contact me if still have issue. Thank you.
BR
Alice
Hello @gph
Can UART PORT function properly with the ISP pin?
If yes, please share your project and steps. I'd be glad to help you review them.
Thanks!
BR
Alice
Hi,
Yes with ISP pin it's working well.
I can't post all project. But here after related things.
Electronic part :
Code part :
function called after reset and initialisation who start ISP if tag present in eeprom.
static void ISPCheck(void)
{
uint8_t isp[3]={'?','?','?'};
uint32_t st=0;
uint8_t ispmode=6U;
if(E2P_I2C_Read(EP2_ISPADDRESS, isp, sizeof(isp))==kStatus_Success)
{
if(isp[0]=='I' && isp[1]=='S' && isp[2]=='P')
{
LED_J_Set(false);
isp[0]='?';
isp[1]='?';
isp[2]='?';
E2P_I2C_Write(EP2_ISPADDRESS, isp, sizeof(isp));
//delayms(100);
//CLI_DirectPrintLine("!!! MODE ISP !!!");
USART_Deinit(FLEXCOMM0_PERIPHERAL);
//delayms(100);
//__disable_irq();
GPIO_PinWrite(GPIO, 0, 4, 0);
delayms(100);
IAP_ReinvokeISP(ispmode, &st); // Ne retourne pas si OK
CLI_DirectPrintLine("ISP : Fail !");
}
// else
// CLI_DirectPrintLine("ISP : No request");
}
else
CLI_DirectPrintLine("ISP : Read Error");
}
Hello @gph
I reviewed the content you shared。
I recommend debugging the code step-by-step to check the value of the variable ispmode
before calling IAP_ReinvokeISP(ispmode, &st)
.
Additionally, use logic analysis to measure the signals on UART0 TX/RX and verify their integrity.
I also suggest you testing the demo first via the link below:
BR
Alice