Browse Source

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.
pull/942/merge
Karl Palsson 6 years ago
parent
commit
9dd901ba27
  1. 1
      include/libopencm3/stm32/common/flash_common_f01.h
  2. 1
      include/libopencm3/stm32/common/flash_common_f234.h
  3. 1
      include/libopencm3/stm32/f1/flash.h
  4. 2
      include/libopencm3/stm32/f7/flash.h
  5. 1
      include/libopencm3/stm32/l4/flash.h
  6. 10
      lib/stm32/common/flash_common_f01.c
  7. 10
      lib/stm32/common/flash_common_f234.c
  8. 1
      lib/stm32/common/flash_common_f24.c
  9. 1
      lib/stm32/f0/flash.c
  10. 14
      lib/stm32/f1/flash.c
  11. 1
      lib/stm32/f3/flash.c
  12. 9
      lib/stm32/l4/flash.c

1
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);

1
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);

1
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

2
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).
*/

1
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);

10
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

10
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

1
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();
}
/*---------------------------------------------------------------------------*/

1
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();
}
/*---------------------------------------------------------------------------*/

14
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();
}
}

1
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();
}
/**

9
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

Loading…
Cancel
Save