How do I generate an event or interrupt from an ISR along with a interrupt identifier
I have an app with a pretty simple non blocking state machine that works pretty well. There are a bunch of UART and I2C devices along with a couple of timers that all have ISRs. When an ISR gets called, it puts its data along with an identifier and a timestamp in a FIFO queue. The main state machine processing loop gets any data in any FIFO, does a bunch of calculations, sends commands to various other devices and then does a HAL_Delay(***) for 10 to 1000 milliseconds depending on what state it's in and goes through the cycle again. Power consumption is important, so instead of HAL_Delay I'd like to drop into a low power state and wait for the next interrupt to fire, handle the interrupt and then wake up the main state machine processing loop. In order to do that, I think I need to fire another interrupt from any ISR that needs to wake up the main state machine processing loop. I would also like to post a message somewhere that tells the main state machine processing loop what ISR generated the software interrupt. Is there a way to generate an interrupt from software that also includes some kind of ID that identifies where the interrupt came from? Maybe just a couple of ID characters that I define. Thanks
