cancel
Showing results for 
Search instead for 
Did you mean: 

EXTI15_10_IRQHandler; interrupt; PE13

uNavi
Associate II

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();
    }
}



3 REPLIES 3

Check, if for pin 13 the proper port is selected in the appropriate SYSCFG register. 

Other than that, go through items in the generic "interrupt does not fire" checklist. 

JW

Not clearly. Do you mean I need to consider syscfg_EXTICR1? If yes, how to set it? If not, please advise. 

thanks.

I don't use Cube/CubeMX. I suppose, the code generated by CubeMX should set the appropriate multiplexing register - here, SYSCFG_EXTICR4.EXTI13 - but I can't judge whether it does so by looking at the source.

However, the mcu does not work out of source, it works out of registers. So what I'm suggesting is, look at the relevant registers content - here, SYSCFG_EXTICR4 and EXTI registers; and the link I gave above gives generic hints.

JW