AnsweredAssumed Answered

wwdg immediately resetting device? EVAL board problem?

Question asked by blesener.daniel on Aug 21, 2012
I am using an stm32f103ZET6. I only have some clocks and systick set up. I am starting the setup on the STM32-DOT-BAORD V1.0. Below is the verys imply code starting my wwdg. I am not trying to load the downcounter in my window yet, just get the wwdg to not reset immediately. I am not sure what could be wrong, this should be so simple.
My system core clock is sourcing PLL (HSI/2), and post-scaling at a value of 12, giving a system clock frequency of 48MHz.. AHB prescaler is set to 8, giving APB1 input clock signal of 6MHz. Looking at page 90-91 of the reference manual for this chip, you can see the diagram showing clock-to-clock figures, and the calculations for watchdog timeout time. 

The only time I even get a few steps past the enable statement is when I have a wwdg_prescaler of 8 and a RCC_HCLK prescaler of 16. So my frequency is acting as if it is super high? 

    RCC_APB1PeriphClockCmd(RCC_APB1Periph_WWDG, ENABLE);  
    RCC_PCLK1Config(RCC_HCLK_Div16);                    
    WWDG_SetPrescaler(WWDG_Prescaler_8);               
    WWDG_SetWindowValue(0x7F);                            
    WWDG_Enable(0x7F); 
    GPIO_WriteBit(GPIOE,GPIO_Pin_2, Bit_SET); 

I have tried playing around with the DBGMCU register, but, from what I have tried nothing has worked. The only option I know that could make a change from this register is below.
  DBGMCU ->CR =DBGMCU_CR_DBG_WWDG_STOP;

Thanks for any help. 

Outcomes