I've been tearing my hair out over this. I want to use PB3 as a GPIO and am currently doing the following:
Code: Select all
halInit();
chSysInit();
AFIO->MAPR |= ((0b010)<<10); //(tim3 remap)
AFIO->MAPR |= ((0b010)<<24); (SWJ_CONFIG)
palSetPadMode(GPIOB, 3, PAL_MODE_STM32_ALTERNATE_PUSHPULL);
at the beginning of main. But sufficed to say it's still not allowing pb3 to function as GPIO.
What is the correct procedure for this?
Many thanks
Gareth