aboutsummaryrefslogtreecommitdiffstats
path: root/firmware/atmel_softpack_libraries/usb/device/dfu/dfu.h
diff options
context:
space:
mode:
authorEric <ewild@sysmocom.de>2021-01-29 02:11:55 +0100
committerHoernchen <ewild@sysmocom.de>2021-01-29 11:02:27 +0000
commit657cce18176057f8a3917698c328b918e6e2225d (patch)
treee024653f169273d40c538a80e024d766f1d4bd2f /firmware/atmel_softpack_libraries/usb/device/dfu/dfu.h
parentaadd9956644fdb2284ed17f697a949acbf542254 (diff)
dfu: let the device reset itself
dfu flashing the ST12 was easy, but i was never able to get ST34 into dfu mode. Changing the firmware so it resets itself just like the octsim instead of starting a timer and waiting for a reset from the host made it work every time for me. Change-Id: Ida636ec925f40d6d56551f170150181350d03bbd
Diffstat (limited to 'firmware/atmel_softpack_libraries/usb/device/dfu/dfu.h')
-rw-r--r--firmware/atmel_softpack_libraries/usb/device/dfu/dfu.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/firmware/atmel_softpack_libraries/usb/device/dfu/dfu.h b/firmware/atmel_softpack_libraries/usb/device/dfu/dfu.h
index 5bd8684..84ce14e 100644
--- a/firmware/atmel_softpack_libraries/usb/device/dfu/dfu.h
+++ b/firmware/atmel_softpack_libraries/usb/device/dfu/dfu.h
@@ -39,8 +39,8 @@ struct dfu_desc {
#define DFU_FUNC_DESC { \
.bLength = USB_DT_DFU_SIZE, \
.bDescriptorType = USB_DT_DFU, \
- .bmAttributes = USB_DFU_CAN_UPLOAD | USB_DFU_CAN_DOWNLOAD, \
- .wDetachTimeOut = 0xff00, \
+ .bmAttributes = USB_DFU_CAN_UPLOAD | USB_DFU_CAN_DOWNLOAD | USB_DFU_WILL_DETACH, \
+ .wDetachTimeOut = 0x00, \
.wTransferSize = BOARD_DFU_PAGE_SIZE, \
.bcdDFUVersion = 0x0100, \
}