Question
STM32L4 register setting
Posted on May 03, 2018 at 19:43
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' 3 4 5 int main(void) 6 { 7 PWR->CR2 = 1U; 8 FLASH->ACR |= 1U <<2; 9 }