2026-06-02 10:26 AM
I am currently struggling to figure out if my current requirents are even possible.
I am building a network controller to controll laser projectors via analog lines.
For that I have an DAC8552 connected to SPI1 and a DAC1240S85 connected to SPI2.
The way I control SPI1 & SPI2 is almost identical so I will focus on SPI1 for now.
I have the following requirements:
My favorite idea so far is to use a timer like TIM3 and generate a PWM signal to produce an LDAC signal on one channel and then trigger an SPI transaction on CH2.
But it really doesn't seem like there is a way to do that.
Since the LDAC line and the SPI clock must be pretty syncronized when an SPI-Byte is being transferred I don't se a way where I can simply keep my SPI being feed with dummy-data by DMA.
I am getting that desperate that I'm actually trying to see if I can exploit the SPI running dry and spoonfeeding it by triggering DMA transfers into it's TX-Fifo.
But would that even work?
There must be a way to properly time and automatically trigger SPI transactions on STM32H7 or am I completely missing the point?
If an answer needs more information or more precise requirements I'm fast to answer
2026-06-02 11:02 AM
@dj-bauer wrote:My favorite idea so far is to use a timer like TIM3 and generate a PWM signal to produce an LDAC signal on one channel and then trigger an SPI transaction on CH2.
Seems right, trigger DMA transaction to SPI-DR and sync LDAC by another channel of timer. Configure SPI clock fast enough to complete data transfer in time.
SPI doesn't have to be synchronize, since update event of the DAC is strictly defined by timer. SPI transfer may drift/ jitter in the LDAC window but it does not matter.
We’re moving the ST Community to a new platform to give you a better and more reliable community experience.