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.
This commit is contained in:
Karl Palsson 2018-07-10 14:50:57 +00:00
parent 30d88452e6
commit 9dd901ba27
12 changed files with 0 additions and 52 deletions

View File

@ -105,7 +105,6 @@ void flash_lock(void);
void flash_clear_pgerr_flag(void); void flash_clear_pgerr_flag(void);
void flash_clear_eop_flag(void); void flash_clear_eop_flag(void);
void flash_clear_wrprterr_flag(void); void flash_clear_wrprterr_flag(void);
void flash_clear_bsy_flag(void);
void flash_clear_status_flags(void); void flash_clear_status_flags(void);
uint32_t flash_get_status_flags(void); uint32_t flash_get_status_flags(void);
void flash_wait_for_last_operation(void); void flash_wait_for_last_operation(void);

View File

@ -79,7 +79,6 @@ void flash_unlock(void);
void flash_lock(void); void flash_lock(void);
void flash_clear_pgperr_flag(void); void flash_clear_pgperr_flag(void);
void flash_clear_eop_flag(void); void flash_clear_eop_flag(void);
void flash_clear_bsy_flag(void);
void flash_clear_status_flags(void); void flash_clear_status_flags(void);
void flash_wait_for_last_operation(void); void flash_wait_for_last_operation(void);

View File

@ -111,7 +111,6 @@ void flash_lock_upper(void);
void flash_clear_pgerr_flag_upper(void); void flash_clear_pgerr_flag_upper(void);
void flash_clear_eop_flag_upper(void); void flash_clear_eop_flag_upper(void);
void flash_clear_wrprterr_flag_upper(void); void flash_clear_wrprterr_flag_upper(void);
void flash_clear_bsy_flag_upper(void);
END_DECLS END_DECLS

View File

@ -50,8 +50,6 @@
* by F7 require more than 7 wait states. * by F7 require more than 7 wait states.
* 4. FLASH_SR_PGSERR (programming sequence error) is now FLASH_SR_ERSERR ( * 4. FLASH_SR_PGSERR (programming sequence error) is now FLASH_SR_ERSERR (
* erase sequence error). * 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 ( * 6. There are now two watchdogs - IWDG (independent watchdog) and WWDG (
* window watchdog). * window watchdog).
*/ */

View File

@ -227,7 +227,6 @@ void flash_unlock(void);
void flash_lock(void); void flash_lock(void);
void flash_clear_pgperr_flag(void); void flash_clear_pgperr_flag(void);
void flash_clear_eop_flag(void); void flash_clear_eop_flag(void);
void flash_clear_bsy_flag(void);
void flash_wait_for_last_operation(void); void flash_wait_for_last_operation(void);
void flash_dcache_enable(void); void flash_dcache_enable(void);
void flash_dcache_disable(void); void flash_dcache_disable(void);

View File

@ -127,16 +127,6 @@ void flash_clear_wrprterr_flag(void)
FLASH_SR |= FLASH_SR_WRPRTERR; 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 /** @brief Wait until Last Operation has Ended

View File

@ -92,16 +92,6 @@ void flash_clear_eop_flag(void)
FLASH_SR |= FLASH_SR_EOP; 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 /** @brief Wait until Last Operation has Ended

View File

@ -176,7 +176,6 @@ void flash_clear_status_flags(void)
flash_clear_wrperr_flag(); flash_clear_wrperr_flag();
flash_clear_pgperr_flag(); flash_clear_pgperr_flag();
flash_clear_eop_flag(); flash_clear_eop_flag();
flash_clear_bsy_flag();
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/

View File

@ -61,7 +61,6 @@ void flash_clear_status_flags(void)
flash_clear_pgerr_flag(); flash_clear_pgerr_flag();
flash_clear_eop_flag(); flash_clear_eop_flag();
flash_clear_wrprterr_flag(); flash_clear_wrprterr_flag();
flash_clear_bsy_flag();
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/

View File

@ -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 /** @brief Clear All Status Flags
@ -178,12 +166,10 @@ void flash_clear_status_flags(void)
flash_clear_pgerr_flag(); flash_clear_pgerr_flag();
flash_clear_eop_flag(); flash_clear_eop_flag();
flash_clear_wrprterr_flag(); flash_clear_wrprterr_flag();
flash_clear_bsy_flag();
if (DESIG_FLASH_SIZE > 512) { if (DESIG_FLASH_SIZE > 512) {
flash_clear_pgerr_flag_upper(); flash_clear_pgerr_flag_upper();
flash_clear_eop_flag_upper(); flash_clear_eop_flag_upper();
flash_clear_wrprterr_flag_upper(); flash_clear_wrprterr_flag_upper();
flash_clear_bsy_flag_upper();
} }
} }

View File

@ -56,7 +56,6 @@ void flash_clear_status_flags(void)
{ {
flash_clear_pgperr_flag(); flash_clear_pgperr_flag();
flash_clear_eop_flag(); flash_clear_eop_flag();
flash_clear_bsy_flag();
} }
/** /**

View File

@ -122,14 +122,6 @@ void flash_clear_eop_flag(void)
FLASH_SR |= FLASH_SR_EOP; 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 /** @brief Wait until Last Operation has Ended
* This loops indefinitely until an operation (write or erase) has completed * This loops indefinitely until an operation (write or erase) has completed
* by testing the busy flag. * by testing the busy flag.
@ -216,7 +208,6 @@ void flash_clear_status_flags(void)
flash_clear_wrperr_flag(); flash_clear_wrperr_flag();
flash_clear_pgperr_flag(); flash_clear_pgperr_flag();
flash_clear_eop_flag(); flash_clear_eop_flag();
flash_clear_bsy_flag();
} }
/** @brief Unlock the Option Byte Access /** @brief Unlock the Option Byte Access