EXTI15_10_IRQHandler; interrupt; PE13
Might need your help to solve this issue. Thank you.
Background:
1. I have a 1 Hz signal, and I'd need this signal to trigger interrupt.
2. Use GPIO as interrupt.
3. Using STM32CUBEMX to generate codes.
4. STM32F769I-EVAL board.
5. Already successfully using PE1 on EXTI1_IRQn, but when I need to add EXTI15_10 in my system. The issue comes.
Questions:
1. I can't find which step or setting is incorrect from Set_GPIO() and EXTI15_10_IRQHandler();
2. It can't work, it does not go into EXTI15_10_IRQHandler.
My codes regarding STM32CUBEMX example.
void Set_SPI1(void)
{
GPIO_InitTypeDef GPIO_InitStruct;
__HAL_RCC_GPIOE_CLK_ENABLE();
// SPI DR GPIO pin as input floating
GPIO_InitStruct.Pin = GPIO_PIN_1;
GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(GPIOE, &GPIO_InitStruct);
// Enable and set EXTI line 1 Interrupt to the lowest priority
HAL_NVIC_SetPriority(EXTI1_IRQn, 2, 0);
HAL_NVIC_EnableIRQ(EXTI1_IRQn);
}
void EXTI1_IRQHandler(void)
{
if(__HAL_GPIO_EXTI_GET_IT(GPIO_PIN_1) != RESET)
{
__HAL_GPIO_EXTI_CLEAR_IT(GPIO_PIN_1);
//----
}
}
void Set_GPIO(void)
{
GPIO_InitTypeDef gpio_init_structure;
__HAL_RCC_GPIOE_CLK_ENABLE(); // Set GPIO_E clock
gpio_init_structure.Pin = GPIO_PIN_13;
gpio_init_structure.Mode = GPIO_MODE_IT_RISING;
gpio_init_structure.Pull = GPIO_NOPULL;
HAL_GPIO_Init(GPIOE, &gpio_init_structure);
// Enable and set EXTI line 15 Interrupt to the lowest priority
HAL_NVIC_SetPriority(EXTI15_10_IRQn, 2, 0);
HAL_NVIC_EnableIRQ(EXTI15_10_IRQn);
}
void EXTI15_10_IRQHandler(void)
{
if(__HAL_GPIO_EXTI_GET_IT(GPIO_PIN_13) != RESET)
{
__HAL_GPIO_EXTI_CLEAR_IT(GPIO_PIN_13);
isr_1pps();
}
}
