Contents

A.1.1 Header File for Constants and Variables, SVAR20.H . . . . . . . . . . . . . . . . . . . . . A￿2 A.1.2 Clear Algorithm, SCLR20.ASM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A￿5 A.1.3 Erase Algorithm, SERA20.ASM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A￿10 A.1.4 Flash-Write Algorithm, SFLW20.ASM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A￿15 A.1.5 Programming Algorithm, SPGM20.ASM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A￿19 A.1.6 Subroutines Used By All Four Algorithms, SUTILS20.ASM . . . . . . . . . . . . . . . A￿25

A.2 C-Callable Interface to Flash Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A￿27 A.3 Sample Assembly Code to Erase and Reprogram the TMS320F206 . . . . . . . . . . . . . . A￿32 A.3.1 Assembly Code for TMS320F206 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A￿32 A.3.2 Linker Command File for TMS320F206 Sample Assembly Code . . . . . . . . . . A￿35

A.4 Sample C Code to Erase and Reprogram the TMS320F206 . . . . . . . . . . . . . . . . . . . . . A￿37 A.4.1 C Code That Calls the Interface to Flash Algorithms for TMS320F206 . . . . . A￿37 A.4.2 Linker Command File for TMS320F206 Sample C Code . . . . . . . . . . . . . . . . . A￿38

A.5 Sample Assembly Code to Erase and Reprogram the TMS320F240 . . . . . . . . . . . . . . A￿40 A.5.1 Assembly Code for TMS320F240 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A￿40 A.5.2 Linker Command File for TMS320F240 Sample Assembly Code . . . . . . . . . . A￿45

A.6 Using the Algorithms With C Code to Erase and Reprogram the 'F240 . . . . . . . . . . . . A￿47 A.6.1 C Code That Calls the Interface to Flash Algorithms for TMS320F240 . . . . . A￿47 A.6.2 Linker Command File for TMS320F240 Sample C Code . . . . . . . . . . . . . . . . . A￿48 A.6.3 C Function for Disabling TMS320F240 Watchdog Timer . . . . . . . . . . . . . . . . . A￿50 A.6.4 C Functions for Initializing the TMS320F240 . . . . . . . . . . . . . . . . . . . . . . . . . . . A￿51

x

Page 10
Image 10
Texas Instruments TMS320F20x/F24x DSP manual Contents