9 years, 9 months ago.

Problem PwmIn on the K64F, hardware or software

Hi,

This is a K64F with a home made shield.

It is connected to one speed sensor (opto switch) and two vibration sensors with each one PWM signal at 2.2 kHz. The fourth connector is PwmOut for calibration and testing purposes..

/media/uploads/GerritPathuis/foto.jpg

When the speed sensor and one vibration sensors is connected, the pcb work perfect. When two vibration sensors are connected the signals lose stability and start fluctuating, so the combination of the two PwmIn signal gives trouble.

A silimair shield for a KL25Z works near perfect with two vibration sensors.. /media/uploads/GerritPathuis/foto_1.jpg

Both shield work with almost identical software

The question; is this a hardware (EMC) or software problem? If there positive practical experience with more then one PwmIn signal used simultaneously on the K64F then i tend to suspect the pcb layout.

Any thoughts on how to attack this problem are appreciated.

Gerrit

1 Answer

9 years, 9 months ago.

I would try by using a PwmOut up till which speed PwmIn works. Maybe InterruptIn (which is what PwmOut uses) is very slow implemented on the K64.

Accepted Answer

Erik,

Just hit a problem, I tried to compile "PwmOut_HelloWorld" for the K64F to test the PwmIn via the PwmOut and got Error: Cannot open source input file "device.h": No such file or directory in "extras/mbed_0954ebd79f59/platform.h", Line: 27, Col: 20.

Apparently PwmOut is not yet implemented for the K64F

Thanks Gerrit

posted by Gerrit Pathuis 05 Jul 2014

Most likely that program has an old version of the mbed lib, update it and it should work.

posted by Erik - 05 Jul 2014