I need to communicate Daisy Seed with ESP32 by UART. I’m a really newbie in STM32 setup and configuration, so I tried to find some useful tutorial or example on using UART with DS, but I didn’t succeeded. Unfortunately the libDaisy’s support to UART also wouldn’t be of any help because it operates UART in blocking mode. Of course I prefer non blocking mode to free the CPU for real time audio processing. So, if someone has a simple UART example with Daisy Seed, please let me know.
There’s DMA based RX support, not sure why TX is not there. But beware that current RX code may have bugs
Either way, you should communicate with UART from main thread rather than from audio thread. And then blocking transfer are not a big problem unless you have to send a lot of data. If that’s actually the case, you should use a faster peripheral.
Thank you @antisvin. Yes, I know that I must communicate from main thread, and I’m already doing this for USB/CDC communication with PC. Although the required transfer data through UART isn’t large (something around receiving 20 bytes in packages at 10 Hz), I’m afraid loosing some audio data when waiting for UART polling, even in case of small timeout. By the way, I’d appreciate any UART example with DS you may have.
That’s impossible, because audio is handled from interrupt that has higher priority than main thread. In fact, the opposite can happen - a very heavy patch utilizing nearly all CPU for audio would end up main thread code run less frequently that you would expect.
Sorry, I only use Daisy with OWL firmware. But UART driver in libDaisy looks fairly simple and there are some samples on forum already.