Found contention between TPM0_CH0 and OpenSDA micro - affects motor PWM

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Found contention between TPM0_CH0 and OpenSDA micro - affects motor PWM

1,551 Views
david_dicarlo
NXP Employee
NXP Employee

After placing the PWM signals on the scope, there appeared to be contention on the TPM0_CH0 pin (J10 pin 12, PTC1/FTM0_CH0 on the TFC shield schematic).

Tracing it led to the OpenSDA micro sending a 32kHz clock to the KL25 through R24 on the FRDM board (same for both Rev D and E: http://cache.freescale.com/files/soft_dev_tools/hardware_tools/schematics/FRDM-KL25Z_SCH_REV_E.pdf).

Replacing R24 with a 5.6k resistor resolves the contention.

Per John's suggestion, I've written to the FRDM board apps contact to see what the best long term fix for this is. Changing the mbed firmware to not provide this clock is one potential fix.

5 Replies

1,037 Views
eli_hughes
Contributor V

Hey Guys:

While doing bug fixes to the FRDM-TFC mbed library I ran into this as well. 

John:

This contention can have the effect of really messing up desired motor operation.   The end effect is that the 3.3v to 5.0v level translators on the FRDM-TFC board generate some funky waveforms as the signal will hang in the grey area (1-2v)   when the OpenSDA tries to drive this signal low when the PWM output is high.

The best fix is to remove the resistor.      It would be nice if we could get the MBED guys make an updated SDA firmware that tri-states this pin.

-Eli

0 Kudos

1,037 Views
danielhadad
NXP Employee
NXP Employee

I would certainly prefer to update firmware than possibly mess up the board (my soldering skills not great although I found R24 on the board).

Dan

0 Kudos

1,037 Views
admin
Specialist II

oh and thanks David for tracking this down and going above and beyond.

0 Kudos

1,037 Views
david_dicarlo
NXP Employee
NXP Employee

UPDATE:

After some investigation, the contention is indeed a function of using the mbed firmware; no other OpenSDA firmware generates such contention. With the mbed firmware, the OpenSDA micro provides a 32kHz clock to the KL25 device via the PTC1 pin via R24 for real time clock functionality.

In the short term, removing R24 or replacing it with a 5.6k resistor resolves the issue. 

Longer term, to resolve the issue, the product enablement team for the KL25 has requested that mbed provide two versions of the mbed firwware, one with the clock present and one without.

1,037 Views
admin
Specialist II

I just want to reiterate that it doesn't detrimentally affect the operation of the motors per say.  The contention signal is there but you would never notice it unless you hook it up to a scope.    (I.e.  If your not comfortable lifting R24 you don't absolutely need to.)

0 Kudos