I have used Device Init to set up FTM0_CH0 to do an input capture on ptc1 (alt4, pin 71) and to do an output compare on FTM0_CH2. When the counter compare triggers, the FTM0_CH2 (alt4, pin 73) was set in device init to toggle ptc3. This is code purely generated by the cw10.3 beta2 wizard (cw10.2 was tested and worked/failed the same way).
We put a signal in on ptc1 and FTM0 traps on the ISR for TOF, Edge Capture and Output compare IRQ's. So we know that the timer is working. But the output ptc3 never toggles. Even if we disconnect pt3 in device init, from the timer and try to do a bit banging port bit toggle using GPIOC_PTOR |= (1<<3);
The port will not toggle.
If we generate a project without FTM0 and just with ptc3 as a device init component, then use GPIOC_PTOR |= (1<<3); the code will toggle the port bit.
Is there something fundamental I am missing? I thought we could use PTC1 and PTC3 in the alt4 configuration with FTM0. But it doesn't seem to work.
This is a custom board so we have to change to another port and pin if we have made a design error in choosing to toggle PTC3 with FTM0_CH2. Any suggestions would be appreciated.
Original Attachment has been moved to: ftm0_ftm2-toggle-of-ptc3-not-working.zip