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.

Importing libraries and Commros

Other Parts Discussed in Thread: CONTROLSUITE

Good Day,

I am trying to get the SCI on a C2000 F2803 to work. I am using the InstaSPIN BLDC GUI project as a foundation for my code that I am editing to meet my project requirements. I cleaned it up and left anything I did not understand.

There is a "commros_user.h" library that I can only think is linked to the GUI crosshairs program but it has SCI function in it. I could not find documentation on it so I am deciding not to use it. I tried importing the DSP2803x_sci.c file from Control Suit but it seem to be lacking, well everything. It only has initializations for the GPIOs

My question, is there full SCI (or USART) library for this device that I can use and if so where can I find it or do I have to go old school and make it myself.

Any information would be appreciated.

Regards,

Christian 

  • Hi Chris,

    Christian Barran said:
    My question, is there full SCI (or USART) library for this device that I can use and if so where can I find it or do I have to go old school and make it myself.

    "DSP2803x_Sci.c" is the file available from TIs end for their customers. You can add in your routines if you need customized ones.

    You can find the file here: C:\ti\controlSUITE\device_support\f2803x\v130\DSP2803x_common\source

    Regards,

    Gautam

  • This example seems a little better

    ti\controlSUITE\device_support\f2803x\v130\DSP2803x_examples_ccsv5\scia_loopback_interrupts\

    But would be nice to have an actual library of some sort.

    All that file seems to do is init the GPIO to handle the SCI. It is literally less than 20 lines of actual code:

    void InitSci(void)
    {
    //tbd...
    }
    void InitSciGpio()
    {
      InitSciaGpio();
    }
    void InitSciaGpio()
    {
       EALLOW;
       GpioCtrlRegs.GPAPUD.bit.GPIO28 = 0;    // Enable pull-up for GPIO28 (SCIRXDA)
       GpioCtrlRegs.GPAPUD.bit.GPIO29 = 0;   // Enable pull-up for GPIO29 (SCITXDA)
       GpioCtrlRegs.GPAQSEL2.bit.GPIO28 = 3;  // Asynch input GPIO28 (SCIRXDA)
       GpioCtrlRegs.GPAMUX2.bit.GPIO28 = 1;   // Configure GPIO28 for SCIRXDA operation
       GpioCtrlRegs.GPAMUX2.bit.GPIO29 = 1;   // Configure GPIO29 for SCITXDA operation
       EDIS;
    }