laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/42327?usp=email )
Change subject: dfu: download: align download data buffer ......................................................................
dfu: download: align download data buffer
The download data buffer is given to the usb stack. Ensure the data buffer is dma capable to prevent an additional memcpy() by the usb hal.
Change-Id: I01191a125aa62c2198e38d5e5fcd27d4e421c62e --- M usb/class/dfu/device/dfudf.c 1 file changed, 1 insertion(+), 1 deletion(-)
Approvals: Hoernchen: Looks good to me, approved Jenkins Builder: Verified
diff --git a/usb/class/dfu/device/dfudf.c b/usb/class/dfu/device/dfudf.c index 7388060..4b010bd 100644 --- a/usb/class/dfu/device/dfudf.c +++ b/usb/class/dfu/device/dfudf.c @@ -42,7 +42,7 @@ volatile enum usb_dfu_state dfu_state = USB_DFU_STATE_DFU_IDLE; volatile enum usb_dfu_status dfu_status = USB_DFU_STATUS_OK;
-uint8_t dfu_download_data[512]; +uint8_t __attribute__((aligned(4))) dfu_download_data[512]; volatile uint16_t dfu_download_length = 0; volatile size_t dfu_download_offset = 0;