EasyManuals Logo
Home>Texas Instruments>Microcontrollers>Tiva TM4C123GH6PM

Texas Instruments Tiva TM4C123GH6PM User Manual

Texas Instruments Tiva TM4C123GH6PM
352 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #73 background imageLoading...
Page #73 background image
Flash
8 Flash
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
8.1 Introduction
The flash API provides a set of functions for dealing with the on-chip flash. Functions are provided
to program and erase the flash, configure the flash protection, and handle the flash interrupt.
The flash is organized as a set of 1 kB blocks that can be individually erased. Erasing a block
causes the entire contents of the block to be reset to all ones. These blocks are paired into a
set of 2 kB blocks that can be individually protected. The blocks can be marked as read-only or
execute-only, providing differing levels of code protection. Read-only blocks cannot be erased or
programmed, protecting the contents of those blocks from being modified. Execute-only blocks can-
not be erased or programmed, and can only be read by the processor instruction fetch mechanism,
protecting the contents of those blocks from being read by either the processor or by debuggers.
The flash can be programmed on a word-by-word basis. Programming causes 1 bits to become 0
bits (where appropriate); because of this, a word can be repeatedly programmed so long as each
programming operation only requires changing 1 bits to 0 bits.
The timing for the flash is automatically handled by the flash controller. In order to do this, the
flash controller must know the clock rate of the system in order to be able to time the number of
micro-seconds certain signals are asserted. The number of clock cycles per micro-second must be
provided to the flash controller for it to accomplish this timing.
The flash controller has the ability to generate an interrupt when an invalid access is attempted
(such as reading from execute-only flash). This can be used to validate the operation of a program;
the interrupt will keep invalid accesses from being silently ignored, hiding potential bugs. The flash
protection can be applied without being permanently enabled; this, along with the interrupt, allows
the program to be debugged before the flash protection is permanently applied to the device (which
is a non-reversible operation). An interrupt can also be generated when an erase or programming
operation has completed.
8.2 Functions
Functions
int32_t ROM_FlashErase (uint32_t ui32Address)
void ROM_FlashIntClear (uint32_t ui32IntFlags)
void ROM_FlashIntDisable (uint32_t ui32IntFlags)
void ROM_FlashIntEnable (uint32_t ui32IntFlags)
uint32_t ROM_FlashIntStatus (bool bMasked)
int32_t ROM_FlashProgram (uint32_t pui32Data, uint32_t ui32Address, uint32_t ui32Count)
tFlashProtection ROM_FlashProtectGet (uint32_t ui32Address)
int32_t ROM_FlashProtectSave (void)
int32_t ROM_FlashProtectSet (uint32_t ui32Address, tFlashProtection eProtect)
April 8, 2013 73

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments Tiva TM4C123GH6PM and is the answer not in the manual?

Texas Instruments Tiva TM4C123GH6PM Specifications

General IconGeneral
BrandTexas Instruments
ModelTiva TM4C123GH6PM
CategoryMicrocontrollers
LanguageEnglish

Related product manuals