AnsweredAssumed Answered

FRDMKL02Z configure synchronized PWM and ADC

Question asked by Andres L. Bleda on Apr 21, 2016
Latest reply on May 5, 2016 by Alice_Yang

Hi everyone,

I'm new in the discussion forums, and of course I apologise in advance, in case I don't do it right.

 

First of all, I'm working with the FRDMKL02Z kit, and nowadays I'm using IAR as development tool.

I want to generate a PWM signal (100 Hz and 10% duty cycle), and I realised that there is a similar freescale example using the TPM module. This freescale example works fine with the preconfigured frequency of 120 Khz, but it does not work fine when the frequency is changed to 100 Hz (in this case a 555 Hz signal is sourced).

These are my questions:

  1. Is it possible to generate a 100 Hz (and 10% duty cycle) signal with this module? if yes, how could we configure it?
  2. Only one more thing, we would like to acquire a sensor signal only when the previous signal is high, do you have any suggestions? is it possible to synchronize the TPM signal with the ADC?

Thanks in advance.

Outcomes