2013-07-05 03:20 AM
Hi,
I'm very demoralized to study PWM for stm3220G evaluation board. I need a tutorial/example to understand concepts. For example: why does gpio_moder configure in AF (alternate function)? I configured GPIOA1 in my sample project, but I don't see anything with my oscilloscope in that pin (CN1 - 36 PA1| MII_RX_CLK| JP6 open). Help me!2013-07-09 08:49 AM
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2013-07-09 09:37 AM
Sorry, I really don't under stand the purpose of TIM3, and the use of CC1 which you don't configure.
You have TIM3 clocking at 10 KHz (100us), TIM2 at 1 KHz (1ms). Couldn't you just count 20 updates of TIM2 to arrive at 50 Hz (20 ms) Have the default state of CCR1 = 0 (OFF/LOW), set CCR1=1000 for 20 updates (HIGH), then set CCR1=300 for the desired duty (30/70) for 50 updates?2013-07-10 01:39 AM
Hi,
thanks clive1. This is a first part of project, and so TIM3 is base timer (other functions in future) and I used TIM2 for PWM. Is there an example with CCR1/2? thanks