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

Signed-off-by: MurphyZhao <d2014zjt@163.com>
This commit is contained in:
MurphyZhao 2019-01-18 11:05:18 +08:00
parent 0ea42fe7f5
commit 25b49352d5
1 changed files with 0 additions and 6 deletions

View File

@ -140,12 +140,6 @@ int stm32_flash_write(rt_uint32_t addr, const uint8_t *buf, size_t size)
return -RT_EINVAL; return -RT_EINVAL;
} }
if(size % 8 != 0)
{
LOG_E("write size must be 8-byte alignment");
return -RT_EINVAL;
}
HAL_FLASH_Unlock(); HAL_FLASH_Unlock();
__HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_EOP | FLASH_FLAG_OPERR | FLASH_FLAG_WRPERR | FLASH_FLAG_PGAERR | FLASH_FLAG_PGSERR); __HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_EOP | FLASH_FLAG_OPERR | FLASH_FLAG_WRPERR | FLASH_FLAG_PGAERR | FLASH_FLAG_PGSERR);