PRELIMINARY
Assembly Source for Algorithms
A.1.2 Clear Algorithm, SCLR20.ASM
This code is an implementation of the clear (programming) algorithm de- scribed in section 3.2 on page
Memory section: fl_clr
Entry point: GCLR
Parameters to be declared and initialized by the calling code are:
-PROTECT defines the values of bits 8±15 of SEG_CTR during the clear algorithm.
-SEG_ST defines the start address of the flash array to be cleared.
-SEG_END defines the end address of the flash array to be cleared.
Return value: ERROR (@BASE+15); 0 = Pass, 1 = Fail
**************************************************************
** | CLEAR Subroutine | ** |
* |
| ** |
* | TMS320F2XX Flash Utilities. | ** |
* | Revision: 2.0, 9/10/97 | ** |
* | Revision: 2.1, 1/31/98 | ** |
* |
| ** |
* | Filename: sclr20.asm | ** |
* |
| ** |
*Called by: c2xx_bcx.asm or flash application programs. **
* | ** |
*!!CAUTION ± INITIALIZE DP BEFORE CALLING THIS ROUTINE!! **
* |
|
| ** |
* | Function: Clears one or more contiguous segments of | ** | |
* | array 0/1 as specified by the following | ** | |
* | variables. | ** | |
* | SEG_ST | Segment start address | ** |
* | SEG_END | Segment end address | ** |
* | PROTECT | Sector protect enable | ** |
* |
|
| * |
* | The algorithm used is | ||
* an entire flash row | (32 words) is programmed in parallel.* | ||
* | This method provides better uniformity of programming | * | |
* | levels between adjacent bits than if each address were | * | |
* | programmed independently. The algorithm also uses a | * | |
* |
*read three times and the first two values are discarded.)*
* This provides low±frequency read±back margin on | * |
PRELIMINARY | Assembly Source Listings and Program Examples |