Trouble configuring STM32 IO for PUSHPULL mode
Posted: Wed Sep 05, 2012 5:25 am
Hi,
I'm trying to configure GPIOB pins on the STM32 Value line Discovery board, for PUSHPULL mode, and am running into some strange results. I must be missing something critical.
/* THIS will actually put the pins in PUSHPULL mode */
palSetGroupMode(GPIOB,0xffff,0,PAL_MODE_OUTPUT_OPENDRAIN );
/* This puts in ins in Open Drain mode */
palSetGroupMode(GPIOB,0xffff,0,PAL_MODE_OUTPUT_PUSHPULL );
Also, when using PAL_MODE_OUTPUT_OPENDRAIN, all pads will go into PUSHPULL mode, except for pads PB7,PB5, and PB4 which remain in open drain mode.
I've disabled all periphials except for serial device 2, and have disabled JTAG:
AFIO->MAPR |= AFIO_MAPR_SWJ_CFG_JTAGDISABLE;
AFIO->MAPR |= AFIO_MAPR_SWJ_CFG_DISABLE;
I hope somebody has a clue what I'm doing wrong.
Thanks
Barry
I'm trying to configure GPIOB pins on the STM32 Value line Discovery board, for PUSHPULL mode, and am running into some strange results. I must be missing something critical.
/* THIS will actually put the pins in PUSHPULL mode */
palSetGroupMode(GPIOB,0xffff,0,PAL_MODE_OUTPUT_OPENDRAIN );
/* This puts in ins in Open Drain mode */
palSetGroupMode(GPIOB,0xffff,0,PAL_MODE_OUTPUT_PUSHPULL );
Also, when using PAL_MODE_OUTPUT_OPENDRAIN, all pads will go into PUSHPULL mode, except for pads PB7,PB5, and PB4 which remain in open drain mode.
I've disabled all periphials except for serial device 2, and have disabled JTAG:
AFIO->MAPR |= AFIO_MAPR_SWJ_CFG_JTAGDISABLE;
AFIO->MAPR |= AFIO_MAPR_SWJ_CFG_DISABLE;
I hope somebody has a clue what I'm doing wrong.
Thanks
Barry