AnsweredAssumed Answered

Help need with Interrupts

Question asked by grossi.marco on Jun 12, 2015
Latest reply on Jun 12, 2015 by Clive One
I need to set up an interrupt on the digital line PB10 using a STM32L microcontroller

I have done this with the line PA0 using the following code:

void initialize_EXTINT()

 

{

 

  RCC_APB2PeriphClockCmd(RCC_APB2Periph_SYSCFG, ENABLE);

 

 

 

  SYSCFG_EXTILineConfig(EXTI_PortSourceGPIOA, EXTI_PinSource0);

 

 

 

  EXTI_InitTypeDef EXTI_InitStructure;

 

  EXTI_InitStructure.EXTI_Line = EXTI_Line0;

 

  EXTI_InitStructure.EXTI_Mode = EXTI_Mode_Interrupt;

 

  EXTI_InitStructure.EXTI_Trigger = EXTI_Trigger_Rising;

 

  EXTI_InitStructure.EXTI_LineCmd = ENABLE;

 

  EXTI_Init(&EXTI_InitStructure);

 

 

 

  NVIC_InitTypeDef NVIC_InitStructure;

 

  NVIC_InitStructure.NVIC_IRQChannel = EXTI0_IRQn;

 

  NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0x0F;

 

  NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0x0F;

 

  NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;

 

  NVIC_Init(&NVIC_InitStructure);

}

The problem with PB10 is that EXTI10_IRQn does not exist.
Can anyone suggest how to modify the code to set the interrup on PB10.
Thanks.

Outcomes