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.

TM4C123 DMA - UART TX done interrupt?

Other Parts Discussed in Thread: STRIKE

Hello everyone,

So I was trying to check how well a little API I made for the TM4C1294 fared with the TM4C123 since the DMAs are different so I wanted to know what to change. First I didn't really did a good check on the datasheet. I just used the API straight away. Then weirdly I found out that the masked interrupt was never set, no wonder, there's no TX done masked interrupt on the UART for the TM4C123 devices! But weirdly enough the UART interrupt handler was being called.

So I checked the more and it seems, now this is what I need confirmation, that the DMA channels have an interrupt for when they are done? So when I am using a DMA channel the interrupt it generates uses the vector of the peripheral it's set too? (ex: TX DMA channel for UART0 calls the UART0 handler?). So I have to check the DMA interrupt statues when I want to check a DMA done with the UART?

So I can get the DMA done for any peripheral that uses a DMA channel with this?

  • Hello Luis,

    On the TM4C123, the DMA completion interrupt "hijacks" the Interrupt Vector from the peripheral. The check of interrupt status must be done in the interrupt handler call. This was at the same time preventing interrupt flow from the peripheral as well. Hence on TM4C129 changes were made to make this co-existing.

    Regards
    Amit
  • Thank you Amit.

    That means my WS2812 controller method I used in the TM4C1294 would have worked in the TM4C123 if I made the adaption. At the time I didn't know I could get the GPIO interrupt for DMA done like that :p
  • Hello Luis

    Pardon me for my memory loss on the WS2812, but if the issue was that the interrupt from the peripheral did not trigger when DMA was enabled, then yes, the adaption has to be made.

    Regards
    Amit
  • Luis Afonso said:
    That means my WS2812 controller method

    Imho - that's quite an impressive, "find" (DMA completion interrupt "hijacks" the Interrupt Vector from the peripheral) you've made, Luis.  Again!    Good job!

    Some here (perhaps many/most) may not recognize, "WS2812 Controller."    Might your post prove even more valuable to those here w/some detailing?

    And - appears vendor's "penchant" for "hoarding helpful, inside data" continues...   (which cost the finder (Luis) blood/sweat/tears - and unknown the number of others who suffered - and were w/out Luis' cunning & diligence.)

    If an "Unlike" button was enabled I'd strike that - for the continued, "Vendor Withholding of known, critical data!"     Vendor answered immediately - proving this data was known - yet that knowledge was not fully/properly released (was it?) until client-users become becalmed/trapped!  

    Is, "Vendor pride" (chasing the false God of data manual perfection) to trump the "Aid & Comfort" provided ALL client-users by the regular, public release of known tech issues - inadequately identified/detailed in this vast tech space?

  • It was when I first joined so it's normal.
    But I didn't even tested at the time, I simply went to check the datasheet and didn't find the masked interrupt bit in the register.

    Question, I didn't quite understand the "This was at the same time preventing interrupt flow from the peripheral as well.", while this interrupt is occurring it does not allow other flags to be set?
  • cb1- said:
    Some here (perhaps many/most) may not recognize, "WS2812 Controller."    Might your post prove even more valuable to those here w/some detailing?



    Certainly, you must remember my RGB matrix idea, I used that as my first project to really get into the Tiva. It had it's use, mostly just for that.
    The idea was control as many WS2812 RGB LED drivers as possible, which were actually pretty tricky to control with MCUs due to their weird protocol.
    I ended up using the DMA with the TM4C1294 and having up to 32 independent outputs which allowed a high "frames rate".

    Here is a sample of the project with just 8 outputs:

    The problem with the TM4C123 was that this method required triggering and receiving a DMA interrupt done due to using the ping-pong mode, which required to quickly re-initialize the next DMA transfer structure.
    The TM4C123 does not have GPIO burst trigger, it's ok I needed only single anyway, nor did I see in the Masked interrupt register any DMA done flag. When I asked here about that, it was confirmed that indeed it was not present.
    But it seems that for TM4C123 devices the DMA done flags are actually in the DMA registers, and are per channel. Each channel will flag if they are done with their transfer. Then according to Amit (and not really clear but kinda in the datasheet) it "high jacks" the interrupt vector from the peripheral configured to it, having the possibility to have a DMA done interrupt to any peripheral which is associated has the DMA channel and is assigned with it.

    I hope I was clear.

  • The only thing I remembered, "with certainty" was the "RGB project" - never the WS2812 (fine detail).

    As tech biz owner - we (must) focus upon the "big picture" - and individual component does not (usually) rise to that level/certainty...