I wanna set the direction(counting up or down) when starting a center-aligned Timer, but once I set the DIR and then set the CMS to center-aligned mode, the DIR bit will be cleared by hardware.
I found this description in datasheet:
When starting in center-aligned mode, the current up-down configuration is used. It
means that the counter counts up or down depending on the value written in the DIR bit
in the TIMx_CR1 register. Moreover, the DIR and CMS bits must not be changed at the
same time by the software.
How could I start the center-aligned mode with down direction?
If someone knows, please tell me.