PWM In and Out using same Timer problem
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2008-09-01 10:32 PM
Posted on September 02, 2008 at 07:32
PWM In and Out using same Timer problem
This discussion is locked. Please start a new topic to ask your question.
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2011-05-17 3:43 AM
Posted on May 17, 2011 at 12:43
Hello,
I was/am trying to generate a PWM signal (41KHz) using Timer 2 channel 3 (PWM1) and then for testing read back the signal on channel 2 (PWMI). However the frequency I read using TIM_GetCapture2(TIM2) is always incorrect (it just reads 4). The Duty Cycle I read using TIM_GetCapture1(TIM2) is correct. I have tried doing all of this using Timer 3 and get the same frequency issue and I've tried different frequencies for the output wave. I have so far had to use Timer 2 to generate the signal and Timer 3 to read the signal and this works without problem, but does use an extra timer, which i'll probably need later. Should it be possible? Am I doing something wrong? Adam