提交 25b49352 编写于 作者: M MurphyZhao

[bsp][stm32/libraries] 修复 drv_flash_l4.c 驱动中无法写入非8字节对齐的数据的限制

Signed-off-by: NMurphyZhao <d2014zjt@163.com>
上级 0ea42fe7
......@@ -140,12 +140,6 @@ int stm32_flash_write(rt_uint32_t addr, const uint8_t *buf, size_t size)
return -RT_EINVAL;
}
if(size % 8 != 0)
{
LOG_E("write size must be 8-byte alignment");
return -RT_EINVAL;
}
HAL_FLASH_Unlock();
__HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_EOP | FLASH_FLAG_OPERR | FLASH_FLAG_WRPERR | FLASH_FLAG_PGAERR | FLASH_FLAG_PGSERR);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册