This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

bsrr and brr pin settings confusion.

Looking to do some simple pin manipulation here and getting confused by the many 100's of examples that all do things in a different manner. I'm use to the PINB BBRB paradigm... Trying to get an idea of how this works on arm.

for reference I'm working with the stm32f205 using uvision.

Main, issues are
1) Type def is missing this BRR I get no member in GPIO_Type_Def
2) Won't = (1<<7); set all pins to clear but PB8 ?
3) Is PIOB->BSRR |= (1<<7); now a better approach?
4) Will PIOB->BSRR &= ~(1<<7); no undo the above?
5) is MODER simulator to DDR and PUPDR to PORT, if so what is OTYPERI(push pull ) for?

GPIOB->MODER |= GPIO_MODER_MODER7_0;//output GPIOB->OSPEEDR |= GPIO_OSPEEDER_OSPEEDR7;//set max speed GPIOB->OTYPER &= ~GPIO_OTYPER_OT_7;//push pull mode GPIOB->PUPDR &= ~GPIO_OTYPER_OT_7 ;//disable pull up down.

while (1) {

GPIOB->BSRR = (1<<7); osDelay(1000U); GPIOB->BRR = (1<<7); osDelay(1000U); }