AnsweredAssumed Answered

STM32Cube SystemClock_Config() init code generating WWDG interrupt but WWDG is not enabled.

Question asked by lopez.dean on Jan 15, 2016
Latest reply on Jan 21, 2016 by lopez.dean
Hi all, I'm still relatively new to the Arm Core M3 processor, and trying to get a device up and running using the STM32CubeMX tool compiling with the Atollic Truestudio Lite dev system.  The device I am programming is a STM32L151RETx with the only enabled features bing the SPI, I2C, and several gpio pins, and using a 16 MHz HSE clock source.  I originally wanted to have the busses run at 32 MHz so I used to STM32CubeMX tool to direct the HSE clk through the PWM multiplier circuit to generate the 32 MHz bus clocks, but we found this led to inaccurate clock period due to extreme temperature variations (faster at very cold temps, slower at very hot temps), while the 16 MHz clock remained rock solid, so we decided to forego using the PWM multiplier circuit and use the HSE clock source to drive the bus clocks directly, even if half as fast as they can go.

I used the STM32CubeMX to generate this new startup code with the change to the clock configuration (System Clock Mux set to HSE) , and the new project builds fine, but when loaded onto our device, it generates an exception during the SystemClock_Config() function call in main().  The exception handler called is the WWDG_IRQHandler() but the WWDG is not enable in our project.

I have attached a screen capture of the resultant exception showing the stack trace using the Truestudio debugger.

I am suspecting the STM32CubeMX code is incorrectly enabling the WWDG interrupt, but I am not able spot this yet.  But it is troublesome if this is how the STM32CubeMX code works unaltered.

Am I simply overlooking something in the System Clock Configuration or is this a known bug in the STM32CubeMX code generation?  If a bug, what is the proper fix please?

Thanks in advance for any helpful ideas!