stm32f3: flash: add prefetch helpers
Should be added to f2/f4 as well, but the bit definitions are different.
This commit is contained in:
@@ -58,5 +58,26 @@ void flash_clear_status_flags(void)
|
||||
flash_clear_eop_flag();
|
||||
flash_clear_bsy_flag();
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable the FLASH Prefetch Buffer
|
||||
* This buffer is used for instruction fetches and is enabled by default after
|
||||
* reset.
|
||||
*/
|
||||
void flash_prefetch_enable(void)
|
||||
{
|
||||
FLASH_ACR |= FLASH_ACR_PRFTBE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Disable the FLASH Prefetch Buffer
|
||||
* This buffer is used for instruction fetches and is enabled by default after
|
||||
* reset.
|
||||
*/
|
||||
void flash_prefetch_disable(void)
|
||||
{
|
||||
FLASH_ACR &= ~FLASH_ACR_PRFTBE;
|
||||
}
|
||||
|
||||
/**@}*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user