The STM32Cube IDE appears to generate misleading code (EXTI12) for what should be EXTI2 (pin is named PMOD-IRQ_EXTI2 according to the Users Manual) on the B-L4S5I-IOT01A board (probably a typo?)
EXTI12 implies that the ARM external interrupt that is triggered is EXTI15_10_IRQn, when actually this pin triggers the EXTI2 interrupt. I think the issue is with the STM32Cube IDE code generator for this particular family of boards. (I tried to use EXTI2 as a software interrupt but when I touched the board in certain places it would cause my code to hang --- well, I thought this vector was available since I didn't see it being used in the configuration tool :) ). I've since solved this minor issue for myself but thought I should share it with ST.
/*Configure GPIO pin : PMOD_IRQ_EXTI12_Pin */
GPIO_InitStruct.Pin = PMOD_IRQ_EXTI12_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING;
GPIO_InitStruct.Pull = GPIO_PULLDOWN;
HAL_GPIO_Init(PMOD_IRQ_EXTI12_GPIO_Port, &GPIO_InitStruct);
I think should be:
/*Configure GPIO pin : PMOD_IRQ_EXTI2_Pin */
GPIO_InitStruct.Pin = PMOD_IRQ_EXTI2_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING;
GPIO_InitStruct.Pull = GPIO_PULLDOWN;
HAL_GPIO_Init(PMOD_IRQ_EXTI12_GPIO_Port, &GPIO_InitStruct);