Today, thanks to Xavier’s tips, I finally managed to write a satisfying workflow for the UART server. I used the ChibiOS’ mailbox system on the STM32 and emulated it with queues on the ESP32.
Each applications is in charge of allocating the actual memory space of the data. The server only manages a 256 words long table to store a single pointer for each of the 256 possible ports. This pointer references two mailboxes. One enables the application to provide a buffer and its length to the server while the other enables the server to signal that a given buffer has been filled with a given number of bytes.… Read more
Today, as I was working on implementing the different servers from my last post, I realized a problem occurring on the UART connection between the main_esp and the main_stm. As I previously discussed in that post, I had to tackle the issue of distributing the traffic on the UART data bus.
To this end, I began to write a sort of server on the ESP32. It copies the port system on an internet server. The first byte of each frame encodes the function the following data line must be transferred to. In this approach, two problems must be tackled.… Read more
Today, I came across a problem regarding the information exchange between the STM32 and ESP32 of the main_pcb. What makes the situation a bit special is that not only can the STM32 want to talk to the ESP32, it can also send it information meant for another device. The latter case is about responding to a shell command which must be forwarded through WiFi. Thus the ESP32 here acts a little like a router.
The problem was the
following. How can we know if a given byte is meant to be forwarded
or not ? As we planned not only an UART connection but also an SPI
connection between the STM32 and the STM32, we can use one for each
type.… Read more