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.

LAUNCHXL-F28379D: Configuring and sending messages through SCI

Part Number: LAUNCHXL-F28379D
Other Parts Discussed in Thread: C2000WARE

Tool/software:

Hello, 

I am stuck on configuring SCI on this controller, I have GPIO 18 and 19 configured as Tx and Rx respectively following the user manual. However, When I try to transmit information from the board, nothing is sent out and I can confirm with my picoscope that the pin goes high (3.3V) yet does not send any messages. 

Here is my code for setting up the GPIO pins for SCI B
void ConfigIoForSCI(void)
{
    // Receive Rx physical pin 3
    GPIO_setMasterCore(19,GPIO_CORE_CPU1);
    GPIO_setPinConfig(GPIO_19_SCIRXDB);
    GPIO_setDirectionMode(19, GPIO_DIR_MODE_IN); // IN for Rx receive
    GPIO_setPadConfig(19, GPIO_PIN_TYPE_STD);
    GPIO_setQualificationMode(19, GPIO_QUAL_ASYNC);
   

    //Transmit Tx physical pin 4
    GPIO_setMasterCore(18,GPIO_CORE_CPU1);
    GPIO_setPinConfig(GPIO_18_SCITXDB);
    GPIO_setDirectionMode(18, GPIO_DIR_MODE_OUT); // OUT for Tx transmit
    GPIO_setPadConfig(18, GPIO_PIN_TYPE_STD);
    GPIO_setQualificationMode(18, GPIO_QUAL_ASYNC);

}
Here is my code for initializing SCI B 
void initSCIB()
{

    SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_SCIB); // enable SCI clock
    SCI_performSoftwareReset(SCIB_BASE);
   
    SCI_setConfig(SCIB_BASE, DEVICE_LSPCLK_FREQ, 115200, (SCI_CONFIG_WLEN_8| SCI_CONFIG_PAR_NONE | SCI_CONFIG_STOP_ONE ));
   
    SCI_resetChannels(SCIB_BASE);
    SCI_resetRxFIFO(SCIB_BASE);
    SCI_resetTxFIFO(SCIB_BASE);    
    SCI_disableFIFO(SCIB_BASE);

    //SCI_enableFIFO(SCIB_BASE); // for use with writeCharBlockingNonFifo()

    SCI_enableModule(SCIB_BASE); // enable SCI module
    SCI_enableTxModule(SCIB_BASE); // enable transmit pin --> physical pin 4
    SCI_enableRxModule(SCIB_BASE); // enable receive pin --> physical pin 3

   
}
U16 testnum = 5775; // 5775 in decimal --> 168F in hexadecimal
int mask = 255;

Here is my code for attempting to send out a test number/message through SCI B. 
void sciTransmit()
{
    //SCI_writeCharBlockingFIFO(SCIB_BASE, 0x55);
    //SCI_writeCharBlockingFIFO(SCIB_BASE, 0x55);

    // SCI_writeCharBlockingFIFO(SCIB_BASE, (testnum & mask));
    // SCI_writeCharBlockingFIFO(SCIB_BASE, ((testnum >> 8 )& mask));
 
    SCI_writeCharBlockingNonFIFO(SCIB_BASE, 0x55);
    SCI_writeCharBlockingNonFIFO(SCIB_BASE, (testnum & mask));
    SCI_writeCharBlockingNonFIFO(SCIB_BASE, ((testnum >> 8 )& mask));
 

    //SCI_writeCharNonBlocking(SCIB_BASE, (testnum & mask));
    //SCI_writeCharNonBlocking(SCIB_BASE, ((testnum >> 8 )& mask));
   
}
Here is what I see when I hook up a probe to the Tx pin on the board. I assume it is set up correctly, but I am unsure what I am doing wrong, I am relatively new to this. Any suggestions are appreciated! 
  • Hi Daniel,

    Thanks for your inquiry. I am reviewing this now and will get back to you within the next day. Appreciate your patience!

    Best Regards,

    Allison

  • Hi Daniel,

    A few things to check:

    1. Are you able to run our SCI C2000Ware examples without issue?
    2. Can you please double check the baud rate parameters (SYSCLK, LSPCLK divider and LSPCLK frequency, SCI BRR value)? What are you configuring for these values?
    3. Do you see any error flags being set in the SCI registers?
    4. If you haven't already, can you please add the F28379D LaunchPad predefine to your project properties?
      1. Some C2000 boards require a predefine symbol to correctly set the clock and other configuration settings on the device (e.g. in device.h)
      2. In CCS, right click the project being used, then choose Properties → Build → C2000 Compiler → Predefined Symbol → then choose the plus button “add” symbol. Add the given pre-define symbol for your particular device that was found in the device.h file (like “_LAUNCHXL_F28379D”)

    Best Regards,

    Allison