2021-06-04 10:10 AM
hello everyone, I am trying to generate a square wave at a desired frequency. I am supposed to use the TIM3 peripheral. I selected the "Output compare CH1" for channel 1 section and under this section it asks me for a pulse value (which I know is the content of the CCR1 (capture compare register) my question is, if I modify the content of the CCR1 register in the generated code will the STM32Cube application ignore this action and still take the pulse value provided earlier? or will it modify?
2021-06-04 10:21 AM
The pulse value isn't used after initialization. Changing CCR1 will change the duty cycle. Changing ARR or PSC will change frequency.
2021-06-04 10:34 AM
okay thanks but if I change ARR does that mean that the original value of the "counter period" that i set earlier in the software will be changed?
2021-06-04 10:39 AM