2022-03-11 01:13 PM
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!
2022-03-11 05:45 PM
> 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.
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.
2022-03-14 05:29 AM
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!
2022-03-16 09:03 AM
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.