DShot Implementation
Posted: Sun Jan 13, 2019 12:35 pm
First of all, hello forum, it's my first post here.
Maybe some of u will know, what DShot is, some not.
DShot is a digital protocol to communicate with ESC's (electronic speed controller). Sadly there is no official document, but this is the best description i found: https://dmrlawson.co.uk/index.php/2017/ ... -the-dark/.
So this protocol is pretty similar to the one used for WS2812 LED's. The only difference is, that DShot needs to be sent repeatedly, as WS2812 only, when the LED's need to change.
My first implementation is using a UART, where I mimic the timings of 1/4 high and 3/4 low(0) and 3/4 high and 1/4 low. But the problem is, that in this implementation the cpu has to send the bytes to the UART every 250 Microseconds, thus, the ESP crashes with the error: Core 1 panic'ed.
So I'm pretty new to the ESP32 and also never implemented such a protocol before, but my Idea is, that the CPU calculates the Bytes to send, saves it in RAM and then E.g. the message is sent over and over again (without using the CPU), until it is changed by the CPU.
Is this possible, that the DMA-Controller sends the same Bytes repeatedly?
Important to note: I don't want to use bitbanging, as I need to computate other things in parallel.
Best regards,
Linus
Maybe some of u will know, what DShot is, some not.
DShot is a digital protocol to communicate with ESC's (electronic speed controller). Sadly there is no official document, but this is the best description i found: https://dmrlawson.co.uk/index.php/2017/ ... -the-dark/.
So this protocol is pretty similar to the one used for WS2812 LED's. The only difference is, that DShot needs to be sent repeatedly, as WS2812 only, when the LED's need to change.
My first implementation is using a UART, where I mimic the timings of 1/4 high and 3/4 low(0) and 3/4 high and 1/4 low. But the problem is, that in this implementation the cpu has to send the bytes to the UART every 250 Microseconds, thus, the ESP crashes with the error: Core 1 panic'ed.
So I'm pretty new to the ESP32 and also never implemented such a protocol before, but my Idea is, that the CPU calculates the Bytes to send, saves it in RAM and then E.g. the message is sent over and over again (without using the CPU), until it is changed by the CPU.
Is this possible, that the DMA-Controller sends the same Bytes repeatedly?
Important to note: I don't want to use bitbanging, as I need to computate other things in parallel.
Best regards,
Linus