Timer str7lib
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2005-02-10 8:19 AM
This discussion is locked. Please start a new topic to ask your question.
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2004-12-19 9:55 PM
Posted on December 20, 2004 at 06:55
Another query regarding the str7 library (v1.3).
The function used to config the output compare mode - TIM_OCMPModeConfig does a TIMx->OCAR = ( XpulseLength - 5 ). According to the data this is only required for pwm mode. I am also guessing the timer is based around the st7 timer - is this correct? Another query is in your library supplied vector handlers (71x_vect.s), you call SaveContext r0,r11 surely it would be safer to save all the user working registers upto r12. Merry Xmas sjoOptions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2004-12-20 2:13 AM
Posted on December 20, 2004 at 11:13
What I mean is in the function TIM_OCMPModeConfig the XpulseLength variable is decremented by 5, as per the data this is only required for pwm mode not output compare.
The pwm mode function TIM_PWMOModeConfig is correct as it subtracts 5 as per data. The str71x data is correct to how I would expect an st7 timer to work. Also I am unable to download the above attachment. Many Thanks sjoOptions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2005-02-10 8:19 AM
Posted on February 10, 2005 at 17:19
Hi,
regarding the r0..r11 query, it is not only safer to change it to r0..r12 but it is a must. I had severe problems due to interrupts. One timer interrupt routine used all the registers r0..r12 and so currupted r12. This caused 'random' type of failures in the complex application. Regards, CeeCee.