From 181ca054d723ccc0f3200bf6006892c8eda57d1a Mon Sep 17 00:00:00 2001 From: Karl Palsson Date: Mon, 2 Oct 2017 21:59:28 +0000 Subject: [PATCH] stm32l4: add missing flash wait states Fixes https://github.com/libopencm3/libopencm3/issues/832 --- include/libopencm3/stm32/l4/flash.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/libopencm3/stm32/l4/flash.h b/include/libopencm3/stm32/l4/flash.h index fa76e5fe..bfa100ac 100644 --- a/include/libopencm3/stm32/l4/flash.h +++ b/include/libopencm3/stm32/l4/flash.h @@ -71,12 +71,13 @@ #define FLASH_ACR_PRFTEN (1 << 8) #define FLASH_ACR_LATENCY_SHIFT 0 -#define FLASH_ACR_LATENCY_MASK 0x03 +#define FLASH_ACR_LATENCY_MASK 0x07 #define FLASH_ACR_LATENCY_0WS 0x00 #define FLASH_ACR_LATENCY_1WS 0x01 #define FLASH_ACR_LATENCY_2WS 0x02 #define FLASH_ACR_LATENCY_3WS 0x03 +#define FLASH_ACR_LATENCY_4WS 0x04 /* --- FLASH_SR values ----------------------------------------------------- */