benuretech
New member
Hi,
I know that teensy isn't really fully FreeRtos compatible right now but had it's own thread class.
I tend to use quite a bit data queuing in my threading application. Is there something similar with teensy. Something that would allow thread safe communication of data between threads? Everything that I seem to find seems to come with the caveat that it's not thread safe. Which kind of defeat the purpose for me.
And for the question that often come up: "why would you need it" , a bit of a weird question since I don't see much of the need for threading if you can't communicate between thread.
But in my case I have 3 threads.
Thread1: takes the UDP ethernet communication. It takes message in and out, goes through a CRC and escape character. Includes a watch dog. Or send/recieve to other threads.
Thread 2:
UART port (controls a rs485 device). Really slow. Execute commands from ethernet. Some commands can last a couple minute.
Thread 3: ADC stream. Continuously read and filter a 2 signal and send a decimated value to thread 2 every 10ms. The number of sample will just depend on the processor free time.
I would have a hard time to implement this without threads and queuing.
The implementation works fine with rp2040 with free Rtos. I tried to transfer it on teensy hoping a bit better
Anyway, if there's a queuing compatible with the thread safe method,I would love to hear about it.
Thanks
I know that teensy isn't really fully FreeRtos compatible right now but had it's own thread class.
I tend to use quite a bit data queuing in my threading application. Is there something similar with teensy. Something that would allow thread safe communication of data between threads? Everything that I seem to find seems to come with the caveat that it's not thread safe. Which kind of defeat the purpose for me.
And for the question that often come up: "why would you need it" , a bit of a weird question since I don't see much of the need for threading if you can't communicate between thread.
But in my case I have 3 threads.
Thread1: takes the UDP ethernet communication. It takes message in and out, goes through a CRC and escape character. Includes a watch dog. Or send/recieve to other threads.
Thread 2:
UART port (controls a rs485 device). Really slow. Execute commands from ethernet. Some commands can last a couple minute.
Thread 3: ADC stream. Continuously read and filter a 2 signal and send a decimated value to thread 2 every 10ms. The number of sample will just depend on the processor free time.
I would have a hard time to implement this without threads and queuing.
The implementation works fine with rp2040 with free Rtos. I tried to transfer it on teensy hoping a bit better
Anyway, if there's a queuing compatible with the thread safe method,I would love to hear about it.
Thanks