Some problems with DFU

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

Some problems with DFU

1,150 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Oxide on Mon May 16 02:21:13 MST 2016
I am writing an application for LPC4330 microcontroller, that will allow the user to update the firmware using USB DFU class. I wrote all of the code and I wanted to test it using dfu-util software. But when I try to do it few errors appear:

1. When I list the USB devices, two elements with the same parameters (vendor id, device id, configuration and interface) appear. The situation changes when I make a breakpoint in the application, in place where interrupt process function is called. Then only one device appears on the list.

2. I cannot detach the device because I get error "No USB device is DFU capable". Even when only one device is listed by dfu-util.

3. When only one device is listed I can start performing upload/download operation, but the application sends me an error, that interface cannot be claimed.

What could be a reason of these problems? Could it be connected with LPC4330 feature allowing user to flash the programme to the memory using dfu?

Thank you in advance for your answer!
Labels (1)
0 Kudos
2 Replies

905 Views
lpcware
NXP Employee
NXP Employee
bump
0 Kudos

905 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by bavarian on Mon May 23 04:37:06 MST 2016
If I boot an LPC4330 in USB0 bootmode I get the following output:

Found Runtime: [1fc9:000c] devnum=0, cfg=1, intf=0, alt=0, name="DFU"

I can also detach it with dfu-util -e:

Opening DFU capable USB device... ID 1fc9:000c
Run-time device DFU version 0100
Claiming USB DFU Runtime Interface...
Determining device status: state = dfuIDLE, status = 0
WARNING: Runtime device already in DFU state ?!?
Found Runtime: [1fc9:000c] devnum=0, cfg=1, intf=0, alt=0, name="DFU"
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 0100
Device returned transfer size 2048
Unsupported mode: 3


It's not clear to me what you try to achieve: use the internal DFU boot mode to make a firmware upgrade or use your own code to perform this.
For the internal DFU boot mode we have running examples on the PC side, like the LPCScrypt utility. This requires to have user control over the bootmode pin P2_8 (e.g. a button).
If you want to jump from your own application code into the internal DFU ROM code, then things get a little bit more complicated.
Please go through the following thread for more details:

https://www.lpcware.com/content/forum/lpc1857-jump-usbdfu-bootloader-application


Regards,
NXP Support Team
0 Kudos