Introduction
1
Introduction
The TM4C123GH6PM ROM contains the TivaWare™ Peripheral Driver Library and the TivaWare
Boot Loader. The peripheral driver library can be utilized by applications to reduce their flash
footprint, allowing the flash to be used for other purposes (such as additional features in the appli-
cation). The boot loader is used as an initial program loader (when the flash is empty) as well as
an application-initiated firmware upgrade mechanism (by calling back to the boot loader).
There is a table at the beginning of the ROM that points to the entry points for the APIs that are
provided in the ROM. Accessing the API through these tables provides scalability; while the API
locations may change in future versions of the ROM, the API tables will not. The tables are split
into two levels; the main table contains one pointer per peripheral which points to a secondary table
that contains one pointer per API that is associated with that peripheral. The main table is located
at
0x0100.0010
, right after the Cortex-M4 vector table in the ROM.
The following table shows a small portion of the API tables in a graphical form that helps to illustrate
the arrangement of the tables:
ROM_APITABLE (at
0x0100.0010
)
[0] = ROM_VERSION
[1] = pointer to ROM_UARTTABLE
[2] = pointer to ROM_SSITABLE
[3] = pointer to ROM_I2CTABLE
[4] = pointer to ROM_GPIOTABLE
=
⇒
ROM_GPIOTABLE
[5] = pointer to ROM_ADCTABLE
[0] = pointer to ROM_GPIOPinWrite
[6] = pointer to ROM_COMPARATORTABLE
[1] = pointer to ROM_GPIODirModeSet
[7] = pointer to ROM_FLASHTABLE
[2] = pointer to ROM_GPIODirModeGet
...
...
From this, the address of the ROM_GPIOTABLE table is located in the memory location at
0x0100.0020
. The address of the
function is contained at offset
0x4
from that table. In the function documentation, this is represented as:
ROM_APITABLE
is an array of pointers located at
0x0100.0010
.
ROM_GPIOTABLE
is an array of pointers located at
ROM_APITABLE[4]
.
ROM_GPIODirModeSet
is a function pointer located at
ROM_GPIOTABLE[1]
.
The TivaWare Peripheral Driver Library contains a file called
driverlib/rom.h
that assists with
calling the peripheral driver library functions in the ROM. The naming conventions for the tables
and APIs that are used in this document match those used in that file.
The following is an example of calling the
function:
#define TARGET_IS_BLIZZARD_RB1
#include <stdbool.h>
#include <stdint.h>
#include "inc/hw_memmap.h"
#include "driverlib/gpio.h"
#include "driverlib/rom.h"
int
main(void)
{
// ...
April 8, 2013
5
Summary of Contents for Tiva TM4C123GH6PM
Page 26: ...Boot Loader 26 April 8 2013...
Page 68: ...Controller Area Network CAN 68 April 8 2013...
Page 122: ...Hibernation Module 122 April 8 2013...
Page 136: ...Inter Integrated Circuit I2C 136 April 8 2013...
Page 152: ...Memory Protection Unit MPU 152 April 8 2013...
Page 174: ...Pulse Width Modulator PWM Returns None 174 April 8 2013...
Page 196: ...Synchronous Serial Interface SSI 196 April 8 2013...
Page 222: ...System Control 222 April 8 2013...
Page 270: ...UART 270 April 8 2013...
Page 296: ...uDMA Controller 296 April 8 2013...
Page 351: ...April 8 2013 351...