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.

re-program UPP descriptor

Hi,

I am using a c6655 DSP and one of the UPP channel is configured as receive mode.

After the UPP DMA Channel Descriptor is programmed, before the DMA starts, is there any way to re-program the descriptor without doing a soft reset?

GanZ

  • Hi Ganz,
    After the UPP DMA Channel Descriptor is programmed, before the DMA starts, is there any way to re-program the descriptor without doing a soft reset?


    From my understanding, Yes. You can re-program the descriptor without doing soft reset because the DMA not started so I believe channel is in reset state already.

    Thank you.
  • Rajasekaran,

    Thanks for the response.

    Probably my previous is not very clear. Hear is what happens. The UPP Channel I is in receive mode, it's Descriptor is programmed and is already in active state, but the sender has not start sending data yet. See UPP registers below.

    ProgDmaI, buf = 0x809a1f00
    UPP_UPPID = 0x44231100
    UPP_UPPCR = 0x00000088
    UPP_UPDLB = 0x00000000
    UPP_UPCTL = 0x02020006
    UPP_UPICR = 0x12383238
    UPP_UPIVR = 0xaaaabbbb
    UPP_UPTCR = 0x03030303
    UPP_UPISR = 0x00000010
    UPP_UPIER = 0x00000000
    UPP_UPIES = 0x00000f0f
    UPP_UPIEC = 0x00000f0f
    UPP_UPEOI = 0x00000000
    UPP_UPID0 = 0x809a1f00
    UPP_UPID1 = 0x04b00640
    UPP_UPID2 = 0x00000640
    UPP_UPIS0 = 0x809a1f00
    UPP_UPIS1 = 0x00010000
    UPP_UPIS2 = 0x00000001
    UPP_UPQD0 = 0x00000000
    UPP_UPQD1 = 0x00000000
    UPP_UPQD2 = 0x00000000
    UPP_UPQS0 = 0x00000000
    UPP_UPQS1 = 0x00010000
    UPP_UPQS2 = 0x00000020

    At this point the application wants to change the window buffer address and/or size. But we don't want to reset the whole UPP because channel I and channel Q work independently. If we program the descriptor again, the new descriptor is programmed into the pending transfer, not the current active transfer -- it can be told by UPP_UPIS0, which is still pointing to the old buffer.

    ProgDmaI, buf = 0x80b8f180
    UPP_UPPID = 0x44231100
    UPP_UPPCR = 0x00000088
    UPP_UPDLB = 0x00000000
    UPP_UPCTL = 0x02020006
    UPP_UPICR = 0x12383238
    UPP_UPIVR = 0xaaaabbbb
    UPP_UPTCR = 0x03030303
    UPP_UPISR = 0x00000010
    UPP_UPIER = 0x00000000
    UPP_UPIES = 0x00000f0f
    UPP_UPIEC = 0x00000f0f
    UPP_UPEOI = 0x00000000
    UPP_UPID0 = 0x80b8f180
    UPP_UPID1 = 0x04b00640
    UPP_UPID2 = 0x00000640
    UPP_UPIS0 = 0x809a1f00
    UPP_UPIS1 = 0x00010000
    UPP_UPIS2 = 0x00000003
    UPP_UPQD0 = 0x00000000
    UPP_UPQD1 = 0x00000000
    UPP_UPQD2 = 0x00000000
    UPP_UPQS0 = 0x00000000
    UPP_UPQS1 = 0x00010000
    UPP_UPQS2 = 0x00000020

    I would like to know without resetting the UPP whether it's possible to overwrite the previous descriptor, by programming the new descriptor into the current active transfer, not the pending transfer. If it's possible then how to do it?

    GanZ
  • Hi Ganz,

    There’s a PEND bit in each of the DMA status registers that determines when it’s safe to write the descriptor registers, see below snip from the user’s guide. So my quick answer is, as long as PEND is 0, you can write the registers. The complication here is, when exactly is PEND set and cleared by the uPP IP? The documentation is vague on this point and so somebody from the product group would have to answer that.  Have you tried it?  What was the result?

    Mark

  • Hi GanZ,

    The short answer is no. Once you have initiated a DMA transfer, you either have to wait for it to complete or you have the perform a software reset  to the DMA controller which will terminate both the transfers. Once the PEND bit is set, you can preload the DMA parameters for the next transfer but there is no way of overwriting the parameters for the current transfer.

    Regards,

    Bill

  • Community members,

    Please find the detailed response here.
    e2e.ti.com/.../1763567

    Thank you.