FreqMeasureMulti and CAN Bus pin conflicts

Status
Not open for further replies.

DaveAK

Well-known member
I'm building a project based on a Teensy 4.0 that utilizes both CAN1 and CAN2 but also needs a reliable way to measure an RPM input (up to a max of 2kHz, but typically less than 1kHz). Since the FreqMeasure library has a pin conflict with CTX1, I'm looking at FreqMeasureMulti but I'm unsure about the following information:

From the FreqMeasureMulti github page:

Teensy 4.x - can support all FlexPWM pin - some of these pins are on the same FlexIO object/subObject as such if you use any of these pins, they can impact how other pins that are that same subobject will work if you attempt to use them for some other sub-system that uses the same timer object.

And from the Teensy 4.0 product page:

FlexPWM1 Module0 - Controls PWM pins 1, 36, 37.
FlexPWM1 Module1 - Controls PWM pins 0, 34, 35.
FlexPWM1 Module2 - Controls PWM pins 24, 38, 39.
FlexPWM1 Module3 - Controls PWM pins 7, 8, 25.
FlexPWM2 Module0 - Controls PWM pins 4, 33.
FlexPWM2 Module1 - Controls PWM pin 5.
FlexPWM2 Module2 - Controls PWM pins 6, 9.
FlexPWM2 Module3 - No pins accessible.
...

Is FlexIO synonymous with FlexPWM in this case? Does this mean I can safely use pins 4,5,6 or 9 from FlexPWM2? Are pins 7 and 8 from FlexPWM1 Module3 also safely available or do they have a potential to conflict with CAN2?

For the sake of completeness I intend to use FlexCAN_T4 with interrupts along with FreqMeasureMulti on a single pin and output over USB periodically, (hopefully every 50ms). Any foreseeable trouble with this combo?
 
Status
Not open for further replies.
Back
Top