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.

TMS320F280048: Use of bit-field and driverlib on F28004x CLA

Part Number: TMS320F280048

Champs, 

I am asking this for our customer.

The user is migrating their older codes from F28035 including CLA onto F280048.

(On F28035, the user is able to use registers in bit-field coding style on CLA.)

It's OK for them to use bit-field and driverlib coding styles on F28004x C28x (.c files), but they get stuck on CLA (.cla files).

They followed the chapter 2.3 of the "F28004x_DEV_USER_GUIDE.PDF" in 

C:\TI\c2000\C2000Ware_1_00_06_00\device_support\f28004x\docs

1. Include path and lib like below

2. In "xxx_cla.cla" includes like below

3. In main.h, includes like below

#include "dsp_type_define.h"

#include "initial.h"

#include "xxx_cla.h"

// from code/peripheral

#include "..._adc.h"

#include "..._can.h"

#include "..._cla.h"

#include "..._epwm.h"

#include "..._gpio.h"

#include "...timer.h"

// from ti include/common

#include "device.h"

// from ti driverlib

#include "driverlib.h"

////////////////////////////////

The building error message is attached here.

Problems_modified.txt

Do you have any comment if we miss anything?

Wayne Huang

  • Hi Wayne,

    Its hard to tell without information as to what the errors are.

    Not ever header file will build if #include in a CLA file. I believe this has to do with structures and also memory mapping them to the CLA. Plus the CLA doesn't have access to every peripheral.

    Please only include the header files you need. Alternatively, you can use the hw_ header files in driverlib to access the registers you need.

    sal
  • Sal,

    In this case, they only need to use CLA to access PWM and ADC results like they did on F28035.

    Do you mean they should only include those peripheral headers they want to use rather than include the upper layer header files?

    Do we have any example code?

    For example, use CLA and PWM/ADC like our existing example codes on C28x for PWM/ADC.

    CLA is originally designed to share off C28x loading, especially for control loops, but it seems we don't have many examples even on TI designs.

    Wayne Huang

  • Please see cla_ex2_adc_fir32 example in C:\ti\c2000\C2000Ware_1_00_06_00\device_support\f28004x\examples\cla

    I do mean that you can try only including the headers you need.

    Hope this helps,
    sal