beautypg.com

10 auxiliary files, Auxiliary files – Maxim Integrated 71M6521BE Energy Meter IC Family Software User Manual

Page 71

background image

71M652X Software User’s Guide

Revision 1.7

TERIDIAN Proprietary

71 of 138

© Copyright 2005-2007 TERIDIAN Semiconductor Corporation

flag0test.c

a test for a FLAG system

modetest.c

a simple test of the 6520’s battery modes

ser0test.c

tests the serial driver for SER0

ser1test.c

tests the serial driver for SER1

stmtest.c

tests the software timers

tmr0test.c

tests the driver for TMR0

tmr1test.c

tests the driver for TMR1

7. Util: Utilities

dead.c

defines unused flash space for the boot loader

dio.h

defines high-level access to DIO pins

flash.c

flash memory read, write, erase, compare and checksum calculation

irq.c

securely disables and enables interrupts

library.c

routines for memory copy, compare, CRC calculation, string length

math.c contains

routines

for multiple-precision math

oscope.h

a utility to trigger oscilloscope loops using DIO7

priority.h

header file defining priorities for IP0 and IP1

sfrs.c

access to SFRs

startup.a51 startup assembly code
startup_boot.a51
startup_boot_secure.a51
startup_secure.a51
stm.c

software timer routines

timers.c

unused software timer legacy code

wd.c

routines that support the hardware watchdog

5.10 AUXILIARY FILES

A variety of startup files is provided with the Demo Kits. The function of these files is as follows:

1. STARTUP.A51:

This file provides memory and stack initialization. It is part of the Keil compiler package.

2.

STARTUP_SECURE.A51:

This file is almost identical to STARTUP.A51. The only difference is that this variation sets the SECURE bit.
This bit enables security provisions that prevent external reading of flash memory and CE program memory.
The code segment below sets the security bit located at SFR register address 0xB2:

STARTUP1:

CLR 0xA8^7

; Disable interrupts

MOV 0B2h,#40h ; Set security bit.
MOV 0E8h,#0FFh ; Refresh nonmaskable watchdog

3. INIT.A51:

A secondary startup file. It is part of the Keil compiler package. This code is executed, if the application
program contains initialized variables at file level.

4. STARTUP_BOOT.A51:

This startup file is to be used when the code is to be compiled as a bootloader.