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.

TMS320F28379S: SCIC Repeatedly gets error BRKDT

Part Number: TMS320F28379S


I am running 2 SCI buses, B and C on the TMS320F28379. When running the board, both have the same settings, shown below:


    // configure SCICCR for SCI-C
    ScicRegs.SCICCR.bit.STOPBITS = 0;       // 1 stop bit
    ScicRegs.SCICCR.bit.PARITY = 0;         // odd parity
    ScicRegs.SCICCR.bit.PARITYENA = 0;      // parity disabled
    ScicRegs.SCICCR.bit.LOOPBKENA = 0;      // loopback disabled
    ScicRegs.SCICCR.bit.ADDRIDLE_MODE = 0;  // idle-line mode protocol selected
    ScicRegs.SCICCR.bit.SCICHAR = 7;        // 8 data bits

    // configure SCICTL1 for SCI-C
    ScicRegs.SCICTL1.bit.RXERRINTENA = 0;   // receive error interrupt disabled
    ScicRegs.SCICTL1.bit.SWRESET = 0;       // software reset enabled (active low) while configuring
    ScicRegs.SCICTL1.bit.TXWAKE = 0;        // SCI TX Wake feature disabled
    ScicRegs.SCICTL1.bit.SLEEP = 1;         // Sleep mode enabled
    ScicRegs.SCICTL1.bit.TXENA = 1;         // enable TX
    ScicRegs.SCICTL1.bit.RXENA = 1;         // enable RX

    // configure SCICTL2 for SCI-C
    ScicRegs.SCICTL2.bit.RXBKINTENA = 1;    // enable receiver-buffer/break interrupt
    ScicRegs.SCICTL2.bit.TXINTENA = 0;      // disable TX ready interrupt

    // configure SCIHBAUD & SCILBAUD for SCI-C
    Uint16 brr = 64;// = (Uint16) round(LSPCLK / (SCIC_RS485_BAUD_RATE * 8.0) - 1);
    ScicRegs.SCIHBAUD.all = brr >> 8;           // Baud Rate = 125k
    ScicRegs.SCILBAUD.all = brr & 0xFF;         // Baud Rate = 125k

    // configure SCIFFTX for SCI-C
    ScicRegs.SCIFFTX.bit.SCIRST = 1;        // SCI FIFO can resume transmit and receive
    ScicRegs.SCIFFTX.bit.SCIFFENA = 1;      // SCI FIFO enhancements are enabled
    ScicRegs.SCIFFTX.bit.TXFIFORESET = 0;   // Reset the TX FIFO pointer to zero and hold in reset while configuring
    ScicRegs.SCIFFTX.bit.TXFFIENA = 0;      // disable transmit FIFO interrupts
    ScicRegs.SCIFFTX.bit.TXFFIL = 0;        // set transmit FIFO interrupt level bits to 0

    // configure SCIFFRX for SCI-C
    ScicRegs.SCIFFRX.bit.RXFIFORESET = 0;   // Reset the RX FIFO pointer to zero and hold in reset while configuring
    ScicRegs.SCIFFRX.bit.RXFFIENA = 1;      // Receive FIFO interrupt enable
    ScicRegs.SCIFFRX.bit.RXFFIL = 1;        // Set receive FIFO interrupt levels bit to 1

    // configure SCIFFCT for SCI-C
    ScicRegs.SCIFFCT.bit.CDC = 0;           // disable auto-baud alignment
    ScicRegs.SCIFFCT.bit.FFTXDLY = 0;       // set FIFO transfer delay to 0

    // Relinquish SCI from Reset
    ScicRegs.SCICTL1.bit.SWRESET = 1;       // disable software reset
    ScicRegs.SCIFFTX.bit.TXFIFORESET = 1;   // disable TX FIFO reset
    ScicRegs.SCIFFRX.bit.RXFIFORESET = 1;   // disable RX FIFO reset

With the same thing on SCIB.

SCIB works appropriately, however I cannot detect any activity with SCIC. This is because after some amount of time the status error flag goes high for BRKDT. 

This occurs again if I do a SWRESET on the device, and continues to do so.

The error occurs even if no input is being applied and the RX line is continuously low.

What exactly does this error mean in this case?

  • Hi Dan,

    See some excerpts from the SCI chapter of the device TRM ()below.  An SCI frame starts with a low bit and the additional data bits can all be low.  If the line continues to be low, a BRKDT error will occur.  If this is occurring, this means your RX line is low for too long, which would also be the case if the line is constantly low.

    If you aren't applying an input I think you'll want to enable to the GPIO pull-ups or otherwise pull-up the input.

  • Hi, thanks for the response.

    I took your advice and added in a hardware pullup, so now I am certain there is not a continuous 0 stream. I verified this with a scope on my device.

    Despite this, I'm still seeing the same behavior. When you bring up the microcontroller, the SCIC system ends up with SCIRXST at 0x00A0, the BRKDT flag still gets triggered somehow.

    There's no signal showing up on the line, it's just held high. Does this make any sense?

  • Hi Dan,

    Are you sure that the GPIO for the SCI module are muxed onto the channels in question? If the module isn't muxed onto the pins, I don't think the pull-ups won't have any effect on module operation. Also, I think you want to ensure that the GPIO muxing occurs before the SCI module is enabled.
  • Hi Dan,

    Were you able to resolve your issue?