Now I tested double buffered DMA writes. Basically a buffer is filled up until a "\n" is hit or the buffer is full. Then it is dispatched to DMA for sending. Meanwhile the application can fill up the other buffer.
It makes sending more continuous as you can see on a screen shot which seems to help Dimas frontend on the MAC (see above). If breaks to occur, they will be at the end of line. It also speeds up total transfer time. I didn't look into it closely, I guess it's between 30-50% faster on a system loaded with 17.6kHz PWM.
It will not work on REV1 hardware.
I put it on an extra branch (fconst_dmatx), since the commit also contains another sort of breaking change.
https://github.com/jsphuebner/stm32-sin ... onst_dmatx
Dima, can you test if that improves things?
EDIT: now tested performance. Command "stream 20 cpuload". Takes 2.5ms w/o DMA, 1.8ms w/ DMA. So 28% faster.