STM32F411CEU6 IWDG_RLR cannot be updated: RVU remains set and RLR stays at 0xFFF
Hello, I am working on an STM32F411CEU6 and I am trying to configure the Independent Watchdog (IWDG) directly through registers. I have encountered a problem where IWDG_RLR cannot be updated. My MCU information is: - MCU: STM32F411CEU6 - Device ID: 0x431 - Revision ID: 0x1000 - IDCODE: 0x10006431 - HCLK: 16 MHz - PCLK1: 16 MHz - System clock: default HSI 16 MHz - LSI: enabled and ready I am using the following register-level code: RCC->CSR |= RCC_CSR_LSION; while (!(RCC->CSR & RCC_CSR_LSIRDY)); IWDG->KR = 0x5555; IWDG->RLR = 250; uint32_t sr1 = IWDG->SR; while ((IWDG->SR & IWDG_SR_RVU) && timeout++ < 1000000); uint32_t sr2 = IWDG->SR; uint32_t rlr = IWDG->RLR & 0xFFF; The result is consistently: SR immediately after writing RLR: RVU = 1 SR after waiting for the update: RVU = 1 RLR: 0xFFF In other words, RVU never clears and RLR remains at its reset value of 4095. I have also verified that the IWDG itself is working. Test 1: PR = 0 RLR = 0xFFF The watchdog resets the MCU after approximately 0.5 seconds, which agrees with: 4096 * 4 / 32 kHz ≈ 0.512 s Test 2: PR = 6 RLR remains 0xFFF The watchdog resets the MCU after approximately 30+ seconds, which is consistent with: 4096 * 256 / 32 kHz ≈ 32.8 s Therefore, the LSI and IWDG counter appear to be working correctly. However, RLR cannot be updated. I also checked the STM32F411 errata sheet (ES0287), which mentions an IWDG issue where RVU may remain set if the APB clock is less than twice the IWDG clock. However, in my case: PCLK1 = 16 MHz LSI ≈ 32 kHz so: PCLK1 >> 2 × LSI Therefore, this condition does not seem to apply. I have also tried disconnecting the ST-LINK debugger and powering the board independently, so I don't think debugger freeze is involved. My questions are: 1. Is there any known issue with IWDG_RLR/RVU on STM32F411CEU6 with revision ID 0x1000? 2. Is there any additional condition required before writing IWDG_RLR? 3. Why would RVU remain set indefinitely even though PCLK1 is 16 MHz? 4. Could this indicate a silicon issue or a specific erratum for this revision? Any advice or clarification from ST would be greatly appreciated. Thank you.
The following values were read directly from the MCU: IDCODE = 0x10006431 DEV_ID = 0x431 REV_ID = 0x1000 SystemCoreClock = 16000000
Testcode:IWDG->KR = 0x5555; IWDG->RLR = 250; sr1 = IWDG->SR; t = 0; while ((IWDG->SR & IWDG_SR_RVU) && t++ < 1000000); delay_ms(50); sr2 = IWDG->SR; rlr = IWDG->RLR & 0xFFF;
Result:H1 = 2 H2 = 2 T = 4095
