Because of the Thanksgiving holiday in the U.S., TI E2E™ design support forum responses may be delayed from November 25 through December 2. Thank you for your patience.

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.

TMS320F28379D: How to configure PWM and ADC for dual-core F28379D

Part Number: TMS320F28379D
Other Parts Discussed in Thread: LAUNCHXL-F28379D, C2000WARE, CONTROLSUITE, SYSCONFIG

Dear All,

I am using the LaunchXL-F28379D. I want to configure EPWM1 on CPU1 to trigger ADCA, wait for the end of conversion (EOC) of ADC to trigger an interrupt function, and then update the duty cycle.

Simultaneously, I want to configure EPWM4 on CPU2 to trigger ADCC, wait for the EOC of ADC to trigger an interrupt function, and then update the duty cycle.

How can I set up this configuration? Where can I find example code?

Thank you.

Sincerely,

Cody

  • Hi Cody,

    There are several software examples that can help with this:

    • EPWM used to trigger ADC SOCs: {C2000Ware}\driverlib\f2837xd\examples\cpu1\adc 
      • e.g. adc_ex2_soc_epwm.c and adc_ex11_multiple_soc_epwm.c
    • Updating EPWM duty: {C2000Ware}\driverlib\f2837xd\examples\cpu1\epwm
      • e.g. epwm_ex2_updown_aq.c and epwm_ex13_up_aq.c which update the CMP values in ISRs
    • There are many dual-core examples as well: {C2000Ware}\driverlib\f2837xd\examples\dual.
    • There is also a C2000 Academy lab walkthrough of setting up simple ADC SOC with EPWM trigger here.

    Please take a look at these examples and let me know if you find them helpful/have further questions.

    Best Regards,

    Allison

  • Dear Allison,

    You mentioned the two examples above. I have studied and tried them, but the interrupt EOC on CPU2 never enters the function. Could you help me check my code to identify where I have configured an error?

    Thank you.

    Sincerely,

    Cody

    20240319c2_F28379D_DualCore_DAB_BUCK.zip

  • Dear Allison,

    I succeeded! I referred to the dual-core ADC in ControlSuite. Upon tracing my project, I discovered that I had neglected to assign each peripheral to either CPU1 or CPU2. Consequently, I added a new configuration for SYSCTL in sysconfig. As a result, the interrupt for CPU2 can now enter the interrupt function.

    Thank you.

    Sincerely,

    Cody