Open NavadeepGaneshU opened 2 years ago
This register is actually a special case and it is cleared by writing 1. You can find this mentioned in the register details in the reference manual.
The tutorial shows it correctly, but the committed code has issues. I was confused by this mismatch while comparing the code. This is as shown in the tutorial:
/********************************************************* * @fn - GPIO_IRQHandling * @brief - Interrupt handling * * @param[in] - * @param[in] - * * @return - * * @notes - * / void GPIO_IRQHandling(uint8_t PinNumber) { //clear the EXTIPR register if(EXTI ->PR |= (1 << PinNumber)) { //clear EXTI ->PR &= ~(1 << PinNumber); } }
https://github.com/niekiran/MasteringMCU/blob/2742e0297de67851bda72892beed23cd800d1615/Resources/Source_code/Workspace/stm32f4xx_drivers/drivers/src/stm32f407xx_gpio_driver.c#L429
The tutorial shows it correctly, but the committed code has issues. I was confused by this mismatch while comparing the code. This is as shown in the tutorial: