Closed Frimi closed 4 years ago
In my microcontroller the pins are started by default as an analog mode (to save energy), so it would be interesting to ensure that the pin is configured as an input before starting the interrupt configuration process.
Just by adding this line:
//Configure GPIO as input pGPIOHandle->pGPIOx->MODER &= ~( 0x3 << (2 * pGPIOHandle->GPIO_PinConfig.GPIO_PinNumber));
In my microcontroller the pins are started by default as an analog mode (to save energy), so it would be interesting to ensure that the pin is configured as an input before starting the interrupt configuration process.
Just by adding this line:
//Configure GPIO as input pGPIOHandle->pGPIOx->MODER &= ~( 0x3 << (2 * pGPIOHandle->GPIO_PinConfig.GPIO_PinNumber));