2016-07-20 12:43 AM
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 toGPIOx->MODER |= (GPIO_MODER_MODE0 << (position * 2U));
and the power consumption get decreased as expected. Best regards, Markus #stm32l0 #hal #bug #cubemxSolved! Go to Solution.
2017-01-19 09:53 AM
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
2016-07-20 07:01 AM
Hi dost.markus,
Thanks for the feedbacks , I report it internally to be fixed. -Hannibal-2017-01-19 09:53 AM
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