I'm working on a project where I have an ISR reading ascii (NMEA formatted) data from a UART. My plan is to have a separate thread parse the ascii data and do something with the data. The ISR reads a character from the UART and puts it into a buffer. If the character is a new_line then it will notify the other thread to do its thing via a semaphore.
I plan to use two buffers so that one sentance could be collected by the ISR, while the other thread parses the sentance in the other buffer.
My question is can/should I use a mutex to protect each buffer in the ISR? If this were two ordinary threads, I would think that each thread would acquire the mutex associated with a particular buffer when operating on a particular buffer.
I noticed on page 5-235 of the VisualDSP++ 5.0 Kernel (VDK) User’s Guide that there is a list of ISR assembly macros. They include semaphores but not mutexes.
Any advice would be appreciated.
Thanks in advance