Problem Definition
Board: STM32F407
Hello all,
I am trying to change any register value. But it doesn't change. For example if we look GPIOB port's MODER register it has default "0x0000 0280" value for port B. This means that MODER registers 7 and 9 have a value of 1, other MODER registers have a value of 0. I am trying to change 1 to 0 for MODER 7 register. I am sharing the simple one-line I did below.
GPIOB ->MODER &= ~(1 << 7);
I am debugging the code. And register value doesn't change. I tried for some another register to see whether it is done or not. Bu it didn't. What can I do, what is my fault.
Thank in advance
You need to enable the GPIOB clock in one of the RCC regesters first.
If the clock is disabled the digital part of the peripheral is disabled too.