Skip to main content
Willunen
Associate III
March 5, 2018
Solved

CRH support missing in stm32f1xx_ll_gpio.h ?

  • March 5, 2018
  • 3 replies
  • 1461 views
Posted on March 05, 2018 at 20:48

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_ENABLED

and 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 */
    This topic has been closed for replies.
    Best answer by Imen.D
    Posted on March 22, 2018 at 10:04

    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

    3 replies

    Willunen
    WillunenAuthor
    Associate III
    March 6, 2018
    Posted on March 06, 2018 at 10:28

    As an addition to the second question about including HAL drivers instead of LL drivers: a screenshot

    0690X00000604ReQAI.jpg

    No doubt I'm doing something wrong, but I can't find what....

    Technical Moderator
    March 6, 2018
    Posted on March 06, 2018 at 13:45

    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

    In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
    Willunen
    WillunenAuthor
    Associate III
    March 6, 2018
    Posted on March 06, 2018 at 14:48

     ,

     ,

    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 pull

    And 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

    Imen.DBest answer
    Technical Moderator
    March 22, 2018
    Posted on March 22, 2018 at 10:04

    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

    In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks