Hi all,
I am working on custom firmware on a RAK3172-8-SM-NI module using STM32CubeMX and the STM32 HAL library.
I am running into a clock initialization issue:
HSI (Internal Oscillator): Works fine. The MCU boots up, executes main(), and peripheral code (e.g., GPIO toggling) runs without issues.
HSE (External Oscillator): When I switch the RCC configuration to HSE, SystemClock_Config() hangs and drops into Error_Handler(). Debugging shows it times out inside HAL_RCC_OscConfig() waiting for HSERDY.
CubeMX Setup:
Pic 1 (RCC Configuration): (Screenshot 1 - RCC Configuration here)
Pic 2 (Clock Configuration): (Screenshot 2 - Clock Configuration here)
Could you clarify the correct RCC configuration for the RAK3172’s external clock source in STM32CubeMX?
Thanks in advance for your help!
Welcome to the forum @Bubblegum
Please check our Low Level Development Guide if you want to use STM32CubeIDE with the RAK3172.
Keep in mind that:
This might help as well ==> GitHub - danak6jq/RAK3172: STM32CubeMX regenerable port of STM32WLxx example for RAK3172 · GitHub
Is not this Guide only for Radio Interface?
It is a general guide.
This Low Level Development Guide does not seem to address my issue regarding the RAK3172-8-SM-NI oscillator.
Hi @Bubblegum ,
If you are using STM32CubeMX please check this guide for the IOC file.
https://stm32world.com/wiki/RAK3172#Setting_up_new_project
I haven’t tested it myself but I know it works. It is based on @Hagrid’s work.
Thank you! One more question: RAK3172 WisDuo LoRaWAN Module Low Level Development Reference, refers to STM32WL SDK v1.0.0, v1.2 and v1.3.
RAK Low-Level Development zip file for v1.2.0 works for both v1.2 and v1.3
Currently latest STM32WL SDK is 1.6.0. Can we use same Low-Level Development files with this version?
I haven’t tested on v1.6.0. It can or minor modifications needs to be done. If you try to compile it, the errors you will encounter is primarily based on the changes done by ST on its HAL or Middleware. The radio files we provide are the same and generally useable since it is more on the mapping of IO pins of the RF switch.
