Пытаюсь настроить прерывания на порт H (pin0). По примеру отсюда сделал так
Код: Выделить всё
int main(void)
{
SystemInit();
SYSCFG_EXTILineConfig(EXTI_PortSourceGPIOH, EXTI_PinSource0);
EXTI_InitTypeDef EXTI_InitStucture;
EXTI_InitStucture.EXTI_Line = EXTI_Line0;
EXTI_InitStucture.EXTI_Mode = EXTI_Mode_Interrupt;
EXTI_InitStucture.EXTI_Trigger = EXTI_Trigger_Rising;
EXTI_InitStucture.EXTI_LineCmd = ENABLE;
EXTI_Init(&EXTI_InitStucture);
NVIC_PriorityGroupConfig(NVIC_PriorityGroup_0);
NVIC_InitTypeDef NVIC_InitStructure;
NVIC_InitStructure.NVIC_IRQChannel = EXTI0_IRQn;
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0;
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0;
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
NVIC_Init(&NVIC_InitStructure);
}
void EXTI0_IRQHandler(void){
i++;
}


