HI,
I followed the UM11071 on page 36 to Reinvoke ISP in USB Mode(4.6.8)but it does not work.
Do I need to add others code to make it work.
I used the lpcxpresso51u68_dev_hid_generic_freertos example and the LPCXpresso board for LPC51U68
I am able to pass the Cmd 57 and param0 = 2 from my application
the changes are in
USB_DeviceHidGenericCallback function in hid_generic.c
Thanks.
I am using usb_device_cdc_vcom_lite example and the following codes work.
USB_DeviceStop(s_cdcVcom.deviceHandle);
BOARD_BootClockFROHF48M();
command[0] = 57;
command[1] = 2; // 2: USB
((IAP_ENTRY_T)FSL_FEATURE_SYSCON_IAP_ENTRY_LOCATION)(command, result);
Hi Seow Woo,
Could you print the status_result[0] below the function? This will help us to know if the command was executed correctly.
Also print the command_param[0] and command_param[1] to know exactly which commands are you using.
Best Regards,
Alexis Andalon
Hi Alexis,
I made the printf but I am making use of fsi_iap.c - IAP_ReinvokeISP API. The function iap_entry(command, result)never return to
*status = translate_iap_status(result[0]);
Thanks.
Hi Alexis,
when I used the iap_flash example. the IAP_ReinvokeISP API works but I need to comment out the
//__disable_irq();
But I need to use the dev_hid_generic_freertos example to enter IAP_ReinvokeISP API . looks like need to do other setting for USB HIB before calling IAP_ReinvokeISP. Can help to find out why?
Hi Seow,
The USB API's are in ROM and I suspect the transfer data from the host could cause problems while changing to ISP mode cause this mode also initialize the USB module.
Could you try disabling the USB module before Reinvoke ISP function?
Best Regards,
Alexis Andalon
Hi Alexis,
How to do
"Could you try disabling the USB module before Reinvoke ISP function?"
Thanks.
Hi Seow,
Please take a look to this functions:
Best Regards,
Alexis Andalon
Hi Alexis,
i tried all of these functions
USB_DeviceDeinit(g_UsbDeviceHidGeneric.deviceHandle);
USB_DeviceStop(g_UsbDeviceHidGeneric.deviceHandle);
NVIC_DisableIRQ(USB0_IRQn);
before I call
IAP_ReinvokeISP(2, &status);
The result is the same, I cannot go into USB MSC boot mode. and USB not recognized
what is the USB PID and VIP for the USB MSC boot mode?
Hi Seow,
Could you try first using the StopFunction and after that using the deinit function? Also you could try using the USB_DeviceClassDeinit(uint8_t controllerId) to deinit the stack.
Best Regards,
Alexis Andalon