I have a board with the LPC11U24 chip which I am trying to use the USB rom CDC example (nxp_lpcxpresso_11u14_usbd_lib_cdc).
I get a hard fault when calling the USBD_API->hw->Init().
I used the lpcopen_v2_00a_lpcxpresso_nxp_lpcxpresso_11u14 version just changing the chip to LPC11U24 as suggested in the forum.
I also used other LPC OPEN versions with the same results. The board has a 12MHz crystal like the example code.
How can I find the problem?
Is there non rom USB code available that also can work?
Is there any other LPC11U24 initialization that need to be changed or added to the LPCU14 ?
Do you use NXP LPC11U24 demo board test ?
LPC11U24 just has larger SRAM than LPC11U14, and has eeprom. All other peripherals are the same, so the driver lib is the same. LPC11U24 is backward-compatible with LPC11U14.
So you can use LPC11U14 LPCOpen code for LPC11U24.
Have a nice day,
This is good to know. This is a small LPC11U24 based custom board.
I used the USB CDC example as is which looks good but it gives a hard fault upon USB ROM initialization.
/* USB Initialization */
ret = USBD_API->hw->Init(&g_hUsb, &desc, &usb_param);
I do not have much to go on.
What could be the prblem or ways to find out what the problem is?
I have verified USBD_API->hw->Init hard fault on my LPC11u24 demo board. it works. Is there any error code returned?
If you didn't change code, the problem may on your board. please check your USB hw design and clock setting. you need to use a USB monitor to check if the command is successful sent and if any response is received for MCU side.