This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
I am trying to generate pulse burst with LANUCHXL-F2800137 to drive the BOOSTXL-TUSS4470. I am seeking your help to give a code example to send '11001100' ten times per second (10 Hz). Thank you very much.
To understand more on your need:
What do you mean by sending '11001100' ten times per second (10 Hz) ? Do you want to send pwm pulses as '11001100' with pulse width of 1us ?
Thanks,
Prarthan.
It means that a pulse burst '11001100' with width of 1us will be sent to drive the BOOSTXL-TUSS4470 10 times per second.
Hello Wang,
Can you illustrate more on pulse burst.
When you say 11001100 pulse do you mean: 1 for high level and 0 for low level ? Why do you want to have 11 and then 00 ?
And the pulse duration for each level is 1usec ?
Thanks!
Prarthan
Thank you for your reply. Please refer to the below pulse pattern.
Best regards,
Hongtao
Hello,
You can use ePWM module to generate the pulse pattern as shown above.
You can start with referring to sysconfig epwm examples in c2000ware if you haven't already.
You could basically configure pwm with 50% duty cycle by setting appropriate cmp value and tbprd(pwm period) for 1usec in conditional statement for two counts.
When two counts are done change the Compare value such that you get 0% duty cycle for next two counts.
And basically keeping on repeating this as required.
Thanks!
Prarthan.
Hello HT,
You can find more details on this page here https://software-dl.ti.com/C2000/docs/software_guide/c2000_sysconfig.html Download the C2000Ware and you can use it through Code Composer Studio.
Also on the Technical Reference manual ePWM chapter Software section which gives a basic outline of the example but there is no specific software reference manual.
Let us know if have questions on running the examples.
Thanks!
Prarthan.
Frankly, I like the old development style rather than sysconfig. I get lots of problems with the sysconfig.
(1) Cannot detect the PWM pulse from its corresponding pin; (In example, I add new PWM with the same method)
(2) PWM interrupt doesn't work;
Can you give me advice on the above issues?
I find out that the interrupt is called once only. What is the problem for the following function?
__interrupt void INT_myEPWM1_ISR(void)
{
// Modify the CMP value of ePWM1A
EPWM_setCounterCompareValue(myEPWM1_BASE, EPWM_COUNTER_COMPARE_A, 120 - cmpValue[idx] * 60);
idx ++;
if (idx == PULSE_LENGTH) {
idx = 0; // No interrupt acknowledgement and then wait for the timer trigger.
} else {
// Acknowledge this interrupt to receive next interrupt from myEPWM1_interrupt group.
Interrupt_clearACKGroup(INT_myEPWM1_INTERRUPT_ACK_GROUP);
}
}
Hello HT,
Which example is used here ? You would need to configure ISR interrupt to trigger as per the application need.
Thanks,
Prarthan.