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.

CCS/TMS320C6657: UPP - information is lost during DMA window switching

Part Number: TMS320C6657

Tool/software: Code Composer Studio

Hello. I have a problem with UPP. I try to write my driver, I don’t use SDK. It is necessary to implement continuous data reception through channel B. I configure the multiplexer, reset UPP, turn on the UPP, setup interrupts, configure two windows (both 32000 bytes, one line, located in a non-cached area, one immediately becomes active, the other is waiting). A continuous counter, 16 bit, is fed to the input of the UPP channel B. A total of 32000 values should appear in two windows, right? I wait until the last element of the second window is filled, and check the result. I observe data loss between windows - about 40 bytes, depends on baud rate. Loss occurs due to window switching - receiving a window of 64,000 bytes is successful. Here is my settings:

UPCTL = 0x2020004

UPICR = 0x380038 (both channels for debug)

UPTCR = 0x0

UPQD0 = buf0

UPQD1 = (1 << 16) | (32000)

UPQD2 = 0

UPQD0 = buf1

UPQD1 = (1 << 16) | (32000)

UPQD2 = 0

What could be the problem? Thank.
  • Update. It seems that the transmission speed does not affect data loss. Instead, the amount of lines and the number of lines affects the loss. Reduced the line volume to 64 bytes, increased the number of lines to 500 - losses decreased to 20 bytes.

  • Hello,

    How fast are you running the uPP? Are you observing any overflow errors in the UPIER?

    Generally speaking, increasing the number of lines will result in more EOL interrupts, and thus, more ISR calls and more overhead. This typically results in a loss of performance, not an increase as you are observing...what does your ISR look like?

    Have you tried using the example ISR in the uPP User's Guide? See section 2.6.4, "Sample Interrupt Service Routine,"

    Is there anything else running in your system?

    Do you observe the same behavior in loopback mode?

    Regards,
    Sahin

  • Thanks for the answer. I turned on all interrupts. Since there are two windows, interrupts are generated twice. Both times, the UPISR register has a value of 0x1800, which corresponds to the end of the line and window of the Q channel.

    I am trying to set up a loopback. Channel I is configured for output, channel Q is configured for input, the window volumes are the same. If the divisor of channel I is 0, an overflow interrupt is triggered. But if it is equal to 0xF, then in the receiving buffer there is a duplication of incoming values! Sometimes 3-4 repetitions :). To configure a loopback with reception on two buffers has not yet succeeded. I continue to try to set up the reception.

  • It seems that in loopback mode, the recv clock is affected by an external source. Because of this, the values are duplicated.

  • The problem is still not resolved. Has anyone else had it?

  • Hello,

    Could you please share your ISR?

    Can you try the tuning tips in section 2.6.3? http://www.ti.com/lit/ug/spruhg9/spruhg9.pdf 

  • An interrupt is generated two times (one for each window). Both times the value of the register UPISR = 0x00001800 (end of line, end of window for channel Q).

  • I was able to configure the loopback, AB (in the opposite direction, I also tried). Results:
    1. One window for transmission, one window for reception, the same volume. There are no losses;
    2. Two windows for reception, one for transmission (the volume is twice as large as each reception). Switching the receiving windows does not work, data is not written to the second receiving window.
    3. Two windows for reception, two windows for transmission, the volume of windows is the same. Everything works - there is a window switching during reception and transmission, there are no losses between the windows;
    4. Two windows for reception, two windows for transmission. The volumes of the receiving windows are the same, the transmission is different, but the full volumes are the same. I observe losses at reception, all data falls into the first window.
    Does this mean that window switching depends on another channel? I need a single channel exchange. Due to the fact that data comes only to channel B, I configure both channels to receive and simply do not work with channel A.

  • It looks like the problem is resolved. Disabling STARTA and STARTB avoids losses :).