Skip to main content
dost
Associate II
July 20, 2016
Solved

CubeMX Bug Report: HAL for STM32L0 series

  • July 20, 2016
  • 2 replies
  • 874 views
Posted on July 20, 2016 at 09:43

Hi,

in the last time I played with the power modes of the STM32L0 and discovered an issue with the GPIO-HAL driver.

The used version of the HAL is 1.7.0 with a STM32L053 nucleo board.

I discovered that the initialization of USART-TX and -RX pins will increase the power consumption in STOP mode considerably. So I tried to deinitialize the pins to their reset state with the function HAL_GPIO_DeInit() before going into STOP mode.

But the consumption remains the same so I looked into the DeInit-function and recognized the line where the I/O mode is changed (line 327 in stm32l0xx_hal_gpio.c):

GPIOx->MODER &= ~(GPIO_MODER_MODE0 << (position * 2U));

The I/O mode is changed to ''input'' but the reference manual for the controller (RM0367) says in chapter 9.4.1 that the reset state for the I/O mode is ''Analog'' .

According to this I changed the line 327 to

GPIOx->MODER |= (GPIO_MODER_MODE0 << (position * 2U));

and the power consumption get decreased as expected.

Best regards,

Markus

#stm32l0 #hal #bug #cubemx
This topic has been closed for replies.
Best answer by Imen.D
Posted on January 19, 2017 at 18:53

Dear 

 ,

I want to thank you for your bug report, this is helpful for us to improve our SW offers.

I'm pleased to announce that your reported issue is fixed in the new release of STM32CubeL0 V1.8.0.

Thank you for your contribution and all your feedback are welcome.

Best Regards

Imen

2 replies

Walid FTITI_O
Visitor II
July 20, 2016
Posted on July 20, 2016 at 16:01

Hi dost.markus,

Thanks for the feedbacks , I report it internally to be fixed.

-Hannibal-

Imen.DAnswer
Technical Moderator
January 19, 2017
Posted on January 19, 2017 at 18:53

Dear 

 ,

I want to thank you for your bug report, this is helpful for us to improve our SW offers.

I'm pleased to announce that your reported issue is fixed in the new release of STM32CubeL0 V1.8.0.

Thank you for your contribution and all your feedback are welcome.

Best Regards

Imen

"When your question is answered, please close this topic by clicking ""Accept as Solution"".ThanksImen"