Where did the BRR go?
Posted: Sat Nov 07, 2020 5:31 pm
I have an application where in an interrupt I need to set and reset GPIOs quickly. When I want to reset bits, I used the BRR (Bit Reset Register).
For example:
Now I've upgraded Chibios and this code no longer compiles. The compiler suggests a different register in the GPIO struct, and searching for that I found the GPIO_TypeDef struct which included that register as well as the BRR on my processor (STM32F030C8T6).
Turns out that:
Does work.
Why was "normal" access to GPIOF->BRR removed?????
For example:
Code: Select all
GPIOF->BRR = 1;
Now I've upgraded Chibios and this code no longer compiles. The compiler suggests a different register in the GPIO struct, and searching for that I found the GPIO_TypeDef struct which included that register as well as the BRR on my processor (STM32F030C8T6).
Turns out that:
Code: Select all
#define mGPIOF ((GPIO_TypeDef *)GPIOF)
mGPIOF->BRR = 1;
Why was "normal" access to GPIOF->BRR removed?????