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.

TivaWare - UART and Driver Library Questions

I see in the TivaWare Peripheral Driver Library a 'UARTEnable()' function.  Like most functions in the library, the manual doesn't really tell what it actually does.  "This function enables the UART and its transmit and receive FIFOs."  I interpret that to mean that it sets the UARTEN bit in UARTCTL and the FEN bit in UARTCTLH.  What about TXE and RXE?  Are these still assumed to be set from reset?

Is there any provision for setting the EOT bit in UARTCTL in the Peripheral Driver Library?

Looking at the code for the uart_echo example project, I don't see any code that actually enables the UART, yet the code seems to work just fine.  This tells me the UART is being enabled somehow.  Can anyone tell me where in the code this is happening?

Where is the source code for these drivers?

  • Hello Clark,

    If you look at the function it enables the TXE and RXE as well besides the UARTEN

        //
        // Enable RX, TX, and the UART.
        //
        HWREG(ui32Base + UART_O_CTL) |= (UART_CTL_UARTEN | UART_CTL_TXE |
                                         UART_CTL_RXE);
    Regards

    Amit

  • How am I supposed to look at the function?  Where's the source code?  What about enabling the FIFOs like the description says?  Why does the function not appear in the uart_echo example project?

  • Hello Clark,

    The function prototype is in driverlib/uart.c of the TivaWare Installation

    Regards

    Amit

  • @ Clark - Feel not bad - our group (long ago) encountered your exact quandary.  Vendor has a wealth of material - and the clear/detailed explanation and, "Pilot's Pre-Flight Check List" have been noted - but (perhaps) sacrificed to the crushing demands of, "Forum name change..."  Vendor's Amit is extremely talented - and caring - and in no way responsible for the (lack) of, "OK - I've got a Stellaris/Tiva - now what?"

    Suspect you - like my small tech group - did NOT expect to find the FULL Source code revealed!  But it is - yet that  valuable fact received (at best) indirect - disjointed - scattered mention.  With passage of time - and postings here - these/other needed facts will become more apparent...  Wish you well.

    @ Amit - I've long (gently) protested your (to my mind) misuse - in the (too often) endless "back/forth" with clearly over-matched posters - seeking answers to issues they cannot begin to adequately anticipate nor describe. Any basic posting review will confirm this.

    Instead - the Pre-Flight checklist could be very well - "Amit crafted" - if you're "escaped" from the (endless) rescue of those (predictably) landing upon PF0/PD7 and/or launchpad's (inspired) dead short of 2 pairs of MCU GPIO. 

    These 2 forum areas are easily recognizable - indeed have been "duly noted" - yet persist as strongly as ever!  Is that good? 

    And now (to make many here even more krazy) arrives unwanted/unnecessary Forum Name Change.  And - we note - that "name change" forum alert landed originally upon the "wasteland forum" - not this one!  Does that not strongly signal - "Disruption Central" (in the making?)  (how well/smoothly did Stellaris' "successor lib." roll out?)

    Your valued, critical resource is necessarily limited - and should (rather clearly) be husbanded (restricted) - and directed to the "Greater Good."