TMS320F280039C: When I enable FIFO, the SCIRXBUF and SCITXBUF registers have values.

Part Number: TMS320F280039C

Tool/software:

Hello, Ti engineers.

    When I was using the 280039 SCI module and using the initialization process in sci_ex3_echoback.c, I found that when I run the SCI_enableFIFO() function, the SCIRXBUF value is 0xC01A, the SCITXBUF value is 0x8, and the SCIRxBUf value is 0x8. And I can also read the values of these two registers through two variables, but at this time I did not send data through the TXD pin, so I would like to ask how the initial value came from?

  • Hello,

    First, please note that accessing the SCIRXBUF through the expressions window is not recommended. Instead, TI recommends using the SCIRXEMU register (offset 0x6), since accessing the SCIRXBUF register directly has the side effect of clearing the RXRDY flag. Also as a note, just to clarify, an RXBUF value of 0xC01A indicates that the FE/PE flags have been set, and that the buffer contents are 0x1A.

    Now, I notice that you're seeing this junk data before running SCI_enableModule(), which is confusing. What kind of reset are you doing before running this code? At a glance, this reads as registers not being zero'd out before running the code.

    Regards,
    Jason Osborn

  • Hi Jason,

    Thank you for your advice.

    Yes, I found that after running SCI_enableFIFO(), RXBUF and TXBUF registers have values, at this time RXENA has not set 1, from the SCI Module Block Diagram, Does this value come from the Baud Rate MSB/LSB Registers?As for SCITXBUF, I couldn't see the source from the Diagram, so I was also curious about where the data came from. I tried to configure SCI module and then set GPIO, and there would be data, and the data was the same every time.

  • I do not currently see any reason for that data to be there, to my understanding. What kind of reset are you doing before running this code? At a glance, this reads as registers not being zero'd out before running the code.

    Regards,
    Jason Osborn

  • Hi Jason,

    I'm not sure which reset operations I ordered, I ran the sci_ex3_echoback routine, because I was using a board with a crystal frequency of 10M, so I adjusted some macro defined parameters. Then I run this routine, before executing the SCI_enableFIFO() function, SCITXBUF and SCIRXBUF are indeed 0, but after running SCI_enableFIFO(), the values in the image appear. And the value of each board is not necessarily the same, but the value of the same board is the same. Is there any way to see the value of the FIFO register?

  • Zhen,

    That's very odd. Can you run an unmodified version of our example and replicate the issue on the LaunchPad?

    Some notes:

    • I was not able to replicate the issue on my end. See my Registers view:


    • This is generally a great resource for debugging SCI problems: FAQ Regarding SCI Issues. Take a look at this FAQ and see if anything listed there is relevant to your setup and configuration.

    • The closest thing to this issue that we've seen before is when there is data coming into the C2000 device before bootup, which we do NOT recommend.

    Regards,
    Jason Osborn