Hardfault on LPC1857 USB rom driver

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

Hardfault on LPC1857 USB rom driver

904 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by egnascimento on Thu Nov 05 04:15:08 MST 2015
Hi guys,
I´m trying to get my board with LPC1857 to work with USB example provided on LPCOpen. I´m particularly  trying to run CDC_UART and CDC_VCOM examples.

Everything goes well until ret = USBD_API->cdc->init(hUsb, &cdc_param, &g_uCOM.hCdc) where I get a HardFault in both examples.

Is there any way to find out why it is happening? I´m only connect DP and DM pins. Should the not connected pins in my schematic USB0_VBUS and USB0_ID be the reason of this issue?

Thanks,
Eduardo Garcia
Labels (1)
0 Kudos
6 Replies

864 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mysepp on Fri Nov 06 14:02:06 MST 2015
Can you describe a bit what was the solution?
Perhaps someone else later has the same problem and would be happy, if she/he finds a solution here.
0 Kudos

864 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by egnascimento on Fri Nov 06 11:57:06 MST 2015
Never mind, Just found out how to configure register to get it working properly.

Thanks,
Eduardo Garcia
0 Kudos

864 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by egnascimento on Fri Nov 06 08:33:35 MST 2015
Good hint! That made hardfaults to stop right away.

PC is not being able to detect CDC device when I plug it.  VBUS is not plugged. I'm just getting 5V from USB and that´s it. DP ad DM are directly connect. No pull-ups, pull-dows or series resistors.

Any idea?

Thanks,
Eduardo Garcia
0 Kudos

864 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mc on Thu Nov 05 21:43:26 MST 2015
Hi,
Can you check if you are using correct Linker file? Can you please select linker file from below folder
..\lpcopen_2_12_keil_iar_keil_mcb_1857\applications\lpc18xx_43xx\tool_configs\iar_linker_scripts
0 Kudos

864 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by egnascimento on Thu Nov 05 09:18:30 MST 2015
Sure. I'm using IAR for ARM 6.70.1.5794 and IAR Embedded Components 6.6.5.2892.

Is that ok? Project is opened with no warnings.

Thanks!
0 Kudos

864 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mc on Thu Nov 05 08:56:25 MST 2015
Hi Eduardo
Which toolchain are you using? Could you please also post your tool's version number?
0 Kudos