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.

How to run DRV8301 without servicing watchdog TPS65381?

Other Parts Discussed in Thread: TMS570LS1227, DRV8301, HALCOGEN

Hello,

I bought the kit DRV8301-LS12-KIT with TMS570LS1227, it works so far.

According to the document "Sensored FOC Control with SMO for the Hercules TMS570LS12" V01, page 15 it is possible to disable the TPS65381 by setting all positions on DIP switch SW1 to OFF and commenting out line 89-98 in DRV.C >> I commented out the lines, compiled and flashed the code, it doesn't work.

Could you please verify that it is the right code below? Is it really enough?

Is it possible to run DRV8301 without servicing the watchdog at all?

Is it possible to get the original Halcogen-Code (I use HALCoGen 03.05.00) of the FOC project? 

the code:

while(!ecmpStayinDIAGState(drv->ecmpHandle));
// while(wait); // set cursor to next line to continue - prevents reset chain
while(!ecmpGetWriteAccess(drv->ecmpHandle));
sciInit();

if(ecmpReadRegister(drv->ecmpHandle, RD_SAFETY_STAT5) == 0x04)
{
PutText(drv->ecmpHandle, "TPS65381 is NOT in DIAG state, toggle IGN!\n\r");
while(1);
}

  • Try this one,

    1. Import the project. Put the sw in off position.

    2. find the defination of

    'TPS_EN'

    3. comment it

    4. build the project,

    5 now you can play with the Guicomposer (replace the .out with the new build) or play with the Hyperterminal.

    Regards,

    Haixiao

  • Dear Haixiao,

    thank you very much for the helpful instructions, it works via Hyperterminal with one extension: reconfiguration of the GIOA4-Pin in gio.c

    The original code of the solution "ls12_fix" enables open drain for GIOA4 >> the pin is in high impedance (logical step in case of active ENDRV-Pin of TPS65381, but in my case I switched of the TPS connection to Driver off)

    So I disabled the open drain, set direction to output and set the output value 1 >> I can play with Hyperterminal

    The problem: I can't set the speed in CCS Debugger, I set the enable flag, calibrate (motor spins), disable the calibration, set speed mode gGUIObj.CtrlType=2, set the speed gGUIObj.SpdCmd_q=0.2 (for example) - no rotation, the value gGUIObj.SpdCmd stays 0. What is wrong in that procedure?

    Regards,

    Ros

  • There are two projects of SMO_Encoder in the link that was showed to you: one runs as floating point very similar to the one delivered with the development kit; The other one use fixed point. What you imported to CCS is the fixed point one.

    In fixed point format, _IQ(0.2)=0.2 * 2^24 = 3355443. (I use IQ24 in this project)

    So, go ahead to set gGUIObj.SpdCmd_q=3355443.

    If you import the floating point one, you can set gGUIObj.SpdCmd=0.2.

    Please notice that, the floating point project can be controlled by the GUIComposer but we have not developped a GUIComposer project for the fixed point one.

    Thank you for finding the place I forget seting "#define...

    Regards,

    Haixiao

     

  • Thank you very much, it works, yes right, it was the fixed point conversion.

    I used the fixed point project cause only this solution includes  #define TPS_EN to simply disable the TPS watchdog.

    I would like to go deeper, but you posted a warning for HET-Beginners in Oct, 8, 2012 "In this example, we write a small program in the HET RAM. And this instructions in the HET RAM controls the PWMs and read the encoder signal. It runs independant of the R4 CPU. The R4 CPU then modify the HET RAM to change the PWM duty cycles and read the HET ram to get the encoder angle information", so I will post a question in the next days on the interrupt issues of this FOC project. 

    Could you maybe post a very simple solution with encoder-based FOC (no SMO, no safety features) for beginners? The best one would be a package with halcogen-settings, HET IDE ccs-output  and ccs-code itself. Thank you in advance for any hints.

    Best regards,

    Ros