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.

TMS320C5517: The transmitted data from McBSP on TMS320C5517

Guru 16800 points
Part Number: TMS320C5517


Hello,

On my customer's custom board, 32bit data is transmitted from McBSP to outside and the transmitted data is transferred by DMA periodically.
CLK, FSR and FSX are input signals.

For the data transmitted this time, as a problem, the last two words for the previous DMA transfer are output first.
If XRST of SPCRU is set to 0 before the DMA transfer, the last two words for the previous DMA transfer are not output and the appropriate data is transmitted.

For above behavior, my customers have two questions.

1.Why is the last two words for the previous DMA transfer output first?

2.What does XRST of SPCRU reset for?
  My customers want to know the detail reset by XRST.

Best Regards,
Nomo

  • Hi,

    We're looking into this.

    Best Regards,
    Yordan
  • Hello,

    My customer's phenomenon seems to be related to the underflow which is described in 8.2.6.5.4 of TRM.
    And they are considering applied the procedure of 8.2.11.2.
    In the paragraph, "DXR is already serviced" is described.
    Could you let me know how to know the "DXR is already serviced" status?

    Best Regards,
    Nomo

  • Hi Nomo-san,

    Hi,

    Couple questions:

    When McBSP is not transmitting data in this system, does the software stop the McBSP clocks?

    Or alternately service the McBSP interrupts/DMA events by writing dummy data to the transmit register (DXR)?

    If no data is written to DXR for multiple frames, then the underflow condition will occur and the McBSP will behave as described in 8.2.6.5.4 Transmit Empty: XEMPTY.

    And your answers:

    1.

    During an underflow condition, the transmitter continues to transmit the old data in DXR for every new frame sync signal FSX (generated by an external device, or by the internal sample rate generator) until a new element is loaded into DXR by the CPU or the DMA controller

    If DXR is loaded by the CPU or the DMA controller before FSX goes active, a valid DXR-to-XSR transfer occurs. This allows for the first element of the first frame to be valid even before the transmit frame sync pulse is generated or detected. Alternatively, if a transmit frame sync is detected before DXR is loaded, 0s are output on DX.

    2.

    The reset is described in 8.2.10 Resetting the Serial Port: RRST, XRST, GRST, and RESET:

    Device reset or McBSP reset: When the McBSP is reset by device reset or McBSP reset, the state machine is reset to its initial state. All counters and status bits are reset. This includes the receive status bits RFULL, RRDY, and RSYNCERR, and the transmit status bits XEMPTY, XRDY, and XSYNCERR in the serial port control register (SPCR).

    The serial port can be reset in the following two ways:

    • Device reset (RESET pin is low) places the receiver, the transmitter, and the sample rate generator in reset. When the device reset is removed (RESET = 1), FRST = GRST = RRST = XRST = 0 in SPCR, keeping the entire serial port in the reset state.

    • The serial port transmitter and receiver can be independently reset by the XRST and RRST bits in SPCR. The sample rate generator is reset by the GRST bit in SPCR.

    Table 8-18 shows the state of the McBSP pins when the serial port is reset by these methods

    =-=-=-

    Nomo said:
    In the paragraph, "DXR is already serviced" is described.
    Could you let me know how to know the "DXR is already serviced" status?

    It refers to the DMA event, interrupt, or polling software that causes new data to be written into the data transmit register (DXR). If the software writes to DXR at the start of a frame, then it has the entire period of the frame to perform the DXR-to-XSR transfer so the new data will be ready to shift out. That is plenty of time.

    Regards,
    Mark

  • Hello Mark-san,

    Thank you for your explanations.
    Your descriptions are very helpful.

    Best Regards,
    Nomo