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.

CCS/TMS320F28027F: SCI receive

Part Number: TMS320F28027F
Other Parts Discussed in Thread: CONTROLSUITE, C2000WARE

Tool/software: Code Composer Studio

I am using c2000 piccolo launchpad (28027F) for sci communication . First  I imported sci ecoback example from controlSUITE and it runs fine. It takes input from computers keyboard as a Rx signal for c2000 launchpad . But when i send signal from raspberry pi TX pin to c2000 launchpad Rx pin it is not receiving . What should be changes do i need to done in sci configuration registers .

  • You need to make sure the TX/RX pins are connected properly for the devices you are using the SCI pins you are using. You also need to make sure both are using the same baud rate.

    sal
  • Thanks for suggesting me.

    But still I am unable to get signal on Rx pin on c2000 launchpad (28027F)

    Register configuration are as follows:

    void scia_init()

    {

       // Note: Clocks were turned on to the SCIA peripheral

       // in the InitSysCtrl() func tion

       SciaRegs.SCICCR.all =0x0007;   // 1 stop bit,  No loopback

                                      // No parity,8 char bits,

                                      // async mode, idle-line protocol

       SciaRegs.SCICTL1.all =0x0003;  // enable TX, RX, internal SCICLK,

                                      // Disable RX ERR, SLEEP, TXWAKE

       SciaRegs.SCICTL1.bit.RXENA=1;

       SciaRegs.SCICTL1.bit.TXENA=1;

       SciaRegs.SCICTL2.all =0x0003;

       SciaRegs.SCICTL2.bit.TXINTENA =1;

       SciaRegs.SCICTL2.bit.RXBKINTENA=1;

       // SCI BRR = LSPCLK/(SCI BAUDx8) - 1

        SciaRegs.SCIHBAUD    =0x0000;  // 250K @ LSPCLK = 10Mhz

        SciaRegs.SCILBAUD    =0x0004;

        SciaRegs.SCICTL1.all =0x0023;  // Relinquish SCI from Reset

    }

    void sciSend(Uint32 length, uint8 * data)

    {

       while((length--)>0U)

       {

           // while (SciaRegs.SCIFFTX.bit.TXFFST != 0) {}

           // SciaRegs.SCITXBUF=*data;

            //*data++;

          while(SciaRegs.SCICTL2.bit.TXRDY==0){}

          SciaRegs.SCITXBUF=*data;

          *data++;

       }

    }

    void sciReceive(Uint32 length, uint8 *data)

    {

       while((length--)>0U)

       {

         // while(SciaRegs.SCIFFRX.bit.RXFFST !=1) { }

         // while(SciaRegs.SCIFFRX.bit.RXFFST==0) {}

         // *data = (uint8)(SciaRegs.SCIRXBUF.all);

         // *data++;

        //  SciaRegs.SCICTL1.bit.SWRESET=0;

           while(SciaRegs.SCIRXST.bit.RXRDY !=1) {}

           //while(SciaRegs.SCIRXST.bit.RXRDY=0) {}

          *data=(uint8)(SciaRegs.SCIRXBUF.all);

          *data++;

       }

    }

    void scia_fifo_init()

    {

       SciaRegs.SCIFFTX.all=0xE040;

       SciaRegs.SCIFFRX.all=0x2044;

       SciaRegs.SCIFFCT.all=0x0;

    }

    Send function is working correctly .

    Please help me to find why receiving is not working . Actually its getting stopped at highlighted line.

    Thank you in advance. 

  • Please use a oscilliscope to ensure that the data is reaching the C2000 RX pin.

    sal
  • Sorry for late reply,
    I have checked with CRO.
    The problem is I am using idle line mode on SCI but i am getting signal from device which has regular UART, is this configuration receive 8-N-1 standard UART signal without any problem. SLEEP=0, TXWAKE=0;
    thanks in advanced.
  • I want to say , Will that configuration receive regular UART signal.
  • I am not sure what you mean? Please consider the examples in controlSUITE and C2000Ware again.
    sal