SPRZ458F May 2019 – February 2024 TMS320F28384D , TMS320F28384D-Q1 , TMS320F28384S , TMS320F28384S-Q1 , TMS320F28386D , TMS320F28386D-Q1 , TMS320F28386S , TMS320F28386S-Q1 , TMS320F28388D , TMS320F28388S
Revisions Affected: 0, A
If the XRDY bit is used to properly gate writes to the DX2/DX1 registers, this condition will not happen.
Per the operation of the McBSP, a write to the DX1 data transmit register will automatically clear the XRDY bit, indicating a not-ready-status. Once this data is transferred to the internal transmit shift register (XSR1), the McBSP HW will set the XRDY bit, indicating a ready-status, and new data can be written to DX2/DX1 data transmit registers.
If the set and clear of XRDY occur on the same CPU clock cycle, the XRDY bit will remain cleared and the new data in the DX2/DX1 will not be transmitted.
In this state of XRDY = 0, the McBSP will appear not-ready indefinitely.
Any subsequent writes to DX2/DX1 will behave normally and the XRDY bit will function as normal.
Workaround: When transmitting multiple words of data using the McBSP module, it is recommended that the XRDY bit in the SPCR2 register be polled before writing new data to the DX2/DX1 registers to prevent overwriting. For those modules that do not have access to the XRDY bit (such as the DMA controller), the XINT interrupt inside the McBSP module can be configured to reflect XRDY (via the XINTM bits in SPCR2 register); and this can also be used to gate writes to the DX2/DX1 registers. This will also ensure that the XRDY bit is not set and cleared on the same CPU cycle, causing the above “not-ready indefinitely” condition.
If the system allows multiple bus controllers (such as the C28x CPU and the DMA controller) to write to the DX2/DX1 registers, then the ready-state of the XRDY bit should be validated before passing control of the McBSP to a different bus controller. This will ensure that the state of XRDY is accurate and the simultaneous set/clear action does not occur.