soc: stm32f4xx: Make missing flash latency info a compile error

If the flash latency isn't set most STM32F4xx MCU's won't be able
to run from flash when the CPU frequency is changed.  Make this a
compile time error instead of an assert at runtime.

Change-Id: Ic3421194545f8f83bd6e00f0cd011306c8d1eedd
Signed-off-by: Christer Weinigel <christer@weinigel.se>
This commit is contained in:
Christer Weinigel 2017-01-29 10:35:43 +01:00 committed by Kumar Gala
commit 73cf531975

View file

@ -90,9 +90,7 @@ static inline void __setup_flash(void)
regs->acr.bit.latency = STM32F4X_FLASH_LATENCY_5;
}
#else
else {
__ASSERT(0, "Flash latency not set");
}
#error Flash latency configuration for MCU model is missing
#endif
/* Make sure latency was set */