LL_GPIO_Init on STM32F103
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2018-06-20 2:24 PM
I am trying to initialize GPIO ports on STM32F103C8 using the LL library. When I set up pin PC13 by a sequence of individual calls (LL_GPIO_SetPinMode, LL_GPIO_SetPinOutputType), it is initialized correctly. However, when I ask LL_GPIO_Init to do the same, the pin is configured incorrectly (input instead of output). The function call matches both documentation and the code generated by STM32CubeMX.
I suspect that the implementation of LL_GPIO_Init in the STM32F1 firmware package is wrong. It expects GPIO_InitStruct->Pin to be a simple bit mask (as it was in the STM32F0 package), but stm32f1xx_ll_gpio.h for F1 defines it differently ((GPIO_BSRR_BS13 << 8) | 0x04000020U).
#stm32f103- Labels:
-
STM32F1 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2018-06-21 12:28 PM
