Marquand Francois Xavier

5282 GPT / PWM

Discussion created by Marquand Francois Xavier on Nov 24, 2008
Latest reply on Nov 25, 2008 by Marquand Francois Xavier
Hello,
 
I'm using a Coldfire 5282 in a complex real time system. My problem is around GPTB and PWM.
 
I have to generate on demand a specific signal to command an EValve on GPTB3. This signal is:
   ________                                          ________
_|                |||||||||||||||||||||||||||||||||||                ||||||||||||||||||||||||||||....
        (1)                          (2)                        (1)                     (2)
 
(1): 100ms on boost
(2): 900ms of 24KHz signal, duty cycle 40%
 
I understood that:
To generate a PWM signal, we need to use 2 GPTB channels: GPTB3 and the GPT channel associated to the output pin (channel 0 to output on pin GPTB0).
 
My problem is:
I want a 24KHz signal duty 40% (2) on pin GPTB3 but this channel is allready used to generate a similar signal on GPTB0.
So, how to "copy" the signal on GPTB0 to GPTB3? if it's not possible, how to generate my signal on the pin GPTB3?
 
I allready tried an interrupt based solution, but it seems to interfer with the system (48KHz interrupt uses too much ressources).
 
I thank you in advance for any help or idea. :smileyhappy:

Outcomes