It’s a different feature than the burst.
In the burst, you can update several timer registers at once, because the timer will generate several DMA requests instead of one.
The repeat feature is more like the opposite (although both can be used together), the timer will reach the reload value several times before if generates one request.
It’s like this:
Memory content:
abcde
Timer actions (if set for 3 repeats for example):
Timer generates dma to load first value “a”.
Timer counts until “a”, does not generate DMA request, and starts counting again
Timer counts until “a” for the second time, does not generate DMA request, and starts counting again.
Timer counts until “a” for the thrid time, now generates DMA requests to load “b”
Timer counts until “b”, similarly 3 times, and only in the third generates DMA event and loads “c”
Timer counts until “c” 3 times, and on the third triggers DMA to load “d”
…
All those times the timer compare events are happening, so you get your PWM signal with your duty cycle acccording to the values, but you get it 3 times before it loads the next one.
The effect is that you can set an ARR that produces 3 times your frequency )3 is just an example, ir all depends what frequency and how many bits or resolution you want to use for PWM). Frequency was 16Khz in the example, you can configure ARR to produces a 48Khz frequency, so the exact same pwm pulse will be produced 3 times, then load the next value and produce that pulse 3 times. The PWM duty is the want you wanted, since it’s a relation between ARR and the Timer compare value, but the frequency is 3 times higher, so your noise is concentrated at a much higher frequency and easier to filter.
The datasheet explains it better than me, sorry I’m not too good at explaining this things. The section is called “repetition counter” in the reference manual. It’s section 14.3.3, page 305.
EDIT: for reference, this is my old code before adding the DMA stuff, but it uses the same repetition register (RCR)
The value is calculated here (is precalculated above that for a few normal frequencies, but can be calculated on the fly with same results, and it does for unusual frequencies):
https://github.com/victorpv/Arduino_STM … #L339-L344
The value is set to the register here:
https://github.com/victorpv/Arduino_STM … cm.cpp#L94
I hope seeing the formula to calculate it and the reference manual will make it easier to understand, my code is pretty nasty, specially that file.