M52235EVB GPT and PWM usage, header missing

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

M52235EVB GPT and PWM usage, header missing

1,518 Views
paynete
Contributor I
Is there a reason mcf5223_gpt.h is not included in mcf5223.h?  I assumed it should be there, added it, and proceeded to use MCF_GPT_  assignments to gain access to GPT0.  No Joy.
 
Maybe related, I am configuring PMW1 and PMW3 to generate signals.  I am getting these signals using MCF_GPIO_ assignmets.  A specific concern is the use of PWM (pin 99 PWM1,pin 100 PWM3) and Timers (pin 107, GPT0) at the same time.  I used the primary function setting for pin assignment.
 MCF_GPIO_PTDPAR = 0
 | MCF_GPIO_PTDPAR_PTDPAR0
 | MCF_GPIO_PTDPAR_PTDPAR1
 | MCF_GPIO_PTDPAR_PTDPAR2
 | MCF_GPIO_PTDPAR_PTDPAR3; //set for primary function
 
Is this proper to use both PWM1, PWM3, and GPT0 ?
 
 
I appologize in advance since I am totally new to embedded programming.
Labels (1)
0 Kudos
1 Reply

285 Views
DrSeuss
Contributor I

We will correct the missing header.

As long as the port assignment register selects the correct source to drive the pin, using the timers for software TIC counts, etc is fine. The PWM can do this as well but without a pin to control, I see no point.

 

0 Kudos