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: SCI communication: Only able to read first few characters and not able to transmit

Part Number: LAUNCHXL-F28379D

Tool/software:

Hi,

I am setting up the code with same parameters as the SCI example3 but with Hardware Abstraction Layer. I am using polling to read/send the data.

void sci_write(const uint16_t * const array, uint16_t length)
{
    int i=0;
    for(i = 0; i < length; i++)
    {
       while(!SciaRegs.SCICTL2.bit.TXRDY);
        SciaRegs.SCITXBUF.bit.TXDT = array[i];
    }
}

void sci_read(uint16_t * array, uint16_t length){
int i=0;
    for(i = 0; i < length; i++)
    {
        while(!SciaRegs.SCIRXST.bit.RXRDY);
        array[i] = SciaRegs.SCIRXBUF.bit.SAR;

    }
}

Here's the readout result shown in the terminal. I was able to get proper readout for the first few characters (Fig 1). Then the Baudrate register and SCICTL2 registers were forced to change (Fig 2)

Fig 1 Terminal Readout

Fig 2 Register automatically changed (left: before right: after)

(C2000 ware SCI example 3 worked perfectly, which means the hardware, baudrate, port etc were set properly)

  • Hello,

    Some C2000 boards require a predefine symbol to correctly set the clock and other configuration settings on the device. Please add the predefine symbol “_LAUNCHXL_F28XXXX”.

    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