2017-06-18 10:43 PM
I am using a custom STM32L051xxx, I want to change these two programing ports to PP outputs.
I think I need to DeInit them then apply the normal Init procedure, I cand see how to DeInit these ports.
Thanks
Kevin NZ
Solved! Go to Solution.
2017-06-19 09:15 PM
Thanks for that Zhitai, all working.
2017-06-19 08:59 AM
If you are using hal library......
DeInit pins:
void HAL_GPIO_DeInit(GPIOA, GPIO_PIN_13 |GPIO_PIN_14);
Config as Output PushPull:
GPIO_InitTypeDef GPIO_InitStruct;
__HAL_RCC_GPIOA_CLK_ENABLE();
GPIO_InitStruct.Pin = GPIO_PIN_13 | GPIO_PIN_14;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
Is that what you want? You may check this routines in stm32l0xx_hal_gpio.c
2017-06-19 09:15 PM
Thanks for that Zhitai, all working.