Hi,
Micro: S12ZVCA192
For TIM 0/1 channels timer overflow, TFLG2 TOF flag will get set. If we enable multiple channels of TIM0/1 at a time, How to find TFLG2 TOF flag is set because of which channel timer overflow?
Solved! Go to Solution.
Hi,
Table 1-13. Interrupt Vector Locations (Reference Manual)
Vector base + 0x1AC TIM0 timer overflow I bit TIM0TSCR2 (TOF) No Yes
Vector base + 0x08C TIM1 timer overflow I bit TIM1TSCR2 (TOF) No Yes
As you can see different vector number is used for the channels.
Moreover, 0x000F is an offset for the register TFLG2 for each timer.
Exact address can be found:
For
TIM0: chapter: M.11 0x05C0-0x05EF TIM0
TIM1: chapter M.8 0x0400-0x042F TIM1
If you use code warrior you van also check header file to get definition of the registers for given timer.
Best regards,
Ladislav
Hi,
Table 1-13. Interrupt Vector Locations (Reference Manual)
Vector base + 0x1AC TIM0 timer overflow I bit TIM0TSCR2 (TOF) No Yes
Vector base + 0x08C TIM1 timer overflow I bit TIM1TSCR2 (TOF) No Yes
As you can see different vector number is used for the channels.
Moreover, 0x000F is an offset for the register TFLG2 for each timer.
Exact address can be found:
For
TIM0: chapter: M.11 0x05C0-0x05EF TIM0
TIM1: chapter M.8 0x0400-0x042F TIM1
If you use code warrior you van also check header file to get definition of the registers for given timer.
Best regards,
Ladislav