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.

SCI 1 Receive Problem



The SCI has been initialized according to TI's recommendations and works correctly for receive and transmit on our eval board.

The eval board uses the BGA part.

We now have our own custom board and cannot get the receive to work.  We have traced the signal to the TMS570 pin and we are not getting data into the receive buffer.

We are using polling to keep things simple at this point.

Note that our custom board uses the 144-pin QFP.

We did find a strange workaround that makes the receive channel functional: Place serial channel in loopback mode, place a character in the transmit buffer, delay one second, read character from receive buffer, disable loopback mode. At this point the receive channel becomes functional.

Any idea what is going on?

Andy

  • Hi Andy,

    Could you let me know the default status of the SCI pin in both eval board and your custome board justafter SCI configuration and before putting the transmit data on the buffer.

    If the configurations of the device remains same and you see pin status same between eval board and Custom board then there should be no diference.

    Which silicon are you using?  could you please let me know the device name?

    Best Regards
    Prathap

     

     

  • Andy,

    One feature of the I/O structure in the TMS570 peripherals (like SCI, CAN, GIO, etc) allows the input buffer to be disabled. The input buffer for any pin is disabled when the pull on this pin is disabled while the pull direction is selected to be pull-down, that is, PULDIS = 1, PSEL = 0.

    In case that a pull is not desired on this pin, select PSEL = 1 and then write PULDIS = 1.

    Regards,

    Sunil

  • Sunil,

    Your answer is confusing as it looks like the PSEL and PULDIS are associated with the SPI bus and not the SCI.

    Here is my initialization code for the port:

     

    /* NOTE: Useing SCI1 as UART0 */

    void Uart0Init(uint baud)

    {

      SCI1GCR0        = 0x1;  /* Reset SCI */

       /* Disable all interrupts */

       SCI1CLEARINT    = 0xFFFFFFFF;

       SCI1CLEARINTLVL = 0xFFFFFFFF;

       SCI1FLR         = 0xFFFFFFFF;

     

       /* Set SCI1 as standard UART mod: no parity, 1 Stop bit, internal clock, disable multi buffer. */

       SCI1GCR1        = 0x03020022;

     

         SCI1BRS         = (VBUS_CLK / (16 * baud));  /* Set baudrate */

         SCI1FORMAT      = 0x7;  /* Set transmission length 8 bits */

         SCI1PIO0        = 0x6;  /* Set SCI pins functional mode: TX and RX pins */

         SCI1PIO1        = 0x0;  /* Set SCI pins output direction */

         SCI1PIO3        = 0x0;  /* Set SCI pins default output value */

         SCI1PIO6        = 0x0; /* Set SCI pins open drain enable */

         SCI1PIO7        = 0x0;  /* Set SCI pins pullup/pulldown enable */

         SCI1PIO8        = 0x0;   /* Set SCI pins pullup/pulldown select */

         SCI1GCR1       |=  (1 << 7);  /* Enable SCI1 */

    }

  • Hello Andrew,

     

    SCI1PIO7 and  SCIPIO8 control the pullup/down functionality of the SCI module. If the pull functionality is disabled (0 written to the respective bit in SCI1PIO7) AND a pulldown is selected (0 in respective bit of SCI1PIO8), then the input buffer of that pin is disabled. From the code you have provided this seems to be the case and is most likely the cause of your problem. A simple check could be to enable the pull functionality in SCI1PIO7.

    This behavior is also described in the TMS570 TRM (SPNU489a) in sections 13.15.3 and 13.15.5.

     

    Please let us know if this solves your problem.