cancel
Showing results for 
Search instead for 
Did you mean: 

Disable VCOM in SubGHz_Phy middleware

nogema
Associate II

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

1 ACCEPTED SOLUTION

Accepted Solutions
nogema
Associate II

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

View solution in original post

3 REPLIES 3
Louis AUDOLY
ST Employee

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

nogema
Associate II

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

Louis AUDOLY
ST Employee

Hello,

Thank you for your feedback !

Regards