on mapping gpio to EXTI on stm32f479xx
Hello,
I'm maintaining an RTOS application. It apparently has some GPIOs configured as input interrupts and its startup assembler code has some references to EXTI interrupt lines and handlers like this.
...
.word EXTI0_IRQHandler /* EXTI Line0 */
.word EXTI1_IRQHandler /* EXTI Line1 */
.word EXTI2_IRQHandler /* EXTI Line2 */
...
.weak EXTI0_IRQHandler
.thumb_set EXTI0_IRQHandler,Default_Handler
.weak EXTI1_IRQHandler
.thumb_set EXTI1_IRQHandler,Default_Handler
...
But what I don't understand is that no part of the GPIO/even the whole project code has a mapping from GPIO (bank, port no) to the EXTI line. I'm wondering where this is configured and how it works? The gpio code has some references to configure some parms of these EXTI lines like these, but not the mapping.
GPIO_InitStructure.Mode = GPIO_MODE_IT_FALLING;
GPIO_InitStructure.Pin = SensorDef.pin;
HAL_GPIO_Init(SensorDef.bank, &GPIO_InitStructure);
/* Enable and set EXTI line 0 Interrupt to the lowest priority */
HAL_NVIC_SetPriority(EXTI0_IRQn, 2, 0);
HAL_NVIC_EnableIRQ(EXTI0_IRQn);
Please explain briefly how this mapping works (Can multiple gpios be sent a single EXTI line?) and configured. I searched in the forum and there are references to this API something like this
- /* Connect EXTI Line3 to PA3 pin */
- SYSCFG_EXTILineConfig(EXTI_PortSourceGPIOA, EXTI_PinSource3);
But my code does not have this API and somehow still works. I'm wondering if this mapping is set in bootloader or somewhere else.
Thx
