$ sudo lsusb -d 1fc9:000c -vv Bus 001 Device 003: ID 1fc9:000c Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 idVendor 0x1fc9 idProduct 0x000c bcdDevice 1.00 iManufacturer 1 NXP iProduct 2 LPC iSerial 3 ABCD ... $ sudo dfu-util -l dfu-util 0.5 (C) 2005-2008 by Weston Schmidt, Harald Welte and OpenMoko Inc. (C) 2010-2011 Tormod Volden (DfuSe support) This program is Free Software and has ABSOLUTELY NO WARRANTY dfu-util does currently only support DFU version 1.0 Found Runtime: [1fc9:000c] devnum=0, cfg=1, intf=0, alt=0, name="DFU" |
$ sudo dfu-util -R -D FIRMWARE.bin dfu-util 0.5 (C) 2005-2008 by Weston Schmidt, Harald Welte and OpenMoko Inc. (C) 2010-2011 Tormod Volden (DfuSe support) This program is Free Software and has ABSOLUTELY NO WARRANTY dfu-util does currently only support DFU version 1.0 Opening DFU USB device... ID 1fc9:000c Run-time device DFU version 0100 Claiming USB DFU Runtime Interface... Determining device status: state = appIDLE, status = 0 Device really in Runtime Mode, send DFU detach request... Resetting USB... Opening USB Device... 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 No valid DFU suffix signature Warning: File has no DFU suffix bytes_per_hash=481 Copying data from PC to DFU device Starting download: [dfu_download: libusb_control_transfer returned -4 Error during download can't detach Resetting USB to switch back to runtime mode |
Hi,
I have the same problem. I have used the dfu-util and lpc-dfu but I can't upload the binary file to board.
To create the dfu file, I am using the following command:
$ dfu-suffix --vid=0x1fc9 --pid=0x000c --did=0x0 -a _tmp.dfu $ python2 -c "import os.path; import struct; print('0000000: da ff ' + ' '.join(map(lambda s: '%02x' % ord(s), struct.pack('<H', os.path.getsize('$<') / 512 + 16))) + 'ff ff ff ff ff ff ff ff ff ff ff ff')" | xxd -g1 -r > _header.bin $ cat _header.bin _tmp.dfu >main.dfu |
To program the board, I am using this way:
# dfu-util --device 1fc9:000c --alt 0 --download main.dfu |
When I list my DFU devices:
dfu-util 0.9 Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc. Found DFU: [1fc9:000c] ver=0100, devnum=31, cfg=1, intf=0, path="1-8", alt=0, name="DFU", serial="ABCD" |
My board is found so when I program it:
dfu-util 0.9 Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc. dfu-util: DFU suffix CRC does not match |
But the device doesn't run. Nothing happens.
I don't know why.
Thanks,
Thiago
[SIZE=3] A:B:$ sudo dfu-util -U firm.bin dfu-util 0.5 (C) 2005-2008 by Weston Schmidt, Harald Welte and OpenMoko Inc. (C) 2010-2011 Tormod Volden (DfuSe support) This program is Free Software and has ABSOLUTELY NO WARRANTY dfu-util does currently only support DFU version 1.0 Opening DFU USB device... ID 1fc9:000c Run-time device DFU version 0100 Claiming USB DFU Runtime Interface... Determining device status: state = appIDLE, status = 0 Device really in Runtime Mode, send DFU detach request... Resetting USB... Opening USB Device... 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 bytes_per_hash=2048 Copying data from DFU device to PC Starting upload: [################################################] finished! [/SIZE] |
[SIZE=3]A:B:$ [/SIZE]arm-none-eabi-objdump -m arm -Mforce-thumb -b binary -D firm.bin | head -40 firm.bin: file format binary Disassembly of section .data: 00000000 <.data>: 0: 8000 strh r0, [r0, #0] 2: 1001 asrs r1, r0, #32 4: 3401 adds r4, #1 6: 1000 asrs r0, r0, #32 8: 01b5 lsls r5, r6, #6 a: 1000 asrs r0, r0, #32 c: 01bd lsls r5, r7, #6 e: 1000 asrs r0, r0, #32 10: 01c5 lsls r5, r0, #7 12: 1000 asrs r0, r0, #32 14: 01cd lsls r5, r1, #7 16: 1000 asrs r0, r0, #32 18: 01d5 lsls r5, r2, #7 1a: 1000 asrs r0, r0, #32 ... 2c: 01dd lsls r5, r3, #7 2e: 1000 asrs r0, r0, #32 30: 01e5 lsls r5, r4, #7 32: 1000 asrs r0, r0, #32 34: 0000 movs r0, r0 36: 0000 movs r0, r0 38: 01ed lsls r5, r5, #7 3a: 1000 asrs r0, r0, #32 3c: 01f5 lsls r5, r6, #7 3e: 1000 asrs r0, r0, #32 40: 01fd lsls r5, r7, #7 42: 1000 asrs r0, r0, #32 44: 01fd lsls r5, r7, #7 46: 1000 asrs r0, r0, #32 48: 01fd lsls r5, r7, #7 4a: 1000 asrs r0, r0, #32 4c: 01fd lsls r5, r7, #7 4e: 1000 asrs r0, r0, #32 ... |
$lsusb Bus 001 Device 007: ID 1fc9:000c Bus 001 Device 006: ID 0471:df55 Philips (or NXP) LPCXpresso LPC-Link Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub $sudo cat /sys/kernel/debug/usb/usbmon/1u >~/Desktop/USBcaptureLOG.mon $./vusb-analyzer ~/Desktop/USBcaptureLOG.mon |
0x21 0x00 = DFU_DETACH 0x21 0x01 = DFU_DNLOAD 0xA1 0x03 = DFU_GETSTATUS Error code 108 = ESHUTDOWN = Cannot send after transport endpoint shutdown |
$sudo dfu-util -R -D firm.bin [sudo] password for dev: dfu-util 0.5 (C) 2005-2008 by Weston Schmidt, Harald Welte and OpenMoko Inc. (C) 2010-2011 Tormod Volden (DfuSe support) This program is Free Software and has ABSOLUTELY NO WARRANTY dfu-util does currently only support DFU version 1.0 Opening DFU USB device... ID 0471:df55 Deducing device DFU version from functional descriptor length 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: [0471:df55] devnum=0, cfg=1, intf=0, alt=0, name="UNDEFINED" Claiming USB DFU Interface... Setting Alternate Setting #0 ... Determining device status: state = dfuIDLE, status = 0 dfuIDLE, continuing Deducing device DFU version from functional descriptor length DFU mode device DFU version 0100 Device returned transfer size 2048 No valid DFU suffix signature Warning: File has no DFU suffix bytes_per_hash=436 Copying data from PC to DFU device Starting download: [##################################################dfu_download: libusb_control_transfer returned -9 Error sending completion packet can't detach Resetting USB to switch back to runtime mode |