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.

TMS320F28035: CLA data update timing

Part Number: TMS320F28035


Hello.

Please tell me about updating CLA data.

CLA data is updated regularly in the task cycle.

Is it possible that these old and new data are mixed in the CLA_TSK function?

When using interrupt handling, to avoid mixing old and new data ,I used DINT / EINT when updating the data.

Can I use this to stop the start of the CLA_TSK function?

The start trigger for Cla1Task1 () is EPWM1INT.

Please let me know if there is a way to prevent the old and new data from being mixed.

*Periodic task

DINT;  //necessary?

C28xtoCLA.Buck.vCmd = _IQ16toF(Param->Ctrl.P12Vset); 

C28xtoCLA.Buck.iCmd = _IQ16toF(Param->Ctrl.BukLmt);

EINT;  //necessary?

__interrupt void Cla1Task1 ( void )

{

Clawk.Buck.error = C28xtoCLA.Buck.vCmd - wk;

:

Clawk.Buck.out = C28xtoCLA.Buck.iCmd;

:

}

Best regards,

  • Hi Ksma,

    Please use the code formatter in future posts - it makes code much easier to read on the forum.  The formatter looks like "</>" on the post menu.

    ksma said:

    ,I used DINT / EINT when updating the data.

    Can I use this to stop the start of the CLA_TSK function?

    No.  DINT/EINT are only for the C28x.  It modifies the INTM C28x bit (interrupt mask).  It does not impact running of CLA tasks.

    You could clear the CLA interrupt enable bit for that task, if you do not want it to run.   

    There are options based on the timing of your system:

    For example: The CLA interrupts the C28x at the end of the task.  This would let the C28x know the task is finished and it is safe to update the variables. 

    Regards

    Lori