Which Boards Support FTM vs TPM?

Status
Not open for further replies.

gfvalvo

Well-known member
Hi. From my reading of the datasheets for the processors on T3.2 and T-LC, it seems to me that only the former supports the extended FTM functionality and the latter just supports the original TPM features. But, this simple test code compiles without error for either board:
Code:
void setup() {
  FTM0_SYNC = 0;
}

void loop() {
}
The 'FTM0_SYNC' register is part of the FTM extension and does not even appear in the T-LC's processor datasheet (KL26 Sub-Family Reference Manual). Can anyone shed some light on this? I'm running Arduino 1.8.5 / Teensyduino 1.45.

Thanks.
 
Yes, confirmed, the timers in Teensy LC are the less capable TPM type.

All the Teensy 3.x boards have the more capable FTM timers, which are very similar to a subset of TPM, but also have many advanced features for PWM that aren't available in TPM.

Teensy 3.6 has both FTM and some TPM timers.

While FTM has a huge increase in features, the TPM has one nice feature you don't get in FTM. It's able to run asynchronously from F_BUS. If you do quite a lot of hardware register level programming, you can get the CPU to run slow and have the TPM running at a faster speed. The TPMs can run from certain clocks while F_CPU and F_BUS are completely shut down.
 
When Teensy LC was released, I took a sort of shortcut to porting much of the software which has been written for Teensy 3.0, 3.1, & 3.2.

Since the TPM is (almost) a subset of FTM, on Teensy LC I named the TPM's registers with the FTM names. This let most of the existing code "just work". But in hindsight, it has also created a somewhat confusing legacy, because we use names on Teensy LC that aren't identical to those published in Freescale's datasheets, and imply the hardware isn't quite what it really is. Also, some of the subtle TPM differences, like having to turn off a channel and waiting for the channel config register to zero before writing a new config, were not fully known (at least to me) when this decision was made. Not sure if I'd redo things differently if under the same circumstances again (LC was badly delayed and stuff needed to get done quickly), but there's the history, so you can understand why this confusing misuse of names.
 
Status
Not open for further replies.
Back
Top