Flash Programming In Rom Mode - Texas Instruments UCD3138 Technical Reference Manual

Digital power supply controller
Hide thumbs Also See for UCD3138:
Table of Contents

Advertisement

Flash Memory Operations
Here is the memory map during normal operation:
0x00000 => 0x07FFF => Program Flash - 32 Kbytes
0x0A000 => 0x0AFFF => Boot ROM - 4 Kbytes
0x18800 => 0x18FFF => Data Flash - 2 Kbytes
0x19000 => 0x19FFF => Data RAM - 4 Kbytes
In ROM mode, the reset and interrupt vectors are in the ROM. In normal operation, the reset and interrupt
vectors are in the Program Flash.
The two flash memories, "Program" and "Data", are programmed separately. Each has its own
programming logic. When a Flash memory is being programmed, it cannot be read.
Flash memories can be programmed word by word, but must be erased a block at the time. The Data
Flash has 64 small blocks containing only 32 bytes each. This makes it ideal for storing small blocks of
data which need to be changed frequently.
The Program Flash has only 32 blocks, and each one contains 1KB.
For more information on memory maps for all family members, see

17.2.2 Flash Programming in ROM Mode

In ROM mode, the flash is programmed via PMBus commands. The ROM offers several PMBus
commands for memory examine and modify, and for controlling program execution. For a complete
description, see the UCD3138 Boot ROM Reference Manual.
Normally the PMBus commands are issued by the TI supplied GUI running on a PC
(FUSION_DIGITAL_POWER_DESIGNER), or by a third party Flash programmer, so the process is
invisible to the user.
First the Flash is erased using either one Mass Erase command or many Page Erase commands. Erasing
the Flash sets all the bits in the Flash to 1. Next the Flash is written to using Write Block commands. Then
the Flash contents can be verified using Read Block commands. Finally an Execute Program command is
used to start the Flash program.
17.2.3 Clearing the Flash
The UCD3138 can erase its own program flash, either in pages or as a single block. A block erase is best
used for flash security for production code. In this way, even if the backdoor is activated, the flash security
is still maintained.
It is also possible to write all zeroes to the checksum and clear it. That way, the next time the UCD3138 is
reset, it will power up into ROM mode and the memory can be examined. This is best for development, so
that the memory contents can be analyzed if necessary.
Any changes to program flash must be made while executing in other memories – ROM, RAM, or Data
Flash. It is possible to corrupt Data flash without affecting the Program Flash checksum, so it is unwise to
put the flash modification program into Data Flash.
It is best to put it into Program Flash and copy it into RAM. In this way, if the program image is corrupted,
the checksum will be incorrect, and the device will automatically enter ROM mode on reset. The reference
firmware in most UCD3138 EVM will use the copy into RAM method.
17.2.4 3138 Family Members with Multiple Flash Blocks
Several 3138 family members have multiple flash blocks. This doesn't change the basic programming
code, but it increases flexibility. It is not necessary to execute from RAM or Data Flash when erasing or
writing to program flash. It can also be done while executing from any other flash block than the one being
changed. It is not possible to write or erase two blocks at the same time however.
520
Flash Memory Programming, Integrity, and Security
Copyright © 2016, Texas Instruments Incorporated
Chapter
15, Memory.
SNIU028A – February 2016 – Revised April 2016
Submit Documentation Feedback
www.ti.com

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents