2018-03-05 11:48 AM
Using TrueStudio for STM32 v.9.0.0 and STMCubeMX v.4.24.0
STM32F100C8 and Low Layer drivers.
I noticed that LL support for GPIO ports above GPIO_PIN_7 does not work. I tried to use GPIO_PIN_13 on GPIOC but saw that PIN_5 was being configured instead. Browsing through stm32f1xx_ll_gpio.h, I noticed that CRL is, but CRH isn't used anywhere.
Also RCC_MCO doesn't work, as it is on GPIOA PIN_8.
------------
And shouldn't stm32f1xx_hal_conf.h refer to LL drivers instead of HAL drivers when you selected LL in STM32CubeMX?
It says:
#define HAL_CORTEX_MODULE_ENABLED
#define HAL_DMA_MODULE_ENABLED#define HAL_FLASH_MODULE_ENABLED#define HAL_GPIO_MODULE_ENABLED#define HAL_PWR_MODULE_ENABLED#define HAL_RCC_MODULE_ENABLEDand then:
#ifdef HAL_RCC_MODULE_ENABLED
#include 'stm32f1xx_hal_rcc.h'#endif /* HAL_RCC_MODULE_ENABLED */#ifdef HAL_GPIO_MODULE_ENABLED
#include 'stm32f1xx_hal_gpio.h'#endif /* HAL_GPIO_MODULE_ENABLED */ #ifdef HAL_DMA_MODULE_ENABLED #include 'stm32f1xx_hal_dma.h'#endif /* HAL_DMA_MODULE_ENABLED */ #ifdef HAL_ETH_MODULE_ENABLED #include 'stm32f1xx_hal_eth.h'#endif /* HAL_ETH_MODULE_ENABLED */Shouldn't that be:
#ifdef HAL_RCC_MODULE_ENABLED
#include 'stm32f1xx_ll_rcc.h'#endif /* HAL_RCC_MODULE_ENABLED */#ifdef HAL_GPIO_MODULE_ENABLED
#include 'stm32f1xx_ll_gpio.h'#endif /* HAL_GPIO_MODULE_ENABLED */ #ifdef HAL_DMA_MODULE_ENABLED #include 'stm32f1xx_ll_dma.h'#endif /* HAL_DMA_MODULE_ENABLED */ #ifdef HAL_ETH_MODULE_ENABLED #include 'stm32f1xx_ll_eth.h'#endif /* HAL_ETH_MODULE_ENABLED */Solved! Go to Solution.
2018-03-22 02:04 AM
Hello,
We would inform you that
GPIO LL driver issue is fixed in
the new patch of
STM32CubeF1 Firmware package V1.6.1.Kind Regards
Imen
2018-03-06 01:28 AM
As an addition to the second question about including HAL drivers instead of LL drivers: a screenshot
No doubt I'm doing something wrong, but I can't find what....
2018-03-06 04:45 AM
Hello
Lunenburg.Wilko
,I want to thank you for your issues report.
The issue for LL GPIO pins is already confir
med and will be fixed in the next release.https://community.st.com/0D50X00009XkYowSAF
.About
including HAL drivers instead of LL drivers, Iwill check and raise internally your feedback.
Best Regards,
Imen
2018-03-06 06:48 AM
,
,
Thanks Imen, I solved it this way by adding this to MX_GPIO_Init
RCC->,APB2ENR |= RCC_APB2ENR_IOPCEN, , , , , , , , , , , , , , , , , , , //enable APB2_clock GPIOC
,
GPIOC->,CRH |= GPIO_CRH_MODE13_1, , , , , , , , , , , , , , , , , , , , , , , , ,//PC13 output,
GPIOC->,CRH &,= ~GPIO_CRH_CNF13, , , , , , , , , , , , , , , , , , , , , , , , , , , ,//PC13 push pullAnd by changing the stm32f1xx_hal_conf.h like this:
♯ ifdef HAL_RCC_MODULE_ENABLED
,
, ♯ include 'stm32f1xx_ll_rcc.h' , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , //changed from _hal_ to _ll_,
♯ endif /* HAL_RCC_MODULE_ENABLED */♯ ifdef HAL_GPIO_MODULE_ENABLED
,
, ♯ include 'stm32f1xx_ll_gpio.h',
♯ endif /* HAL_GPIO_MODULE_ENABLED */,
..
.
,
Kind Regards,
Wilko
2018-03-10 02:10 AM
Hello Imen,
You said '
About
including HAL drivers instead of LL drivers, I will check and raise internally your feedback'. I do not think that is needed as the file stm32f1xx_hal_conf.h isn't used at all. I deleted it with no ill effects. The correct Includes are done in main.h.
Kind Regards,
Wilko
2018-03-12 03:18 AM
Hello
Lunenburg.Wilko
,After check and regenerated an example using STM32CubeMX version 4.0. The generated stm32f1xx_hal_conf.h is not conformal to stm32f1xx_hal_conf_template.h contains an extra include of 'main.h' !So, you should remove the extra include of main.h.
This issue is already reportedinCubeMx team.
Kind Regards,
Imen
2018-03-22 02:04 AM
Hello,
We would inform you that
GPIO LL driver issue is fixed in
the new patch of
STM32CubeF1 Firmware package V1.6.1.Kind Regards
Imen