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.

Reloading UPP DMA descriptors on c6657

Hello!

I try to use the UPP on c6657. I use evolution board TMDXEVM6657. UPP receives data from ADC via TEST_PH1 slot. I use only START pin to start transmition. One line is 2048 words (14 bit data length). ADC sends data to UPP continuously. DMA descriptor settings are:

#define PIXEL_PER_LINE 2048

    uppRegs->UPID0 = (unsigned int)Buff;
    uppRegs->UPID1 = (unsigned int)(2 * 65536 + PIXEL_PER_LINE);
    uppRegs->UPID2 = (unsigned int)(PIXEL_PER_LINE);

So, I have two lines in window. Address of Buff in memory is 0x0C05E940. Register UPIS0 has 0x0C05E940 address just before starting of transmition. After two UPP interrupts (two lines in window),  register UPIS0 has 0x0C05F940 address. I reload DMA descriptors in UPP interrupt handler (pending UPIS2.PEND bit), but the content of register UPIS0 does not change. Why?

  • Elnur Babishov,

    In the current MCSDK package does not have uPP example. So that,you may want to control the uPP registers directly for the usage.
    As per the UPP user guide, if you are configured the built-in DMA and trigger the transfer, the DMA will transmit the data automatically.
    The uPP peripheral includes an internal DMA controller to maximize throughput and minimize CPU overhead during high-speed data transmission.
    It is recommended to use uPP with its own internal DMA, here all the uPP events are connected to internal DMA channels I/Q.

    Internal DMA Concepts:

    Window Address - A pointer to the first data word in the buffer.
    Line Size - The number of bytes per data line.
    Line Count - The number of data lines in the entire transfer.
    Line Offset - The offset address between the start of each data line.

    These parameters allow some flexibility in organizing uPP data buffers.

    Single line transfer:
    In this case, all of the data resides in a contiguous buffer with size equal to the line size parameter.
    Line count is set to one (1) and the line offset is irrelevant.

    Multiple lines:
    In this case, be sure to set the line offset equal to the line size.

    To repeatedly send a data buffer with minimal overhead, set the line count to an arbitrarily high number and set the line offset to zero (0). This will cause a single line to be transferred repeatedly.

    Kindly refer the section "Initialization and Operation" at UPP user guide for more details.
    After initializing the uPP peripheral, verify the below sequence.

    1. Program the DMA channels with their first transfers using the uPP DMA channel descriptor registers:UPID0-2 and/or UPQD0-2.

    2. Watch for interrupt events. Reprogram the DMA as necessary (checking that the PEND bit in the uPP
    DMA channel status register (UPxS2) is 0).

    •   If polling, check UPIES. Reading a bit as 1 indicates the corresponding event has occurred. Write the corresponding bit with 1 to clear.
    •   If using ISR, check UPIES inside your ISR.