2025-05-23 4:41 PM
So, I've got a circular transfer working, sending 24-bit words to a dual channel SPI DAC (with hardware NSS), paced by TIM2 and working well. For every edge of TIM2 a word is sent. Since this is a dual channel DAC, I would ideally like the transfer 2 words for each pulse of TIM2. So if I had a buffer [ADATA1, BDATA2, ADATA1, BDATA2, etc..], we would send ADATA1, and immediately (after the idle cycles setup for SPI) send BDATA1, then on the next trigger edge, do the same for ADATA2 and BDATA2.
Is this possible? Maybe with the 2D addressing channels?
I cannot simply set the timer exactly twice as fast as the one that my ADC is using or else they slightly loose sync and get really ugly jitter. Not sure what this is but it just won't work for me. With my ADC DMA and DAC using the same timer they are locked up perfectly and no jitter.
2025-05-23 5:25 PM
Well well! I figured it out and indeed can be done!
Had to use one of the 2D addressing channels and set the source offset to 8 (2 words), and then set the burst source length to 2 and boom it's good to go!