Hi all. Im having some issues with direct task notifications which appear to go missing, or are missed somehow.
I have an ISR that receives bytes from a UART into a buffer, and on receiving a CR (0x0D) a task is notified that the buffer is ready for processing.
This works the first time out of reset, but the second notification never seems to get through.
I can place a breakpoint in my ISR and see that the CR is recognised and the code to send the notification is executed, but interestingly when I have this breakpoint in place, the notification will always get through to the task and is never missed. As soon as I remove the breakpoint from the ISR, within the next one or two notification attempts things will start being missed again.
What are the typical causes of this behaviour that I should look out for? I havent yet stepped through the notification code to see what is happening, because I cant reproduce the behaviour when I have a breakpoint in my ISR.
Im not seeing any crashes or other odd behaviour. The reception is triggered by the same task transmitting a command to a LoRaWAN radio module to check the MAC status, and on my oscilloscope I see that the message has indeed been transmitting and the response has also been sent by the radio module (complete with CR), and the ISR does see this and tries to notify the task, but the notification just doesnt seem to get through.
Im on a PIC32MX this time, so have decent debugging tools available.