2018-12-18 12:08 PM
Hi.
I downloaded some IWDG example code from Keil because I will use the IWDG-feature of my STM32F107. Configurations/init are located in this procedure:
//__inline static void stm32_IwdgSetup (void) {
static void stm32_IwdgSetup (void) {
RCC->CSR |= (1<<0); // LSI (internal low speed oscillator) enable, necessary for IWDG
while ((RCC->CSR & (1<<1)) == 0); // wait till LSI is ready
/*----------------------------------------------------------------------------
Define IWDG PR and RLR settings
*----------------------------------------------------------------------------*/
IWDG->KR = 0x5555; // enable write to PR, RLR
IWDG->PR = 1;
IWDG->RLR = 400;
IWDG->KR = 0xAAAA; // Reload the watchdog
IWDG->KR = 0xCCCC; // Start the watchdog
} // end of stm32_IwdgSetup
The following is happening when debugging:
I very much appreciate some assistance to this issue.
Best regards Terje Bøhler
2018-12-18 12:33 PM
Is NRST driven HIGH externally? ie not a pull-up, rather some other circuit with a push-pull driver?
The DBGMCU settings can alter some behaviour, executing at 0x21000000 not one I'm familiar with.