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.

ACTRA & ACTRB reinitialization problem in TMS320F2810

I am using 2810 micrcrocontroller  for  STATCOM application(Three level inverter).

In the starting all PWMs from EVA and EVB should be pulled low.(ACTRA &&ACTRB=0x0000).

Ones the initial check is done for the healthyness of the inverter one digitalinput will be high.Once the dsp gets this signal it makes (ACTRA &&ACTRB=0x0666).

But the same I am unable to do .

The PWM output becomes :=>

PWM1 to PWM6 = all high(EVA)

PWM6 to PWM12=all low(EVB)

 

KIndly help....

Prashant

  • Here is a suggestion - please make sure all your PWM outputs are working with correct polarity before implementing the disable/enable feature using your digital input. Once you check all PWM outputs using a scope then try changing ACTRx registers from CCS watch window. Check ACTRx register loading scheme - I believe ACTRx registers are shadowed and loading can be changed using COMCONx register. After you verify that ACTR register changes have correct effect on your PWM outputs then implement the digital enable/disable feature. By the way, how are you detecting the signal? An external interrupt? Capture? I sugegst you first simulate this using CCS watch window before using actual signal. I hope this way your debugging will be easier - good luck.

  • Hi,

    Thanks for reply.

    My problem is partial solved.I want to make all PWM output low.So, I am making

    ACTRA=0x0000; // Active low

    ACTRB=0x0000; //Active low

    But, Instead of all PWM becoming low for EVA and all high for EVB.

    So what I have done.Once PDPINT becomes low I make all as GPIO(digital output) first and than all pulled low.

    I have one more problem how to change a variable online with out disturbing the program using CCS ?

    Thanks

    Prashant

    M/S B.H.E.L.

  • Sorry..... I didn't understand your question ... did you mean how to change varibales in CCS while DSP is running?

    Most likely you are already aware of real-time monitoring which allows monitoring and changing variables when the device is running so it will help if you clarify your question.

  • Hi ,

    Thanks for the reply.

    Yes I meant to change the variable online in the ccs window with DSP running.

    Now what is happening when I tried to change the variable online using CCS watch window.the program is first halted fro a small time and due to this my system which is very running at 1KHz switching frequency is triping due to over current error.

    How to use this real time monitoring in CCS ?

    Thanks and Regards

    Prashant

  • Prashant,

    Real-time mode is available from the Debug menu within CCS3.3.

    The correct method of running a project with real-time mode would be as follows:
    1) Compile project
    2) Load program into RAM or write the program into flash
    3) Debug -> Reset CPU
    4) Debug -> Restart
    5) Debug -> Real-time mode;  if a warning window pops up, click yes
    6) Debug -> Run
    7) Right-click on the watch window or graph and click "Continuous refresh".  The watch window/graph should now continuously update and whenever you edit a variable in the watch window the DSP will not be halted.

    Note that before you reset the CPU again you should disable real-time mode.


    Thank you,
    Brett

  • Hello

    Brett already posted the steps needed to run in real-time mode. In an actual system where you are managing currents , voltages please make sure not to modify any variables which will make the system unstable. Also, I am sure you have already set it correctly so but it will be good to check that the PWM compare loadings are not in immediate load mode. A safe compare load instant is counter = zero. Good luck with your project.