Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void TIM3_IRQHandler(void)
- {
- /* TIM3_CH1 toggling with frequency = 256.35 Hz */
- if (TIM_GetITStatus(TIM3, TIM_IT_CC1) != RESET)
- {
- TIM_ClearITPendingBit(TIM3, TIM_IT_CC1 );
- uhCapture = TIM_GetCapture1(TIM3);
- TIM_SetCompare1(TIM3, uhCapture + uhCCR1_Val );
- }
- /* TIM3_CH2 toggling with frequency = 512.7 Hz */
- if (TIM_GetITStatus(TIM3, TIM_IT_CC2) != RESET)
- {
- TIM_ClearITPendingBit(TIM3, TIM_IT_CC2);
- uhCapture = TIM_GetCapture2(TIM3);
- TIM_SetCompare2(TIM3, uhCapture + uhCCR2_Val);
- }
- /* TIM3_CH3 toggling with frequency = 1025.4 Hz */
- if (TIM_GetITStatus(TIM3, TIM_IT_CC3) != RESET)
- {
- TIM_ClearITPendingBit(TIM3, TIM_IT_CC3);
- uhCapture = TIM_GetCapture3(TIM3);
- TIM_SetCompare3(TIM3, uhCapture + uhCCR3_Val);
- }
- /* TIM3_CH4 toggling with frequency = 2050.78 Hz */
- if (TIM_GetITStatus(TIM3, TIM_IT_CC4) != RESET)
- {
- TIM_ClearITPendingBit(TIM3, TIM_IT_CC4);
- uhCapture = TIM_GetCapture4(TIM3);
- TIM_SetCompare4(TIM3, uhCapture + uhCCR4_Val);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement