Code porting from lpc11u24 -> lpc11u37 USB problem

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

Code porting from lpc11u24 -> lpc11u37 USB problem

547 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by dennisdd on Wed Jul 03 04:19:25 MST 2013
Porting the same code from lpc11u24 to lpc11u37, the usb problems arises.

for lpc11u37 address
I know that SRAM0 0x10000000 -> 0x10002000, then USB RAM 0x20004000->0x20004800

But after setting usb still not good.

Attached is my setting. How is the proper setting to this?
0 Kudos
6 Replies

432 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Tsuneo on Sun Jul 07 20:21:48 MST 2013

Quote:
Breakpoint doesn't stop on vendor request, descriptor request and etc.



On my side, breakpoint works as expected even on the default LPC11U14/201 setting.

- USBCDC and USBHID examples have a breakpoint at the initialization in main() as the project default. Delete these breakpoints.

- When your breakpoint disturbs enumeration sequence, the host will get timeout (50 or 500 ms). And then, host move to error recovery sequence, running off from normal enumeration sequence.

Tsuneo
0 Kudos

432 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by dennisdd on Sat Jul 06 22:29:48 MST 2013

Quote: whitecoe
Your screenshot looks like its from the Keil tools -> you do realise that you are posting on the LPCXpresso forum? :eek:

You might get more help on the Keil or maybe the LPCware forums.

HTH!



Sorry...offended you.
0 Kudos

432 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by dennisdd on Sat Jul 06 22:29:13 MST 2013

Quote: Tsuneo
I have a LPCXpresso board, on which a LPC11U14 is replaced with a LPC11U37/401.

As this is LPCXpresso forum, I report the result on LPCXpresso IDE, first.
On this board, the USB examples in this code bundle (USB_ROM_CDC, USB_ROM_HID and USB_ROM_MSC) work without ANY change.

"Sample Code Bundle for LPC11Uxx Peripherals using LPCXpresso"
http://www.lpcware.com/content/nxpfile/sample-code-bundle-lpc11uxx-peripherals-using-lpcxpresso

These examples target LPC11U24/301 in project MCU setting, as the default.
They also work, after just the MCU setting changes to LPC11u37/401, and rebuilt.


Next, report on KEIL uVision.
Above board was connected to uVision over a ULINK-ME, instead of on-board LPC-link.
The examples in this bundle were tested.

"Sample Code Bundle for LPC11Uxx Peripherals using Keil's MDK-ARM"
http://www.lpcware.com/content/nxpfile/sample-code-bundle-lpc11uxx-peripherals-using-keils-mdk-arm-0

- USBCDC
- USBHID
- USBMem
- USBROMDriver\USB_CDC
- USBROMDriver\USB_HID
- USBROMDriver\USB_MSC

The default Device setting of these examples is LPC11U14/201
The examples work on LPC11U37 without ANY change with this setting.

After the Device is changed to LPC11U37/401 (Options - Device tab),
- by this change, the value of Target - IROM1, IRAM1, IRAM2 and Flash Programming Algorithm are automatically tuned for 11U37 by the IDE,
the examples work without any problem.

Tsuneo



Tsuneo, I just did the porting to the example(Sample Code Bundle for LPC11Uxx Peripherals using Keil's MDK-ARM) so my USB script can try to talk with device.

The default setting of example code doesn't work. Breakpoint doesn't stop on vendor request, descriptor request and etc.

I think my keil ide is the main cause?
0 Kudos

432 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Tsuneo on Fri Jul 05 09:30:07 MST 2013
I have a LPCXpresso board, on which a LPC11U14 is replaced with a LPC11U37/401.

As this is LPCXpresso forum, I report the result on LPCXpresso IDE, first.
On this board, the USB examples in this code bundle (USB_ROM_CDC, USB_ROM_HID and USB_ROM_MSC) work without ANY change.

"Sample Code Bundle for LPC11Uxx Peripherals using LPCXpresso"
http://www.lpcware.com/content/nxpfile/sample-code-bundle-lpc11uxx-peripherals-using-lpcxpresso

These examples target LPC11U24/301 in project MCU setting, as the default.
They also work, after just the MCU setting changes to LPC11u37/401, and rebuilt.


Next, report on KEIL uVision.
Above board was connected to uVision over a ULINK-ME, instead of on-board LPC-link.
The examples in this bundle were tested.

"Sample Code Bundle for LPC11Uxx Peripherals using Keil's MDK-ARM"
http://www.lpcware.com/content/nxpfile/sample-code-bundle-lpc11uxx-peripherals-using-keils-mdk-arm-0

- USBCDC
- USBHID
- USBMem
- USBROMDriver\USB_CDC
- USBROMDriver\USB_HID
- USBROMDriver\USB_MSC

The default Device setting of these examples is LPC11U14/201
The examples work on LPC11U37 without ANY change with this setting.

After the Device is changed to LPC11U37/401 (Options - Device tab),
- by this change, the value of Target - IROM1, IRAM1, IRAM2 and Flash Programming Algorithm are automatically tuned for 11U37 by the IDE,
the examples work without any problem.

Tsuneo
0 Kudos

432 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by whitecoe on Fri Jul 05 03:48:39 MST 2013
Your screenshot looks like its from the Keil tools -> you do realise that you are posting on the LPCXpresso forum? :eek:

You might get more help on the Keil or maybe the LPCware forums.

HTH!
0 Kudos

432 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by dennisdd on Fri Jul 05 02:04:34 MST 2013
I solved this problem by setting the address only to 0x1000 0000 size:0x2000.

I notice something else come up.

I encountered a problem my code change doesn't being executed/reflected during SWD debugging mode. I notice the part that the code is not able to be executed during debug mode is USB. The main{} however is able to be break point.

My USB code only able to be executed after I disconnect from debug session, power cycle it then the new code I wrote reflected into the device. I verified this using USB scripting method. My device able to response.

Previously, my code is running on lpc11u24.
I change the memory region according to lpc11u37's, which is IRAM1->0x1000 0000 size 0x2000.

What do I need to do to make proper porting to lpc11u37?
0 Kudos