nxpUSBlib hard fault with LPCExpresso 11U14 and baseboard rev b.

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

nxpUSBlib hard fault with LPCExpresso 11U14 and baseboard rev b.

1,047 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Scribe on Sat Nov 17 08:54:55 MST 2012
Hi guys,

I'm new to the nxpUSBlib and LPCXpresso IDE, where I've previously used Keil but am looking to this library for its open nature.

I have just imported the nxpUSBlib v0.98 to my workspace and configured all active build configurations for the LPC11Uxx, selecting the BSP targeting the Embedded Artists mainboard.

However, when I attempt to run the HIDDevice example, I receive a Hard Fault before the program even reaches the main loop, likewise, with the Mass Storage example I receive a Hard Fault upon connection of the USB driver to the PC.

Does anyone know of any common causes/issues that could cause these Hard Faults? Beyond customising active build configurations and MCU targets for my device, I'm using completely default settings.

Many thanks
Labels (1)
0 Kudos
9 Replies

1,028 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Scribe on Fri Dec 07 15:06:22 MST 2012
I've been able to reproduce this any number of times, including from scratch, flicking between MCB1000 and LPCXpresso confirmed the issue for me, ensuring that it was the only factor. Indeed I had correctly set the indexer.

For now I'm just sticking to Keil and the MCB1000, it works, I just don't have correct LCD/Button setups, but not an issue as final product won't be the same anyway.
0 Kudos

1,028 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by nxpUSBlib team on Tue Nov 27 17:25:34 MST 2012
I just tried v0.98a with the BSP target set to LPCXpresso Base Board Rev B and the other three targets set to LPC11U14 but was unable to reproduce this problem.

Sometimes setting the compiler configuration targets does not work the first time. Perhaps you can confirm that each of the 4 configurations is actually set to the way you expect.

Also with the LPCXpresso IDE it is important to enable the indexer so that the indexes are rebuilt each time you change targets. If the indexer was not enabled you may need to go back and reselect the targets and do a clean rebuild.
0 Kudos

1,028 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Scribe on Mon Nov 26 14:04:56 MST 2012
Updating this issue, it doesn't occur if I change the BSP target from LPCExpresso Base Board Rev B. to Hitex MCB1000.

I am using the EmbeddedArtist's board so would be nice to still see this fixed but for now I'll just remove the BSP altogether.
0 Kudos

1,028 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Scribe on Mon Nov 26 13:00:00 MST 2012
Hi nxpUSBlib team,

I've tried version 0.98a with LPC11U14 on EmbeddedArtists base board with default project settings (Set to correct base board, correct build for 11Uxx on each project and correct MCU, no other changes) however I'm still receiving a hard fault upon connection with the Mass Storage Example.

I'm tracking it down to:

g_pfnVectors() at 0x64
memset() at 0x32b2
USB_DeviceTask() at USBTask.c:72 0x2506
__weak_main() at 0x32ba
ResetISR() at cr_startup_lpc11u.c:320 0x1de

This error occurs upon connection of the Mass Storage USB port to the PC. One step later and it'll hard fault.

Many thanks
0 Kudos

1,028 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Scribe on Sun Nov 25 13:43:29 MST 2012
Thanks for this guys, I'll give it a try over the next two days.
0 Kudos

1,028 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by nxpUSBlib team on Thu Nov 22 01:28:42 MST 2012
We just posted a v0.98a release of the library that fixes these problems. The problem was that in some project files the target was inadvertently changed to M3 when it should have been M0 or even M4.

Please give this new release a try.
0 Kudos

1,028 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Muis on Tue Nov 20 03:35:11 MST 2012
I have the same issue with USBlib 0.98 and LPC11U14, using LPCXpresso v5.0. The previous version (0.97) worked fine.
0 Kudos

1,028 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Scribe on Mon Nov 19 14:13:55 MST 2012
Thank you for the advice.

I retried the example several times and checked settings however the issue remains.

A quick reversion to v0.97 appears to resolve the issue however and so it appears this may be a newly introduced bug.
0 Kudos

1,028 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by nxpUSBlib team on Sun Nov 18 11:22:50 MST 2012
Double check that all your libraries are indeed configured as you intended. I have found that with the CodeRed compiler it acts like I have changed the configuration via right click->Set Active but then found that it did not.

Also there is a bug in the tool which causes it to intermitently change the target setting in the libraries and application. Go back and make sure all target settings are set to M0.

Lastly you might want to place a breakpoint in ResetISR in Cr_startup_lpc11u.c and step through the code to see where it breaks.
0 Kudos