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.
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.
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.
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.
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.
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.