master-TIM syncs the slave-TIM's DMA data transfer of its setting
NUCLEO-G474RE
My design uses two timers, one in master mode(TIM20) and one in slave mode(TIM1).
To have the master timer generate an update signal in the trigger output, I set its TRGO event selection as "Update Event". the CR2 value 0x200020 confirms MMS is set to 2. I confirm TIM20 is running by probing its PWM output channel routed to an GPIO.
The trigger source for the slave-mode TIM1 is ITR9, which comes from TIM20(my master-mode TIM).
TIM1 is in "Combined reset + trigger mode". The design goal is to have a UEV(update settings from pre-loaded registers) and trigger(my understanding on the concept of trigger here is that the CEN bit is set by hardware automatically).
I want the TIM1 to produce one PWM output per UEV from TIM20, therefore OPM is enabled in TIM1(Given my Repetition setting is 1, by the end of the TIM period, CEN will be 0 automatically, waiting for next trigger from master TIM20).
The TIM1 PWM parameter is a sequence of known values, therefore I enabled a DMA channel to transfer these known data from memory to TIM1 preload register. I expect the DMA request flow is 1) TIM20 sends UEV to TIM1, 2) TIM1 update its PWM settings from preload registers, 3) in the meantime, TIM1 also makes a DMA request and populates the preload register for next PWM period.
After using __HAL_TIM_ENABLE_DMA on TIM1(DMA in TIM1 is waiting for trigger), I start running master TIM20.
I must have made some fundamental mistake here, because the TIM1 doesn't produce any PWM waveform. If I don't use the master-slave setup, the PWM waveform in TIM1 looks good(just to confirm I am probing the right pins). Since I am using circular mode DMA transfer, I created some CB functions for HT and FT, and they are not called, which seems to be indicating trigger has NOT been received from TIM20. In TIM1's SR, I do see TIF being 1, which seems to be indicating trigger has been received from TIM20.
I didn't find any HAL/LL TIM related API that can be used to configure such operation(master-TIM syncs the slave-TIM's DMA data transfer of its setting). Did I miss anything related in the HAL/LL?
While I am digging into the details in RM, can I get any suggestions/hints? Even how to properly describe such a problem means a lot to me.
In case I failed to describe any details, I dump the TIM1 register info into files:
- before_running_TIM20.txt: after setting up TIM1 and enable its DMA1Ch1(no TIM1 PWM output here, as expectedly, since the master-mode TIM20 has not sent out any trigger signal)


- after_running_TIM20.txt: after running TIM20(I see TIM20 output but no TIM1 output)

