Using STM32 PB PORTB GPIOB Pin Pad Port

ChibiOS public support forum for all topics not covered by a specific support forum.

Moderators: RoccoMarco, lbednarz, tfAteba

Post Reply
bsprajc
Posts: 6
Joined: Fri Aug 24, 2012 11:28 pm

Using STM32 PB PORTB GPIOB Pin Pad Port

Post 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
bsprajc
Posts: 6
Joined: Fri Aug 24, 2012 11:28 pm

Re: Using STM32 PB PORTB GPIOB Pin Pad Port

Post by bsprajc »

Also, add this too....

AFIO->MAPR |= AFIO_MAPR_SWJ_CFG_DISABLE;
Post Reply