AnsweredAssumed Answered

Nucleo blue user button and exti in HAL

Question asked by santitonis on Feb 24, 2015
Latest reply on Feb 26, 2015 by santitonis
Is it possible to configure external interrupt for blue user button on Nucleo bord (which is PC13) using HAL library?

As given in examples for EXTI_Line0 connected to PA.00 pin: 

     GPIO_InitTypeDef   GPIO_InitStructure;
      __HAL_RCC_GPIOA_CLK_ENABLE();
     GPIO_InitStructure.Mode = GPIO_MODE_IT_RISING;
     GPIO_InitStructure.Pull = GPIO_NOPULL;
     GPIO_InitStructure.Pin = GPIO_PIN_0;
     HAL_GPIO_Init(GPIOA, &GPIO_InitStructure);

     HAL_NVIC_SetPriority(EXTI0_IRQn, 2, 0);
     HAL_NVIC_EnableIRQ(EXTI0_IRQn);

Theoretically for PC13 it should look like:

     GPIO_InitTypeDef   GPIO_InitStructure;
      __HAL_RCC_GPIOC_CLK_ENABLE();
     GPIO_InitStructure.Mode = GPIO_MODE_IT_RISING;
     GPIO_InitStructure.Pull = GPIO_NOPULL;
     GPIO_InitStructure.Pin = GPIO_PIN_13;
     HAL_GPIO_Init(GPIOC, &GPIO_InitStructure);

     HAL_NVIC_SetPriority(EXTI13_IRQn, 2, 0);
     HAL_NVIC_EnableIRQ(EXTI13_IRQn);

But EXTI13 doesn't exist in HAL library. Any solution?

Outcomes