Jump to content

Recommended Posts

Hi there,


I have a Stellaris launchpad LM4F120, and i'm trying to get an assembly language UART example to work.

I used Valvano's example project for keil found here: http://users.ece.utexas.edu/~valvano/arm/

file name: UART2_4F120asm.zip


This example uses UART0, and it works fine.

I can also adapt this code to use UART1 and UART2 with no problems, by simply appropriately changing macro values as can be seen in this register definition file: http://users.ece.utexas.edu/~valvano/arm/lm4f120.s



However, I wish to use UART7, and the trouble lies in that there is no definition for the "UART7 Clock Gating Control" (SYSCTL_RCGC1_UART7)

I tried searching the internet for a solution, with no results.


Anyone know how I can get it to work?


Thank you.

Link to post
Share on other sites


Starting with LM4F/Tiva, TI changed the registers to provide clock gating control to all peripherals, particularly to UART. This new register is named "Run Mode Clock Gating Control" RCGCUART and is placed at 0x400FE000+0x618. Inside this registers are eight bits, R7..R0, each controlling one UART, R7 being for UART7, 1=enabled, 0=disabled. (LM4F120 manual, page 379).

You can easily make a macro for all UARTs to be used (Valvano's is a bit outdated, but for learning is OK; TI kept for legacy projects also those three old registers).


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...