2026-03-30 6:28 AM
I want to disable the AGC and use supply manual attenuation values.
Disabling the AGC is pretty straight forward, I just set the AGC_EN bit in AGC0CTRL to zero.
This works fine, but the gain/attenuation is fixed at the reset value and I'd like to use a custom value.
To set manual attenuation values, I suppose I need to write them to the AGC_ANA_ENG register.
However, i noticed something weird: This AGC_ANA_ENG register is not present in the driver files. Its not mentioned anywhere and in the MRSUBG register definitions it is listed as "Reserved". The "Description of STM32WL3 HAL and LL drivers" pdf (UM3438) even lists a couple of LL-functions to modify it, such as LL_MRSubG_SetAgcForceGains, but they exist nowhere in the driver files.
Why is this register not mentioned in the official driver files and why dont the LL-methods exist?
Solved! Go to Solution.
2026-04-01 6:32 AM
Hello @mkx ,
The API is located in: Drivers\STM32WL3x_HAL_Driver\Inc\stm32wl3x_ll_mrsubg.h as LL_MRSUBG_SetAgcForceGains.
2026-04-01 6:32 AM
Hello @mkx ,
The API is located in: Drivers\STM32WL3x_HAL_Driver\Inc\stm32wl3x_ll_mrsubg.h as LL_MRSUBG_SetAgcForceGains.
2026-04-08 12:06 AM
Maybe I'm missing something here, but stm32wl3x_ll_mrsubg.h does not seem to contain LL_MRSUBG_SetAgcForceGains.
https://github.com/STMicroelectronics/stm32wl3x-hal-driver/blob/main/Inc/stm32wl3x_ll_mrsubg.h
I'm using the stm32wl3x-hal-driver repo on github, release 1.3.0. It does not contain LL_MRSUBG_SetAgcForceGains.
2026-04-09 1:25 AM
Hi @mkx ,
The API LL_MRSUBG_SetAgcForceGains is included in stm32wl3x_ll_mrsubg.h and is available on the ST web page starting from release 1.4.0: STM32CubeWL3 | Product - STMicroelectronics
2026-04-09 1:47 AM
Alright, looks like I was just using an outdated version then, thanks!
I wasn't aware you also offer the drivers directly on st.com and - somewhat confusingly - a newer version than in the github repos.