usb: dfu: fix 'this area can not be overwritten'
fix issue #7336 Signed-off-by: qianfan Zhao <qianfanguijin@163.com>
This commit is contained in:
parent
930dbd5d80
commit
4e324e2171
@ -388,7 +388,8 @@ static int dfu_class_handle_req(struct usb_setup_packet *pSetup,
|
||||
case dfuIDLE:
|
||||
SYS_LOG_DBG("DFU_DNLOAD start");
|
||||
dfu_reset_counters();
|
||||
if (dfu_data.flash_addr != FLASH_AREA_IMAGE_1_OFFSET) {
|
||||
if (dfu_data.flash_addr != CONFIG_FLASH_BASE_ADDRESS
|
||||
+ FLASH_AREA_IMAGE_1_OFFSET) {
|
||||
dfu_data.status = errWRITE;
|
||||
dfu_data.state = dfuERROR;
|
||||
SYS_LOG_ERR("This area can not be overwritten");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user