ISR routine is not properly running

If you look at the code for xQueueGenericSendFromISR, it just checks that there is room in the queue, and copies the data in and updates the pointer. It then checks if it should wakeup a task waiting on it, which is similar to sending the notification. Since the serial port only gives one character at a time, the check after each character doesn’t really cost you anything.

IF you have a FIFO, you can save some work by putting them all on at once, so only need a single notification.

The Queue does have a bit of extra work for notifying since there may be multiple tasks waiting, so needs to be able to send multiple notifications if you send multiple characters.

I did look at the code at your advice, and I still believe that a barebone circular buffer management logic would allow return from the ISR in significantly fewer cycles.

I think when you add in the code for signaling the task, if done for every character, would give you code similar to the StreamBuffer if done with a Task Notification, and a Queue if done with a Semaphore.

Yes, it can be a bit tighter being optimized for a single character, but is fundamentally similar code.

Hey @PixelPirate_88, are you still looking for assistance with your issue? Or did you find a solution to your problem?