2021-04-21 09:50 AM
Hi,
I wanted to generate interrupt on pins PC14 and PC15 on NUCLEO-F722ZE board but it doesn't work. In the board documentation I found that jumpers configuration should be as per screenshot. Since elements there are pretty small and I don't want to destroy my board can someone confirm if this is the reason why interrupts on pins PC14 and PC15 are not triggered?
For other pins it works (I used the same code as below, only changed pin numbers). I also generated code in CubeMX and I don't see any difference.
void EXTI15_10_IRQHandler (void)
{
GPIOB->BSRR |= GPIO_BSRR_BS14; //Light LED
if (EXTI->PR & EXTI_PR_PR0)
{
EXTI->PR |= (EXTI_PR_PR0);
flagInterrupt = 1;
}
}
void Gpio_Config (void)
{
/* Enable clock for port C */
RCC->AHB1ENR |= RCC_AHB1ENR_GPIOCEN;
/* Set the 15th pin to input */
GPIOC->MODER &= ~(GPIO_MODER_MODER15);
/* Configure pull up on pin 15th of port C - set value to one == set bit 0th */
GPIOC->PUPDR |= GPIO_PUPDR_PUPDR15_0;
}
void Gpio_InterruptConfig (void)
{
/* TODO: Purpose of this register/bit */
/* Enable the SYSCFG - System Configuration controller clock enabled */
RCC->APB2ENR |= RCC_APB2ENR_SYSCFGEN;
SYSCFG->EXTICR[3] |= SYSCFG_EXTICR4_EXTI15_PC;
EXTI->IMR |= EXTI_IMR_IM15;
/* Set the trigger on rising edge (it will trigger once a button is released) */
EXTI->RTSR |= EXTI_RTSR_TR15;
EXTI->FTSR &= ~(EXTI_FTSR_TR15);
}
Solved! Go to Solution.
2021-04-21 12:20 PM
2021-04-21 12:20 PM
Hello
by default PC14,PC15 are not connected to external pins.