2024-08-30 03:06 AM
I an using stm32f030c8tx need to generate a pulse with a desired frequency, which can be adjusted through three different modes. The modes are as follows:
The mode is selected using a switch, and the pulse is generated using Timer 4 in Output Compare mode with the "toggle on match" feature. The ARR (Auto-Reload Register) and CCR (Capture/Compare Register) values are feed based on the output from a rotary encoder.
The pulse generation itself works as expected, but when switching between modes, the signal goes high for a fixed period of time (8 seconds) before returning to the expected pulse pattern.
how can I address it?