diff options
author | Karl Palsson <karlp@tweak.net.au> | 2018-07-10 17:50:57 +0300 |
---|---|---|
committer | Karl Palsson <karlp@tweak.net.au> | 2018-07-29 23:31:17 +0300 |
commit | 9dd901ba279bc9d65fea920186b2dbb7fd17b16d (patch) | |
tree | 360f9a9e8da718cb3101a99df7ad9258fbfa8e9e | |
parent | 30d88452e6e360ef5f321646cafdbcb98c0e8f4e (diff) |
stm32: flash: BSY bit has never been writable.
This has been copied around for years, but has never been a writable bit
on any target.
-rw-r--r-- | include/libopencm3/stm32/common/flash_common_f01.h | 1 | ||||
-rw-r--r-- | include/libopencm3/stm32/common/flash_common_f234.h | 1 | ||||
-rw-r--r-- | include/libopencm3/stm32/f1/flash.h | 1 | ||||
-rw-r--r-- | include/libopencm3/stm32/f7/flash.h | 2 | ||||
-rw-r--r-- | include/libopencm3/stm32/l4/flash.h | 1 | ||||
-rw-r--r-- | lib/stm32/common/flash_common_f01.c | 10 | ||||
-rw-r--r-- | lib/stm32/common/flash_common_f234.c | 10 | ||||
-rw-r--r-- | lib/stm32/common/flash_common_f24.c | 1 | ||||
-rw-r--r-- | lib/stm32/f0/flash.c | 1 | ||||
-rw-r--r-- | lib/stm32/f1/flash.c | 14 | ||||
-rw-r--r-- | lib/stm32/f3/flash.c | 1 | ||||
-rw-r--r-- | lib/stm32/l4/flash.c | 9 |
12 files changed, 0 insertions, 52 deletions
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 @@ -128,16 +128,6 @@ void flash_clear_wrprterr_flag(void) } /*---------------------------------------------------------------------------*/ -/** @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 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 @@ -156,18 +156,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 Program error, end of operation, write protect error, busy. Both banks cleared. @@ -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 |