TPM Capture Mode

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

TPM Capture Mode

646 Views
e_ay
Contributor I

Hi,

 

I am working on a project that uses TPM Capture mode. My code should increase a counter variable when rising edge came. My problem is I couldnt set capture mode. I have working TPM timer interrupt but it is not capture rising edges. I set TPM1C1SC register for capture mode but it didnt work. What should my TPM interrupt consist and which pins should I use for this purpose? Any advice appreciated. 

 

Thanks,

Eren

Labels (1)
0 Kudos
Reply
1 Reply

367 Views
bigmac
Specialist III

Hello Eren,

 

Since you have not provided any of the relevant code, it is impossible to guess what is the cause of your problem.  You would need to provide the initialisation code for the TPM module, plus the interrupt service code for the TPM channel you are using.  You should also mention the HC9S08 derivative that you are using.

 

Regards,

Mac

 

0 Kudos
Reply