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/DRV8312-69M-KIT: PWMDAC module in Motorware 18, lab1b DAC3 not output on oscilloscope

Part Number: DRV8312-69M-KIT

Tool/software: Code Composer Studio

Motorware 18, DRV8312 board, the PWMDAC (DAC3) does not issue an output to the oscilloscope.  This is because the GPIO is not set correctly in the hal.c file.  To correct this, read the following:

Look in hal.c , around line 990.

 

It says:

// PWM-DAC3

  GPIO_setMode(obj->gpioHandle,GPIO_Number_8,GPIO_8_Mode_ADCSOCAO_NOT);

//------------------------

 

I think the GPIO line was set wrong; so I changed it to:

 

// PWM-DAC3

  GPIO_setMode(obj->gpioHandle,GPIO_Number_8,GPIO_8_Mode_EPWM5A);

//-----------------------------------------

 

And now the third PWMDAC channel works!  Let me know if this change works for you.

 

Kurt Kloesel

 

 

Notes on how I figured this out:

1.)    Reviewed schematics and noticed that DAC1 = GPIO10, DAC2=GPIO11 and DAC3=GPIO8

2.)    Schematics can be found in folder C:\ti\controlSUITE\development_kits\DRV8312-C2-KIT_v128\~DRV8312EVM-HWdevPkg\DRV8312_RevD_HWDevPKG\DRV8312EVM_RevD_Schematic.pdf

3.)    I finally stumbled across the GPIO definitions in hal.c and noticed that GPIO8 was different than GPIO10 and GPIO11

 

  • Look at gpio.h .  Line 135 and line 137.  Somehow they got mixed them up.  In addition, they only come in pairs of A & B , I don’t think there is a ‘C’.  

     

    Kurt Kloesel

     

    -------------------------------------------------------------------------------------------------------------------------

    That’s good! 

     

    Yeah I looked into it and I see the same thing in my hal.c.  For DAC 3 it says “ADCSOCAO_NOT”.  But, why did you specifically change it to “EPWM5A”??    In the hal.c DAC1 is EPWM6A

    And DAC2 is EPWM6B, so I assume that DAC3 would follow that trend and be EPWM6C.

     

    Jonathan

     

  •  Jonathan-

    In addition; I noticed that the working ‘pwmdac output’ part of the code always appears in the mainISR loop. I have reviewed ‘PM_Sensorless.c’ , ‘InstaSPIN Lab1b.c’ and ‘InstaSPIN lab 10e’(motorware 18 , InstaSPIN labs Version 1.0.16) . The documentation does not necessarily reinforce that the code should be placed in the mainISR loop, maybe I just mis-read it.

    Kurt Kloesel

     

  • Hi Kurt

    Which device hal.c were you referring to? In the version I have for F28069M, the line looks like this in hal.c (line 1057)

    // ADCSOCAO_NOT or PWM-DAC3
    GPIO_setMode(obj->gpioHandle,GPIO_Number_8,GPIO_8_Mode_EPWM5A);

    And was set to EPWM5A by default

    And you are correct, we have placed the PWMDAC update code in the mainISR, but it's not mandated to do so. Instead it is a choice we made to allow the updates to occur when the PWM outputs are changed by the estimator

    Regards
    Sean

    P.S. I'm confused - is there an individual named Jonathan posting from your E2E account? I see what looks like a conversation here but only one E2E account being posted from
  • 1.) Motorware 18, the DRV8312-C2-KIT_v128 kit.  In ControlSUITE.  Please indicate the full directory string of consequence.  There are a lot of hal.c 's in the downloaded software.

    2.) I am just posting these comments to keep a record of my work.  Jonathan is a just a co-worker.

    3.) What management process conceptualizes a profit strategy by insulting the hard-working customers and belittling them by giving them ranking numbers 100X lower than the serving waitress'  ?

    4.) Going with the time honored saying "The customer is always right..." wouldn't you encourage more audience participation by giving the outside participants higher numbers than the employees?

     I'll calm down later.

  • The hal.c file I was referring to is here: C:\ti\motorware\motorware_1_01_00_18\sw\modules\hal\boards\drv8312kit_revD\f28x\f2806x\src

    I'm not sure what you're referring to with items (3) and (4). If it's the E2E levels, I believe they're just based on number of threads and posts created. There's an explanation of what they mean if you click on the word in the post header. I don't believe they are meant to demean anyone, it's more just forum flair I believe. That said, I have 0 insight into how they are made or decided

    Sean
  • Kurt,

    I just wanted to reiterate the point on E2E levels. These are just intended to represent amount of activity on the TI E2E forum. It is just a numerical designation of the number of questions and answers to Forum. Invariable TI engineers will tend to have a lot of activity but we do have some long term community members with high activity. There is no difference between internal and external contributors.

    Regards,
    Bobby