AnsweredAssumed Answered

KL03: Using TPM timers to Create BPSK

Question asked by Sara Stout-Grandy on Jul 5, 2017
Latest reply on Jul 7, 2017 by Bob Paddock



I'm trying to use create a BPSK signal using the TPM timers on the KL03. I have used the TPM1 CH0 and CH1 timers to create the two different phases of signal with edge-aligned PWM. This works fine. I now want to use an interrupt on TPM0 to shift the phase of one of the two outputs. I can set-up the interrupt without issue, but all of my attempts at trying to shift the phase have failed. Primarily, I have been trying to get the phase to shift by changing the ELSB:ELSA pins on the TPM1 channel inside the TPM0 interrupt service routine, but this seems to have no effect. I'm assuming that I'm misunderstanding the meaning of this paragraph from the user's manual:

Can you explain? Does it mean that it will not change the mode until the counter goes to zero? If so, which counter in my case? TPM1 or TPM0?


Is there any other way to change the phase of a TPM output signal?