stm32f4: power: update rcc_clock_scale enum
- Change .power_save to .voltage_scale, a pwr_vos_scale enum - Enable pwr clock before setting VOS scale - Fix flash wait states - Make flash_set_ws more robust
This commit is contained in:
committed by
Karl Palsson
parent
e076c3cadd
commit
cc8c8a2f83
@@ -39,10 +39,8 @@ speed, or <b>after</b> any decrease in clock speed.
|
||||
void flash_set_ws(uint32_t ws)
|
||||
{
|
||||
uint32_t reg32;
|
||||
|
||||
reg32 = FLASH_ACR;
|
||||
reg32 &= ~(FLASH_ACR_LATENCY_MASK);
|
||||
reg32 |= ws;
|
||||
reg32 = FLASH_ACR & ~(FLASH_ACR_LATENCY_MASK);
|
||||
reg32 |= ws & FLASH_ACR_LATENCY_MASK;
|
||||
FLASH_ACR = reg32;
|
||||
}
|
||||
|
||||
@@ -117,4 +115,3 @@ void flash_wait_for_last_operation(void)
|
||||
while ((FLASH_SR & FLASH_SR_BSY) == FLASH_SR_BSY);
|
||||
}
|
||||
/**@}*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user