AnsweredAssumed Answered

STM32L4 register setting

Question asked by M. Jeong on May 3, 2018
Latest reply on May 3, 2018 by Andrei Chichak

I'm trying to program STM32L4-discovery board using the registers of ST32L4 only. I wanted to modify flash latency and see if the register value really changes by using gdb. However, it turned out that the following simple program doesn't make any change in FLASH->ACR and PWR->CR2. Is it normal that you cannot just write to the registers?



   1 #include "main.h"
    2 #include "stm32l4xx.h"
    5 int main(void)
    6 {
    7     PWR->CR2 = 1U;
    8     FLASH->ACR |= 1U <<2;
    9 }