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.

CCS/TMS320F280049C: PWMDAC on F280049C LaunchPadXL board

Part Number: TMS320F280049C
Other Parts Discussed in Thread: DRV8320, LAUNCHXL-F280049C

Tool/software: Code Composer Studio

Hi yanming

responding to your answer that F280049C LaunchPad board with DRV8320 do not support PWMDAC
(, i have some related questions :
From the code, PWMDAC use ePWM7A/B and ePWM8A/B, that is related to GPIO12/28(7A) GPIO13/29(7B) GPIO 14/24 (8A) and GPIO 15/32(8B),
and those PGIOs are used for other function at the LaunchPad board, does it the reason of you answer?

What about if i use ePWM1 & 4 (that is originally used by site as the PWM signal for DRV8320 at site2), since i only use site 1. ?
// obj->pwmHandle[0] = EPWM1_BASE; //!< the PWM handle, GPIO0/GPIO1
// obj->pwmHandle[1] = EPWM4_BASE; //!< the PWM handle, GPIO6/GPIO7
obj->pwmDACHandle[0] = EPWM1_BASE; //EPWM7_BASE;
obj->pwmDACHandle[1] = EPWM1_BASE; // EPWM7_BASE;
obj->pwmDACHandle[2] = EPWM4_BASE; // EPWM8_BASE;
obj->pwmDACHandle[3] = EPWM4_BASE; // EPWM8_BASE;

Do i also have to run this below code at hal.c, as by default HAL_setupPWMDACs will not be compiled, and instaspin lab guide does not mention about this as well
// setup the PWM DACs


  • Hi Evanus,

    I believe what Yanming was meaning that the LAUNXHL-F280049C board itself is missing the hardware components and connections for the PWM DAC functionality. For example the F2837x LaunchPad has the RC circuitry below for this purpose:



  • Dear Kevin

    Thanks for the response, you are correct, there is no RC filter at LAUCHXL board, so i reroute the PWMDAC to EPWM1&4 (I don't use site 2, so i use that port for PWMDAC), and use external RC filter. 

    There is another script that i think need to be run :

    HAL_setupPWMDACs(handle, USER_SYSTEM_FREQ_MHz); in hal.c. By default this line will  not be compiled and instaspin lab guide do not mention to setup the PWMDAC as well. If this line have to be run as well, please add this in the next instaspin revision manual as well 

    Finally i can run the PWMDAC, with the above setup (i change the freq to 62.5Hz), as below picture, but failed to get similar result with datalog

    i have followed the guide (but i change the display data from 400 to 4000, in order to get that picture) :

    datalogObj->iptr[0] = &angleFoc_rad;
    datalogObj->iptr[1] = &pwmData.Vabc_pu.value[0];
    datalogObj->iptr[2] = &pwmData.Vabc_pu.value[1];
    datalogObj->iptr[3] = &pwmData.Vabc_pu.value[2];

    What's wrong with the datalog, while i can get the expected waveform using pwmdac, and unexpected waveform from datalog

    thank you and best regards


  • Dear Kevin

    Here is the picture (that was disappear at my previous message) with the CCS graph tool, all 4 datalogObj->iptr , have the similar result.

  • Hi Evanus,

    I'm not very familiar with the InstaSPIN Software. I'll see if Yanming can comment on your question.



  • You might refer to the lab03 of instapin-foc for launchxl-f280049c in motorcontrolSDK that has detailed operation steps for implementing the datalog.

    And don't change the assigned memory for the datalog buffer that needs to use the GS RAM for DMA used by datalog.