2020-01-05 11:32 AM
I do LL_GPIO_SetOutputPin() before LL_GPIO_Init() so the ODR-Register is preloaded and the pin goes directly from Hi-Z to Highlevel. However, in LL_GPIO_Init() there is a call to LL_GPIO_SetPinPull() wich sets the ODR to an unwanted value. This call should only be done for Input-pins (in my opinion). I am using the STM32CubeMX-generated code (STM32Cube FW_F1 V1.8.0). The problematic behavior is in stm32f1xx_ll_gpio.c#196
2020-01-05 12:52 PM
As you have looked at the code, you can see that the answer is no.
CubeMX and the HAL and LL libraries cover only a small part of the capabilities of STM32 MCUs. You have hit a use case that the authors did not anticipate.
Looks like you are familiar with the GPIO registers and functionality, so nothing prevents you from replace HAL with actually functioning code.