summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2012-01-08 15:12:54 +0100
committerHarald Welte <laforge@gnumonks.org>2012-01-08 15:12:54 +0100
commitd6d3d9d1bd8da26cf195099a0c555b23e584f44e (patch)
treea51809993e09570dc26ef6f251dc041a218474c9
parent114072c5873f58064f59613abeb2bf4d46312808 (diff)
DFU: Implement SAM3U Flash Programming Errata 46.2.1.3
-rw-r--r--usb-dfu-experiment/main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/usb-dfu-experiment/main.c b/usb-dfu-experiment/main.c
index 31c2c4f..12de844 100644
--- a/usb-dfu-experiment/main.c
+++ b/usb-dfu-experiment/main.c
@@ -366,7 +366,11 @@ int USBDFU_handle_dnload(uint8_t altif, unsigned int offset,
switch (altif) {
case ALTIF_APP:
case ALTIF_FPGA:
+ /* SAM3U Errata 46.2.1.3 */
+ SetFlashWaitState(6);
rc = FLASHD_Write(addr, buf, len);
+ /* SAM3U Errata 46.2.1.3 */
+ SetFlashWaitState(2);
if (rc != 0) {
TRACE_ERROR("Error during write of DFU partition %u\n\r", altif);
dfu.status = DFU_STATUS_errPROG;
personal git repositories of Harald Welte. Your mileage may vary