2022-07-07 08:18 AM
Hello,
I would like to disable the LPUART in my project to save power consumption. I am programming a point to point network with LoRa modem. My project is based on the ping pong subghz example.
Curently, my board consumes around 107 µA in sleep with the stop mode 2 enabled. I would like to reach a consumption in the range of 1 µA.
I think the excessive consumption comes from the LPUART I use to debug. But when I disable the LPUART in CubeMX in the .ioc file and I generate the code, I get compilation errors in stm32_lpm_if.c with vcom_Resume function because usart_if.c does not exist yet.
In fact in .ioc file in the subghz phy middleware section, in platform settings tab, the VCOM section is still present with USART Undefined and No solution.
So is this middleware configurable without UART ?
I am using a custom board with the LoRa E5 STM32WL5EJC module embedded and the STM32WL package.
Thanks you in advance
Regards
EDIT : problem solved but I can't delete my post
Solved! Go to Solution.
2022-07-20 02:43 AM
Hello,
So my problem didn't come from the LPUART. In fact, I changed the "End Node skeleton" to "User defined skeleton" in the .ioc file, I replaced all the functions I used and I unchecked the box "Use UART for Trace" to disable the LPUART (it's only possible with this skeleton, not very practical).
With the LPUART disabled, the consumption wasn't better, sometimes worse.
I went back to the PWR_EnterStopMode example and I realized I didn't copy exactly the code. I think because this example uses LL drivers whereas I use HAL drivers in my firmware but they are compatible. I reach a consumption around 1.9 - 2 µA
Regards
2022-07-20 12:26 AM
Hello @jérôme mathieu ,
I'm glad you were able to solve your problem. Can you share your solution in case someone else encounter the same issue ?
Thank you
Regards
2022-07-20 02:43 AM
Hello,
So my problem didn't come from the LPUART. In fact, I changed the "End Node skeleton" to "User defined skeleton" in the .ioc file, I replaced all the functions I used and I unchecked the box "Use UART for Trace" to disable the LPUART (it's only possible with this skeleton, not very practical).
With the LPUART disabled, the consumption wasn't better, sometimes worse.
I went back to the PWR_EnterStopMode example and I realized I didn't copy exactly the code. I think because this example uses LL drivers whereas I use HAL drivers in my firmware but they are compatible. I reach a consumption around 1.9 - 2 µA
Regards
2022-07-21 12:47 AM
Hello,
Thank you for your feedback !
Regards