PAL : GPIO output default state is high?
Posted: Mon Jun 20, 2016 1:51 pm
Hello,
I have strange behaviour on STM32F072 MCU, when setting pin to push/pull output.
I was expecting logical Low as default state (and according reference manual and StdPeriph sample it should be), but pins have high state.
It is intended, it's a bug, or bad code?
Sample code:
Thank you
I have strange behaviour on STM32F072 MCU, when setting pin to push/pull output.
I was expecting logical Low as default state (and according reference manual and StdPeriph sample it should be), but pins have high state.
It is intended, it's a bug, or bad code?
Sample code:
Code: Select all
palSetPadMode(LED_GREEN_PORT, LED_GREEN_PIN,
PAL_MODE_OUTPUT_PUSHPULL | PAL_STM32_OSPEED_LOWEST);
palSetPadMode(LED_RED_PORT, LED_RED_PIN,
PAL_MODE_OUTPUT_PUSHPULL | PAL_STM32_OSPEED_LOWEST);
palSetPadMode(INT_TEST_PORT, INT_TEST_PIN,
PAL_MODE_OUTPUT_PUSHPULL | PAL_STM32_OSPEED_LOWEST);
palSetPadMode(INT_1_PORT, INT_1_PIN,
PAL_MODE_OUTPUT_PUSHPULL | PAL_STM32_OSPEED_LOWEST);
Thank you