AnsweredAssumed Answered

SDK Multiple TPMs Don't Work

Question asked by Stewart on Nov 14, 2017
Latest reply on Dec 1, 2017 by Jorge Antonio Alcala Vazquez

I am using KL27Z256 48-pin QFN, Keil Tools, SDK 2.2.  

I have implemented TPM1Ch0 to trigger DMA from memory to DAC.

I used PWM example in SDK 2.2.  The timer drives the DMA and produces a PWM output on a pin.  It works.

 

Now I want to add another timer, TPM2ch0.  It is a simple timer with no outputs to pins.  I don't see any examples on using two separate TPM units, only one TPM and two channels.

 

When I try to set up TPM2, it causes failure with the DMA.  It happens right after 

TPM_SetTimerPeriod(BOARD_TPM2_BASEADDR, USEC_TO_COUNT(29000U, TPM_SOURCE_CLOCK));

or

TPM_SetupPwm(BOARD_TPM2_BASEADDR, &tpmParam, 1U, kTPM_EdgeAlignedPwm, 24000U, TPM_SOURCE_CLOCK);

 

Where can I find an example SDK that uses two TPM units (TPM1 and TPM2)?

Outcomes