Fix STM32G0 EFL driver fixes

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12978 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
cinsights 2019-09-08 03:19:27 +00:00
parent 7040887600
commit fd444de36f
1 changed files with 3 additions and 2 deletions

View File

@ -132,7 +132,7 @@ static inline void stm32_flash_clear_status(EFlashDriver *eflp) {
static inline void stm32_flash_wait_busy(EFlashDriver *eflp) {
/* Wait for busy bit clear.*/
while ((eflp->flash->SR & FLASH_SR_BSY) != 0U) {
while ((eflp->flash->SR & FLASH_SR_BSY1) != 0U) {
}
}
@ -145,6 +145,7 @@ static inline bool stm32_flash_dual_bank(EFlashDriver *eflp) {
#if STM32_FLASH_NUMBER_OF_BANKS > 1
return ((eflp->flash->SR & (FLASH_OPTR_DBANK | FLASH_OPTR_DB1M)) != 0U);
#endif
(void)eflp;
return false;
}
@ -517,7 +518,7 @@ flash_error_t efl_lld_query_erase(void *instance, uint32_t *msec) {
if (devp->state == FLASH_ERASE) {
/* Checking for operation in progress.*/
if ((devp->flash->SR & FLASH_SR_BSY) == 0U) {
if ((devp->flash->SR & FLASH_SR_BSY1) == 0U) {
/* Disabling the various erase control bits.*/
devp->flash->CR &= ~(FLASH_CR_MER1 |