2005-02-10 08:19 AM
2004-12-19 09:55 PM
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 sjo2004-12-20 02:13 AM
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 sjo2005-02-10 08:19 AM
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.