ZP-LOS integration
Roughly outlines the proposed plan for integration between TM and the RFD driver, from a high level
All of this is open to change, if anyone has ideas or suggestions for improvements
Basically, The idea is that LOS has a circular buffer that contains a stream of bytes. TM will periodically call a function from LOS and LOS will write bytes from its buffer to TMs (the TM buffer gets passed into the function). The reason to do it this way is because its probably not safe for TM and LOS to work off of the same buffer of bytes. LOS should use DMA to load bytes into its circular buffer. take a look at LOS_Comms branch (https://github.com/UWARG/LaminarOS/compare/main...LOS_Comms ) to see what the plan was.
Question: can we use freertos message queues to send data to TM from LOS? We could set up DMA with a buffer, and when it gets full, it can just load that buffer into the queue for TM. Need to configure the buffer size accordingly
A common problem with these plans is DMA buffers. Basically DMA needs to be passed a buffer and a size. Itll read size number of bytes and then fire an interrupt to let you know that its done. But if size bytes doesnt get read, dma will not fire an interrupt and the data will be stuck in the dma buffer. A solution to this is idle detection. relevant links below. Some research into DMA configurations will need to be done to solve this problem.
An idea that I am somewhat hesitant to do, but would solve our problems is standardized message sizes. So for example, we set a size of like 100 bytes per message and all messages have to be either split or padded to fit that exact size. This provides DMA with a known buffer size.
Alternative we can pivot to a tcp model, with a fixed byte size and separate messages on the fly which has significantly more overhead and more development involved. Considering for TM rev 2?