LPC11U24 USB USBD_API->hw->Init hard fault

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

LPC11U24 USB USBD_API->hw->Init hard fault

2,818件の閲覧回数
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

ラベル(3)
0 件の賞賛
返信
9 返答(返信)

2,760件の閲覧回数
andarm
Contributor II

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

0 件の賞賛
返信

2,695件の閲覧回数
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 件の賞賛
返信

2,788件の閲覧回数
kiryat8
Contributor III

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

Thanks David

0 件の賞賛
返信

2,806件の閲覧回数
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 件の賞賛
返信

2,802件の閲覧回数
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 件の賞賛
返信

2,757件の閲覧回数
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 件の賞賛
返信

2,752件の閲覧回数
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 件の賞賛
返信

2,696件の閲覧回数
ZhangJennie
NXP TechSupport
NXP TechSupport
0 件の賞賛
返信

2,791件の閲覧回数
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 件の賞賛
返信