LPC11U24 USB USBD_API->hw->Init hard fault

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

LPC11U24 USB USBD_API->hw->Init hard fault

2,796 次查看
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,738 次查看
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,673 次查看
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,766 次查看
kiryat8
Contributor III

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

Thanks David

0 项奖励
回复

2,784 次查看
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,780 次查看
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,735 次查看
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,730 次查看
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,674 次查看
ZhangJennie
NXP TechSupport
NXP TechSupport
0 项奖励
回复

2,769 次查看
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 项奖励
回复