LPC11U24 USB USBD_API->hw->Init hard fault

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC11U24 USB USBD_API->hw->Init hard fault

2,024 Views
kiryat8
Contributor III

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 ?

Thanks

Labels (3)
0 Kudos
9 Replies

1,966 Views
andarm
Contributor II

Why we can not find the implement of "USBD_API->hw->Init"?  Dose it is NXP's private library function? 

0 Kudos

1,901 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

You can't see source code of this function. This is USB ROM API.

For detail, see description of USBD_HW_API in UM, Chapter 10: LPC11U3x/2x/1x USB on-chip drivers

 

Best Regards

Jun Zhang

0 Kudos

1,994 Views
kiryat8
Contributor III

I will forward this to our hardware engineer and get back to you.

Thanks David

0 Kudos

2,012 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi

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,

Jun Zhang

 

 

0 Kudos

2,008 Views
kiryat8
Contributor III

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?

Thanks David

0 Kudos

1,963 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

You can't see source code of this function. This is USB ROM API.

For detail, see description of USBD_HW_API in UM, Chapter 10: LPC11U3x/2x/1x USB on-chip drivers

 

Best Regards

Jun Zhang

0 Kudos

1,958 Views
andarm
Contributor II

Hi Jennie , 

Do you have LPC1830 UM ? Some reason, I can not scan the internet but only here I can. 
If you have this UM please send it me.

Appreciate to  you . 

0 Kudos

1,902 Views
ZhangJennie
NXP TechSupport
NXP TechSupport
0 Kudos

1,997 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

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.

ZhangJennie_0-1628499207676.png

 

0 Kudos