S12XE TIM Input Capture

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S12XE TIM Input Capture

Jump to solution
583 Views
rayhall
Contributor V

Hello,

 

I cannot get the TIM input capture interrupt to work. I have a square wave signal connected to pin PP0. I want an interrupt on both edges.

 

I have made a simple test project. I have attached the code.

 

Please do not mark this question as "Assumed Answered" until I confirm the answer is correct or solved.

 

Thank you,

 

Ray.

Original Attachment has been moved to: TIM_Capture.zip

Labels (1)
0 Kudos
1 Solution
434 Views
kef2
Senior Contributor IV

Have a look at PTRRR register. By default TIM is routed to port R.

View solution in original post

0 Kudos
2 Replies
435 Views
kef2
Senior Contributor IV

Have a look at PTRRR register. By default TIM is routed to port R.

0 Kudos
434 Views
rayhall
Contributor V

Edward,

Thank you. I am using the 144 pin S12XE so it has no Port R.

I have attached the working version as it may help others.

Ray.

0 Kudos