diff --git a/include/libopencm3/stm32/common/flash_common_f01.h b/include/libopencm3/stm32/common/flash_common_f01.h index d14a9709..6563db02 100644 --- a/include/libopencm3/stm32/common/flash_common_f01.h +++ b/include/libopencm3/stm32/common/flash_common_f01.h @@ -105,7 +105,6 @@ void flash_lock(void); void flash_clear_pgerr_flag(void); void flash_clear_eop_flag(void); void flash_clear_wrprterr_flag(void); -void flash_clear_bsy_flag(void); void flash_clear_status_flags(void); uint32_t flash_get_status_flags(void); void flash_wait_for_last_operation(void); diff --git a/include/libopencm3/stm32/common/flash_common_f234.h b/include/libopencm3/stm32/common/flash_common_f234.h index d4bfb054..03ea9fc0 100644 --- a/include/libopencm3/stm32/common/flash_common_f234.h +++ b/include/libopencm3/stm32/common/flash_common_f234.h @@ -79,7 +79,6 @@ void flash_unlock(void); void flash_lock(void); void flash_clear_pgperr_flag(void); void flash_clear_eop_flag(void); -void flash_clear_bsy_flag(void); void flash_clear_status_flags(void); void flash_wait_for_last_operation(void); diff --git a/include/libopencm3/stm32/f1/flash.h b/include/libopencm3/stm32/f1/flash.h index f7ba402b..d57f853f 100644 --- a/include/libopencm3/stm32/f1/flash.h +++ b/include/libopencm3/stm32/f1/flash.h @@ -111,7 +111,6 @@ void flash_lock_upper(void); void flash_clear_pgerr_flag_upper(void); void flash_clear_eop_flag_upper(void); void flash_clear_wrprterr_flag_upper(void); -void flash_clear_bsy_flag_upper(void); END_DECLS diff --git a/include/libopencm3/stm32/f7/flash.h b/include/libopencm3/stm32/f7/flash.h index 61d3a337..0ac2162a 100644 --- a/include/libopencm3/stm32/f7/flash.h +++ b/include/libopencm3/stm32/f7/flash.h @@ -50,8 +50,6 @@ * by F7 require more than 7 wait states. * 4. FLASH_SR_PGSERR (programming sequence error) is now FLASH_SR_ERSERR ( * erase sequence error). - * 5. FLASH_SR_BSY field is now read-only. Seems to also be read-only in F4? - * Why did we have a clear busy flag function? * 6. There are now two watchdogs - IWDG (independent watchdog) and WWDG ( * window watchdog). */ diff --git a/include/libopencm3/stm32/l4/flash.h b/include/libopencm3/stm32/l4/flash.h index bfa100ac..fb7e5b9d 100644 --- a/include/libopencm3/stm32/l4/flash.h +++ b/include/libopencm3/stm32/l4/flash.h @@ -227,7 +227,6 @@ void flash_unlock(void); void flash_lock(void); void flash_clear_pgperr_flag(void); void flash_clear_eop_flag(void); -void flash_clear_bsy_flag(void); void flash_wait_for_last_operation(void); void flash_dcache_enable(void); void flash_dcache_disable(void); diff --git a/lib/stm32/common/flash_common_f01.c b/lib/stm32/common/flash_common_f01.c index b4ec8188..5ea5ad09 100644 --- a/lib/stm32/common/flash_common_f01.c +++ b/lib/stm32/common/flash_common_f01.c @@ -127,16 +127,6 @@ void flash_clear_wrprterr_flag(void) FLASH_SR |= FLASH_SR_WRPRTERR; } -/*---------------------------------------------------------------------------*/ -/** @brief Clear the Busy Status Flag - -*/ - -void flash_clear_bsy_flag(void) -{ - FLASH_SR &= ~FLASH_SR_BSY; -} - /*---------------------------------------------------------------------------*/ /** @brief Wait until Last Operation has Ended diff --git a/lib/stm32/common/flash_common_f234.c b/lib/stm32/common/flash_common_f234.c index 869fbeb5..a8ab2db7 100644 --- a/lib/stm32/common/flash_common_f234.c +++ b/lib/stm32/common/flash_common_f234.c @@ -92,16 +92,6 @@ void flash_clear_eop_flag(void) FLASH_SR |= FLASH_SR_EOP; } -/*---------------------------------------------------------------------------*/ -/** @brief Clear the Busy Status Flag - -*/ - -void flash_clear_bsy_flag(void) -{ - FLASH_SR &= ~FLASH_SR_BSY; -} - /*---------------------------------------------------------------------------*/ /** @brief Wait until Last Operation has Ended diff --git a/lib/stm32/common/flash_common_f24.c b/lib/stm32/common/flash_common_f24.c index cd176cbe..75373b87 100644 --- a/lib/stm32/common/flash_common_f24.c +++ b/lib/stm32/common/flash_common_f24.c @@ -176,7 +176,6 @@ void flash_clear_status_flags(void) flash_clear_wrperr_flag(); flash_clear_pgperr_flag(); flash_clear_eop_flag(); - flash_clear_bsy_flag(); } /*---------------------------------------------------------------------------*/ diff --git a/lib/stm32/f0/flash.c b/lib/stm32/f0/flash.c index e39b6b15..433b7b53 100644 --- a/lib/stm32/f0/flash.c +++ b/lib/stm32/f0/flash.c @@ -61,7 +61,6 @@ void flash_clear_status_flags(void) flash_clear_pgerr_flag(); flash_clear_eop_flag(); flash_clear_wrprterr_flag(); - flash_clear_bsy_flag(); } /*---------------------------------------------------------------------------*/ diff --git a/lib/stm32/f1/flash.c b/lib/stm32/f1/flash.c index 31df4b75..68606a9a 100644 --- a/lib/stm32/f1/flash.c +++ b/lib/stm32/f1/flash.c @@ -155,18 +155,6 @@ void flash_clear_wrprterr_flag_upper(void) } } -/*---------------------------------------------------------------------------*/ -/** @brief Clear the Busy Status Flag, upper Bank - -*/ - -void flash_clear_bsy_flag_upper(void) -{ - if (DESIG_FLASH_SIZE > 512) { - FLASH_SR2 &= ~FLASH_SR_BSY; - } -} - /*---------------------------------------------------------------------------*/ /** @brief Clear All Status Flags @@ -178,12 +166,10 @@ void flash_clear_status_flags(void) flash_clear_pgerr_flag(); flash_clear_eop_flag(); flash_clear_wrprterr_flag(); - flash_clear_bsy_flag(); if (DESIG_FLASH_SIZE > 512) { flash_clear_pgerr_flag_upper(); flash_clear_eop_flag_upper(); flash_clear_wrprterr_flag_upper(); - flash_clear_bsy_flag_upper(); } } diff --git a/lib/stm32/f3/flash.c b/lib/stm32/f3/flash.c index cac2ea45..25fa86c8 100644 --- a/lib/stm32/f3/flash.c +++ b/lib/stm32/f3/flash.c @@ -56,7 +56,6 @@ void flash_clear_status_flags(void) { flash_clear_pgperr_flag(); flash_clear_eop_flag(); - flash_clear_bsy_flag(); } /** diff --git a/lib/stm32/l4/flash.c b/lib/stm32/l4/flash.c index 9e2878a0..b23b41c0 100644 --- a/lib/stm32/l4/flash.c +++ b/lib/stm32/l4/flash.c @@ -122,14 +122,6 @@ void flash_clear_eop_flag(void) FLASH_SR |= FLASH_SR_EOP; } -/** @brief Clear the Busy Status Flag - */ -void flash_clear_bsy_flag(void) -{ - FLASH_SR &= ~FLASH_SR_BSY; -} - - /** @brief Wait until Last Operation has Ended * This loops indefinitely until an operation (write or erase) has completed * by testing the busy flag. @@ -216,7 +208,6 @@ void flash_clear_status_flags(void) flash_clear_wrperr_flag(); flash_clear_pgperr_flag(); flash_clear_eop_flag(); - flash_clear_bsy_flag(); } /** @brief Unlock the Option Byte Access