Dual Core share serial
Posted: Thu Jun 18, 2020 12:52 pm
Good day,
I have code running on Core 0 and different code on Core 1.
I would like to serial.print stuff from both cores, but let's say core1 has to finish writing before core 0 can use the serial hardware.
IE i want to queue core 0's message to wait for the buffer to be empty before attempting to send, thereafter core 0 has access once again.
Core 1 will send tons of messages really fast and Core 0 only now and then, it is very important that they share the hardware serial I do not want to use one of the other serial ports available.
If anyone can point me to a way of checking if the serial transmit buffer is empty that would be great.
Regards
Lodewyk
I have code running on Core 0 and different code on Core 1.
I would like to serial.print stuff from both cores, but let's say core1 has to finish writing before core 0 can use the serial hardware.
IE i want to queue core 0's message to wait for the buffer to be empty before attempting to send, thereafter core 0 has access once again.
Core 1 will send tons of messages really fast and Core 0 only now and then, it is very important that they share the hardware serial I do not want to use one of the other serial ports available.
If anyone can point me to a way of checking if the serial transmit buffer is empty that would be great.
Regards
Lodewyk