I'm a newbie to STM32 coding and struggling with the following:
I used to code a little bit with STM32F103C8T6, using cubeMx and HAL libraries.
I made a code using the following code to set the pin to High:
GPIOB->BRR = STEP_Pin;
It worked like a charm.
I just try to move my project to an STM32F446RE Nucleo.
I changed a few pieces of my code but I have a compiling error I can't get rid off.
../Src/main.c(175): error: #136: struct "<unnamed>" has no field "BRR"
I have this error for every single line using BRR.
Do you know what I should change?
Config: CubeMx, Keil, HAL Lib, STM32F446RE
Thank you
Best Answer
BRR Register isn't defined for the GPIOs in the STM32F4 MCUs .You can use BSRR regster instead. for more information see the STM32F4-Reference manual page 286 and also STM32f4xx.h file for the registers have been defined for GPIOs.