Config descriptor in ROM causes HardFault

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

Config descriptor in ROM causes HardFault

582 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by chris_bayley_trimble on Wed Apr 15 15:18:10 MST 2015
I have been working with a number of the LPCOpen USB examples and I have noticed that most USB Descriptors are declared const (ROM storage) but the Config Descriptors aren't (i.e. RAM storage).

I tried changing the declaration of the Config descriptors to const but then the USB stack will HardFault inside the default Ep0_handler.

Why does the Config descriptor need to be in RAM to work ?

Cheers,
Chris
Labels (1)
0 Kudos
1 Reply

570 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by MikeSimmonds on Wed Apr 15 20:52:42 MST 2015
Check the UM for your device and look at the block diagram to see which connections from the the USB block
are present in the bus arbitration matrix.

For example, on the 1778, the USB's DMA engine can talk to either of the peripheral RAM blocks and the external
bus interface, but not the main on-chip static ram, or the flash.

So (on the 1778) I can not place USB data in the static ram or (constant data) in flash.

Not sure what device you are using or if you are host or device.

Cheers, Mike
0 Kudos