Page 1 of 1

Using STM32 PB PORTB GPIOB Pin Pad Port

Posted: Sat Sep 01, 2012 5:58 am
by bsprajc
At reset, the STM32 will have PB4 and PB3 mapped to JTAG function by default.
To use these pins as normal I/O, you must disable JTAG:

// disable JTAG
AFIO->MAPR |= AFIO_MAPR_SWJ_CFG_JTAGDISABLE;

I discovered this when I realized PB4 and PB3 were changing when I was changing PB10

I hope some will find this piece of information useful.

Barry

Re: Using STM32 PB PORTB GPIOB Pin Pad Port

Posted: Sat Sep 01, 2012 7:17 am
by bsprajc
Also, add this too....

AFIO->MAPR |= AFIO_MAPR_SWJ_CFG_DISABLE;