cancel
Showing results for 
Search instead for 
Did you mean: 

stm32-timer-output capture

jith
Associate

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:

  1. Frequency remains the same.
  2. Frequency is divided by 2.
  3. Frequency is multiplied by 2.

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?

1 REPLY 1
jith
Associate

worked well using the update event