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.

Cannot find Device_init(), Interrupt_initModule() and other functions. (How to use driverlib functions in a bitfield example?)

Other Parts Discussed in Thread: LAUNCHXL-F28379D, C2000WARE

Thanks for the code and for your time;

probably you assumed that i am familar with TI but actually i have been working with Ti for only two weeks now.
could you please just clarify the following:

1/is this program works with LAUNCHXL-F28379D !? does it have "driverlib.h" ... couldn't find it in F28379xD device support
2/is device.h the same as F2837xD_device.h?
3/where is Device_init() located ? is it the same as InitSysCtrl() that is located in F2837xD_SysCtrl.c?
Device_initGPIO != InitGpio()
Interrupt_initModule() != InitPieCtrl()
Interrupt_initVectorTable() != InitPieVectTable()
4/where is GPIO_setPadConfig(0, GPIO_PIN_TYPE_STD) located ... i guess it only sets some GPIO registers.
5/Interrupt_register(INT_EPWM1, &epwm1ISR) != PieVectTable.EPWM1_ISR= &epwm1ISR;

6/ if i decided to poll the GPIOs, and if i try this simple code

GpioCtrlRegs.GPAPUD.bit.GPIO4 = 0; // Enable pullup on GPIO4
GpioCtrlRegs.GPAMUX1.bit.GPIO4 = 1;
GpioCtrlRegs.GPADIR.bit.GPIO4 = 1; //output
GpioDataRegs.GPADAT.bit.GPIO4 = 1;

the pin doesn't go high (5v) ...am i missing somthing here !?
  • So there are two ways we support our devices.

    1. Bitfields (Seems to be what you are using)

    2. Driverlib (The new and improved way, supported by TI and easy to use for beginners).

    Since you are a new user, I would recommend using driverlib. There are functions written on top of the registers to make it even easier  for customer to configure our device.

    What you need to do is open Resource Explorer, put in your device name, open C2000WARE, navigate to the examples and click on the driverlib folder. In this folder you will be able to see example codes similar to the one I sent you.

    If you would like to access registers using bitfields, use the bitfields examples in the bitfield folder.

    If you want the capability to use both bitfield and driverlib, there are empty base project available for that too.

    So open Resource Explorer

    Then select your device in C2000WARE.

    Then select the empty project for both bitfield and driverlib.

    After importing, go ahead and add the code I sent you in: 

    Into the main file: 

    Good luck and hopefully this explains it all.

    Nima Eskandari