I am invoking iap_entry to force it into ISP mode using UART 0, regardless of the ISP0/1/2 pin state. I use ISP_ReinvokeISP provided in fsl_iap.h with these arguments:
uint32_t status = 0;
IAP_Reinvoke(1, &status); // Argument 1 as 1 forces booting into ISP UART mode according to documentation
However, this always fails with status = ERR_ISP_REINVOKE_ISP_CONFIG
This is on a LPC51U68 using the LPCXpresso demo board. I do have UART clocks enabled at this time.
Does this processor support iap_entry to boot into ISP mode? Or are there other conditions I need in place before calling ISP_ReinvokeISP?
Hello Joe Holiday ,
I have checked your code, please change your IAP_ReinvokeISP function as below:
void IAP_ReinvokeISP(uint8_t ispType, uint32_t *status)
{
uint32_t command[5], result[5];
uint8_t ispParameterArray[8];
command[0] = kIapCmd_FLASHIAP_ReinvokeISP;
/*
memset(ispParameterArray, 0, sizeof(uint8_t) * 8);
ispParameterArray[1] = ispType;
ispParameterArray[7] = ispParameterArray[0] ^ ispParameterArray[1] ^ ispParameterArray[2] ^ ispParameterArray[3] ^
ispParameterArray[4] ^ ispParameterArray[5] ^ ispParameterArray[6];
*/
command[1] =ispType;
iap_entry(command, result);
*status = translate_iap_status(result[0]);
}
Have a great day,
TIC
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Hi ,
I am using the same IAP_ReinvokeISP but I want to use the USB = 2. but it cannot recognize the usb device. I was using the lpcxpresso51u68_iap_flash example.
I just added
PRINTF("\r\nIAP_ReinvokeISP\r\n");
IAP_ReinvokeISP(2, &status);
if (status != kStatus_IAP_Success)
{
PRINTF("\r\nReinvoke ISP failed\r\n");
}
I would like to use the drag and drop method just like when I press the ISP0 button on the LPCXpresso board but using the IAP_ReinvokeISP with param = 2
Thanks.
Hello Joe Holiday,
From the user manual of lpc51u68, it support "Reinvoke ISP " command,
could you please send your project to me , then I can reproduce the problem on my side,
and check it .
BR
Alice