/* Enable instruction cache, prefetch and set the Flash wait latency according to the clock configuration used (HCLK value). We  */
void envm_config(u32 wait_states)
/* Enable instruction cache, prefetch and set the Flash wait latency according to the clock configuration used (HCLK value). We  */
void envm_config(u32 wait_states)
{
	if (wait_states > STM32_FLASH_ACR_LAT_MSK)
		wait_states = STM32_FLASH_ACR_LAT_MSK;
	STM32_FLASH_REGS->acr = STM32_FLASH_ACR_PRFTEN |
			  STM32_FLASH_ACR_ICEN |
			  (wait_states << STM32_FLASH_ACR_LAT_BIT);
}