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.

F28M35H52C1 configuring SCI as UART

Other Parts Discussed in Thread: CONTROLSUITE

TI,

      I am using a Concerto controlCard. I am trying to use the SCI to send and receive serial data. We have used the loopback example as a guide and the technical reference manual in order to initialize everything.  We have conected GPIO28 and GPIO29 as SCIRX and SCITX. We are not able to get anything outputted! Is there a correct position for the switches on the control card to be in? I send a "0" in order to have a start bit and then the 8 bit data I would like to output, is a stop bit required in order send data?

Thanks,

Brandon

  • Here is a code snippet:

    setup GPIO:

    GpioG1CtrlRegs.GPADIR.bit.GPIO28 = 0; //set as an input
    GpioG1CtrlRegs.GPADIR.bit.GPIO29 = 1; //set as an output

    GpioCtrlRegs.GPAQSEL2.bit.GPIO28 = 3; // Asynch input GPIO28 (SCIRXDA)

    GpioG1CtrlRegs.GPAMUX2.bit.GPIO28 = 1; //gives it bits 01 to make it the SCIRXDA (I)
    GpioG1CtrlRegs.GPAMUX2.bit.GPIO29 = 1; //sets 01 to make it SCITXDA (O)

    send data:

    while(1)
    {

    scia_xmit(0x00);
    scia_xmit(0x01AF);

    Initializing SCI:


    void scia_init()
    {
    // SCICCR
    // Character length 8 bits
    // 1 stop bit
    // Parity not enabled
    // Idle-line mode protocol selected
    SciaRegs.SCICCR.bit.SCICHAR =(0x0008-1);
    SciaRegs.SCICCR.bit.STOPBITS = 0;
    SciaRegs.SCICCR.bit.PARITYENA = 0;
    SciaRegs.SCICCR.bit.ADDRIDLE_MODE = 0;

    // SCICTL1:
    // Enable RX and TX
    // Leave SLEEP mode disabled
    // Leave RX Err disabled
    // Leave transmitter wakeup feature disabled
    // SCICTL2:
    // Enable RXRDY/BRKDT interrupt
    SciaRegs.SCICTL1.bit.RXENA = 1;
    SciaRegs.SCICTL1.bit.TXENA = 1;
    SciaRegs.SCICTL2.bit.TXINTENA =1;
    SciaRegs.SCICTL2.bit.RXBKINTENA =1;
    SciaRegs.SCIHBAUD =0x0000;
    SciaRegs.SCILBAUD =0x000F;

    // Disable loop back. This is a loopback within the peripheral
    // and does require an external connection.
    //
    SciaRegs.SCICCR.bit.LOOPBKENA =0;

    // Release the SCI from Reset
    SciaRegs.SCICTL1.all =0x0023;
    }


    void scia_fifo_init()
    {
    SciaRegs.SCIFFTX.all=0xE040;
    SciaRegs.SCIFFRX.all=0x2044;
    SciaRegs.SCIFFCT.all=0x0;

    }

    void scia_xmit(int a)
    {
    SciaRegs.SCITXBUF=a;
    }

  • Brandon

         I have the same problem,but i cant seen any solutions.now i know why .you must generate a program on Cortex_M3 section.the m3 program can be found in Ti controlsuite,the name is setup_m3,the directory is ti\controlSUITE\device_support\f28m35x\v201\F28M35x_examples_Control\setup_m3.the function of this code is configuring gpio to c28x,then your c28x can configure gpio28,29 as uart. i hope this will give some engineers some tips.