Fixed DFU bootloader programming not discarding the correct number of filler bytes from the host when non-aligned programming ranges are specified (thanks to Thomas Bleeker).
This commit is contained in:
parent
dd995683ea
commit
871d9bf1af
3 changed files with 8 additions and 2 deletions
|
@ -205,8 +205,8 @@ void EVENT_USB_Device_UnhandledControlRequest(void)
|
|||
/* Throw away the filler bytes before the start of the firmware */
|
||||
DiscardFillerBytes(DFU_FILLER_BYTES_SIZE);
|
||||
|
||||
/* Throw away the page alignment filler bytes before the start of the firmware */
|
||||
DiscardFillerBytes(StartAddr % SPM_PAGESIZE);
|
||||
/* Throw away the packet alignment filler bytes before the start of the firmware */
|
||||
DiscardFillerBytes(StartAddr % FIXED_CONTROL_ENDPOINT_SIZE);
|
||||
|
||||
/* Calculate the number of bytes remaining to be written */
|
||||
uint16_t BytesRemaining = ((EndAddr - StartAddr) + 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue