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.

How to generate an Interrupt if the TX buffer have available space in FIFO in TM4c123GXl?

I am using Keil uVision5 for programming TI launchpad TM4C123GXL with TIVA WARE Library. 

I understand the RX interrupt but I don't find any example or sample code to generate an Interrupt if the TX buffer has available space in FIFO.

  • Hello Masood,

    Please refer to this E2E post and the discussion which followed for further information: e2e.ti.com/.../2086974

    Let me know if you have any follow-up questions on the topic.
  • I don't think the TM4C will provide the interrupt you want. It is a weakness in the UART design.

    The transmit interrupt only occurs when the UART FIFO drops below the threshold level, which means the FIFO must first rise above the threshold level. There is no interrupt on FIFO empty. So if you fail to fill the FIFO beyond the threshold there will be no transmit interrupt. And there is no method to determine if you have filled beyond the threshold.

    It's not impossible to deal with this but it is more complicated than it needs to be. The UART could have used two more transmit interrupts (one for FIFO empty and one for transmit shift register empty) and could have folded the receive character timeout interrupt into the receive interrupt with no loss of functionality but less chance of development error.

    Robert

    BTW what does this have to do with CAN?
  • "LIKE" ... Superbly crafted reply Robert - painstakingly detailed - nails the UART design weakness.      And you've "long sounded this caution" - yet vendor response has been "nominal."

    May I note too that another's, "Vectoring all to another post" (which trades "responder ease" for "all readers' added effort") - proves sub-optimal as it "breaks user focus" - delays - and may expose (again) "all vectored-away readers" to an,  "Unguided, multi-post, rambling, post barrage!"

    Clearly there is great value in, "Everything (or almost everything) in ONE place!" (one thread!)

    At minimum - a brief summary of the "distant post" - coupled w/the "time-stamp" of the "best answering posting therein" - makes such effort more useful & efficient.      (perhaps even (then) compelling - does it not?)       Vectoring away - minus such "guideposts" - has "long occurred" - yet subjects "the many" to added time/effort - while "reducing such for just one!"      (Not a good or client caring trade...)