cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G4 HAL LL Power Management

tangotoo
Associate II

How do I include the HAL power drivers in cube mx? I have an STM32G4 per the documentation here link I should be able to load the HAL LL Power driver. I am currently porting over code from pre CubeMX where they directly included all the stm32g4xx_ll_pwr files (the old way). The GUI in the .ioc doesn't list PWR under any option I can find. Its not under Software Packs/HAL/Drivers either. I am running version 1.5.0 of the firmware. Did they move away from HAL PWR in this version?

Thanks!

3 REPLIES 3
TDK
Guru

> STM32G4 HAL LL 

> How do I include the HAL power drivers

> load the HAL LL Power driver

> stm32g4xx_ll_pwr files

> HAL PWR

HAL and LL are (mostly) separate libraries and it's unclear from your post which you're talking about.

If you're talking about the HAL PWR library, it should be included by default. It is for me on a brand new project with nothing enabled.

0693W00000KcKqIQAV.png 

If you're talking about the LL library, set the RCC library to LL under Project Manager -> Advanced Settings -> Driver selector and generate code. PWR is included with that.

0693W00000KcKqhQAF.png 

If you feel a post has answered your question, please click "Accept as Solution".
tangotoo
Associate II

Thank you for the clarification. I was referring the the xx_ll_pwr.h you pointed out. Since the documents listed HAL and ll drivers in the same doc I assumed they were considered a unit. I will implement that today. Thanks!

When I implemented this, I noticed once I added the USB device back in via/pin and config tab, it switches the rcc back to HAL. This was causing the pwr to revert to hal too. Oddly, the usb driver is included as ll_usb. I'm assuming this is operator error of some kind on my end, not sure if its a bug.