Other Parts Discussed in Thread: TMS320F28335
Dear friends,
I am using 1-A, 1-B, 3-A and 3-B as the ePWM ouputs. So I am using both the 14-pin ePWM outputs in the hardware, which are connected to each of its MOSFET driver IC (whose picture I have uploaded).
I can see U22-MIC4468ZWM, a MOSFET driver IC before the 14-pin PWM output in the DSP TMS320F28335. I am working on a simple ePWM module in the DSP. My aim is to get 4 PWM pulses from the 14-pin PWM output in the hardware.
I am getting the desired output as I have programmed, according to my requirements in the pins--> PWM1A_3.3V, PWM1B_3.3V of MOSFET IC driver 1 and PWM3A_3.3V, PWM3B_3.3V of MOSFET IC driver 2 respectively . But not in the pin PWM1A_15V, PWM1B_15V, PWM3A_15V and PWM3B_15V.
So in order to get the ouputs in the 15V pin of the MOSFET driver IC, I have to enable the PWM_ENABLE_1_2_3.3V pin in the DSP itself whose pin configuration are as follows:
PWM_Enable_1_2_3.3V ---> 21 (Pin number) ---> GPIO12
PWM_Enable_3_4_3.3V ---> 27 (Pin number) ---> GPIO16
Finally my aim is to enable or set GPIO12 and GPIO16 pins to 1, for which I have included the following codes in the main()
GpioCtrlRegs.GPADIR.bit.GPIO12 = 1;
GpioCtrlRegs.GPADIR.bit.GPIO16 = 1;
EDIS;
GpioDataRegs.GPASET.bit.GPIO12 = 1;
GpioDataRegs.GPASET.bit.GPIO16 = 1;
InitEPwm1(); // is for the PWM1
InitEPwm3(); // is for the PWM3
EALLOW;
Note: 1 Also as I have been advised to not to enable the pullup on GPIO12 and GPIO16, I just commented the below lines in DSP2833x_EPwm.c file so that it become ineffective:-
// GpioCtrlRegs.GPAPUD.bit.GPIO12 = 0; // Enable pull-up on GPIO12 (TZ5)
// GpioCtrlRegs.GPAPUD.bit.GPIO16 = 0; // Enable pull-up on GPIO16 (TZ5)
After doing all these, I am still unable to set the GPIO12 and GPIO16 to 1 and thats my problem is concerned with
Question 1: What should I do the configuration of TZ (Trip zone) in these pins i.e. GPIO12 and GPIO16. Is it necessary to configure it as TZ1 and TZ5 in the DSP2833x_EPwm.c file as shown below ???? or not to configure so that I can comment this line in DSP2833x_EPwm.c
GpioCtrlRegs.GPAMUX1.bit.GPIO12 = 1; // Configure GPIO12 as TZ1
GpioCtrlRegs.GPAMUX1.bit.GPIO16 = 3; // Configure GPIO13 as TZ5
Question 2: Is there any mistake in the codes I am using to enable GPIO12 and GPIO16 ?? Or is there anything I have to concern about when enabling these to pins in the DSP ?? Or any other changes I have to make in DSP2833x_EPwm.c file in order to set the GPIO12 and GPIO16 pins to 1.
(Attached pictures are 1) 14-pin output for PWM_1_2,
2) 14-pin output for PWM_3_4,
3) MOSFET driver IC for PWM_1_2 and
4) MOSFET driver IC for PWM_3_4
)
Thanks in advance !