diff options
author | Rocco Marco Guglielmi <roccomarco.guglielmi@live.com> | 2016-12-26 09:58:20 +0000 |
---|---|---|
committer | Rocco Marco Guglielmi <roccomarco.guglielmi@live.com> | 2016-12-26 09:58:20 +0000 |
commit | 4b1426b2deef33d987a06bcf964c4be6153746ad (patch) | |
tree | 28ead00832039d0e90bc6b7aa18ec084cb6ecc00 | |
parent | a00002ab53dc2e566b74fbe1b607a37e7e95a419 (diff) | |
download | ChibiOS-4b1426b2deef33d987a06bcf964c4be6153746ad.tar.gz ChibiOS-4b1426b2deef33d987a06bcf964c4be6153746ad.tar.bz2 ChibiOS-4b1426b2deef33d987a06bcf964c4be6153746ad.zip |
Fixed Bug #804
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9989 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r-- | os/hal/ports/STM32/STM32L4xx/hal_lld.c | 4 | ||||
-rw-r--r-- | readme.txt | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/os/hal/ports/STM32/STM32L4xx/hal_lld.c b/os/hal/ports/STM32/STM32L4xx/hal_lld.c index 273c24272..bb7ccc69d 100644 --- a/os/hal/ports/STM32/STM32L4xx/hal_lld.c +++ b/os/hal/ports/STM32/STM32L4xx/hal_lld.c @@ -309,7 +309,7 @@ void stm32_clock_init(void) { /* Set flash WS's for SYSCLK source */
if (STM32_FLASHBITS > STM32_MSI_FLASHBITS)
- FLASH->ACR = STM32_FLASHBITS;
+ FLASH->ACR = (FLASH->ACR & ~FLASH_ACR_LATENCY_Msk) | STM32_FLASHBITS;
/* Switching to the configured SYSCLK source if it is different from MSI.*/
#if (STM32_SW != STM32_SW_MSI)
@@ -321,7 +321,7 @@ void stm32_clock_init(void) { /* Reduce the flash WS's for SYSCLK source if they are less than MSI WSs */
if (STM32_FLASHBITS < STM32_MSI_FLASHBITS)
- FLASH->ACR = STM32_FLASHBITS;
+ FLASH->ACR = (FLASH->ACR & ~FLASH_ACR_LATENCY_Msk) | STM32_FLASHBITS;
#endif /* STM32_NO_INIT */
diff --git a/readme.txt b/readme.txt index 01a82b153..f32db1aa5 100644 --- a/readme.txt +++ b/readme.txt @@ -153,6 +153,8 @@ - RT: Merged RT4.
- NIL: Merged NIL2.
- NIL: Added STM32F7 demo.
+- HAL: Fixed flash waiting state misconfiguration in STM32L4 port (bug #804)
+ (backported to 16.1.6).
- HAL: Added CR field to DAC configuration in STM32 port (bug #803)
(backported to 16.1.6).
- HAL: Fixed wrong initialization for DACD4 in STM32 port (bug #802)
|