2019-11-14 02:07 AM
I'm currently working with the 32F3348DISCOVERY Evalution board, and I'm trying to reset the HRTIM timer A counter by setting bit 9 in the HRTIM_CR2 register.
The timer operates in non-retriggerable single-shot mode.
How do I set the bit to 1 with my code?
I've tried the method described in the following thread, but i can't seem to get it to work.
https://stackoverflow.com/questions/54735239/programing-stm32-like-stm8register-level-gpio/54745719
2019-11-14 07:02 AM
Apparently the answer was simpler than I expected, but after struggling for hours it seemed easier to reach for help.
So if anyone runs in to this problem in the future, i solved it by accessing the HRTIM_CR2 register using the following code:
HRTIM1_COMMON->CR2 |= (0x12 << 8);
which sets bit 9 and 12 to 1, to reset Timer A and Timer D counters.