2022-01-10 02:29 AM
Hi ,
I am working on STM32L0 series controller that has 3 different external interrupts configured on PB11(sensor A),PB2(Sensor B) and PC1(Sensor C).
Peripheral connected to PB11 generates interrupt at 1ms interval and PB2 generates interrupt when data is received on Ethernet.PC1 generates interrupt at 500ms interval. when all peripherals are initialized, i see interrupt generated on PB11 only. No interrupts on PB2 and PC1.
When the sensor A is not initialized, i can see the interrupts being generated on PB2 and PC1 regularly. I am not able to operate all three peripherals simultaneously(interrupt driven).
Following is the callback function i am using when interrupt is detected by controller. Please let me know how can i make all the peripheral work together on interrupt.
TIA
//////
void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin)
{
/* Prevent unused argument(s) compilation warning */
UNUSED(GPIO_Pin);
if (GPIO_Pin == GPIO_PIN_11)
{
IMUInterruptHandler();
}
if (GPIO_Pin == GPIO_PIN_2)
{
ETH_EventDetected = 1;
}
if (GPIO_Pin == GPIO_PIN_1)
{
ALS_EventDetected = 1;
}
/* NOTE: This function Should not be modified, when the callback is needed,
the HAL_GPIO_EXTI_Callback could be implemented in the user file
*/
}
//////
2022-01-10 03:51 AM
For the non-working interrupts, check that they are
JW
2022-01-10 03:00 PM
Also ensure that IMUInterruptHandler() finishes before the next interrupt arrives. It sounds like the CPU is swamped.