Skip to content

Commit 25b4935

Browse files
committed
[bsp][stm32/libraries] 修复 drv_flash_l4.c 驱动中无法写入非8字节对齐的数据的限制
Signed-off-by: MurphyZhao <[email protected]>
1 parent 0ea42fe commit 25b4935

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

bsp/stm32/libraries/HAL_Drivers/drv_flash/drv_flash_l4.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -140,12 +140,6 @@ int stm32_flash_write(rt_uint32_t addr, const uint8_t *buf, size_t size)
140140
return -RT_EINVAL;
141141
}
142142

143-
if(size % 8 != 0)
144-
{
145-
LOG_E("write size must be 8-byte alignment");
146-
return -RT_EINVAL;
147-
}
148-
149143
HAL_FLASH_Unlock();
150144

151145
__HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_EOP | FLASH_FLAG_OPERR | FLASH_FLAG_WRPERR | FLASH_FLAG_PGAERR | FLASH_FLAG_PGSERR);

0 commit comments

Comments
 (0)