I'm working on a project on an STM32F407-DISC and I want to output the attached signal via PWM, I would like to offload as much of this from the processor as possible while keeping the timing of these as consistent as possible. I thought it might be possible to use each of the channels of TIM8 to produce each of the signals, but I'm not sure if it's possible to setup the PWM mode to produce each of these signals. I need it to be 1.024Khz at the moment, with the possibility of going higher later.
I'm working on a project on an STM32F407-DISC and I want to output the attached signal via PWM, I would like to offload as much of this from the processor as possible while keeping the timing of these as consistent as possible. I thought it might be possible to use each of the channels of TIM8 to produce each of the signals, but I'm not sure if it's possible to setup the PWM mode to produce each of these signals. I need it to be 1.024Khz at the moment, with the possibility of going higher later.
Share Improve this question edited Mar 20 at 17:02 3CxEZiVlQ 39.5k11 gold badges84 silver badges93 bronze badges asked Mar 20 at 16:50 Jack M.Jack M. 112 bronze badges 1- 1 Hi, Is your question specifically "is it possible to set up TIM8 in PWM mode to generate this waveform?" If so, I think no sorry. PWM mode could generate 4 signals, one on each timer channel, at the same frequency with a single edge each period. The LDAC and CONV signals each have two edges that make this not work. – GandhiGandhi Commented Mar 20 at 17:39
1 Answer
Reset to default 0I would suggest using DMA in memory to memory mode. As destination set your GPIO. Trigger DMA in requiored periods and the waveform required will have to be set in the memory as an array.