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.

Compiler/TMS320F280040: Including f280004x_device.h and driver lib.

Part Number: TMS320F280040

Tool/software: TI C/C++ Compiler

I have a project that uses driver lib.  There is no driver lib function to set the SCI FIFO delay and I would like to write the GPIODataRegs instead of using drive lib GPIO functions.  If i include f280004x_device.h the project will not build due to multiple errors, mostly duplicate definitions.

Is there are simple work around so I can use either driver lib or device.h?

Why?

GpioDataRegs.GPACLEAR.bit.GPIO22 = 1;

Turns into:

static inline void
GPIO_writePin(uint32_t pin, uint32_t outVal)
{
    volatile uint32_t *gpioDataReg;
    uint32_t pinMask;

    //
    // Check the arguments.
    //
    ASSERT(GPIO_isPinValid(pin));

    gpioDataReg = (uint32_t *)GPIODATA_BASE +
                  ((pin / 32U) * GPIO_DATA_REGS_STEP);

    pinMask = (uint32_t)1U << (pin % 32U);

    if(outVal == 0U)
    {
        gpioDataReg[GPIO_GPxCLEAR_INDEX] = pinMask;
    }
    else
    {
        gpioDataReg[GPIO_GPxSET_INDEX] = pinMask;
    }
}

  • hi DTruex  ,

    Please refer to example empty_bitfield_driverlib_main which is the base framework to use both driverlib and bitfields.

    c2000ware\device_support\f28004x\examples\empty_projects

    Also check chapter Getting Started and Troubleshooting section 2.3 Project: Adding Bitfield or Driverlib Support of F28004x_DEV_USER_GUIDE.pdf

    c2000ware\device_support\f28004x\docs

    Regards.