2022-06-27 07:38 AM
I tried DMA_SetConfig after __HAL_DMA_DISABLE and clearly it is not enough.
Incidentally my intention is not change the size of the DMA allocated area - rather the size of this region accessed by a peripheral
2022-06-27 09:41 PM
Hi, to manage high perf and lower CPUusage take a look to DMA circular mode. So the DMA is never stopped and run continuously (automaticaly cycling). Doing so permit to manage alternatively one half of the buffer by CPU, during this time DMA continue to fill the other half buffer...
With HAL you only need to register DMA call back to half complete (HC = the first half buffer) and transmit complete (TC = the second half buffer).
You MUST choose the correct size of buffer to be sure that you have sufficient time to handle an half buffer before the other one is full...
2022-06-27 09:47 PM
Ouups. It's apply also to DAC. But in this case DMA read from memory to DAC...
And with CPU you write in the actually free half buffer.
First hal buffer after received HC,
Second half buffet after received TC.
That all.
2022-06-28 01:05 PM
Yes! That's exactly what I did. Got a memory pointer to point to another area of ram and yes sir. No noticeable delay from my end. Brilliant