The Datasheet Archive - 100 Million Datasheets from 7500 Manufacturers.    


Datasheet Search Engine   
 
Part # or Description: • 5V RS232 Driver • 2SC5066* • "Real Time Clock" • "USB connector" • "blue led" 5mm • 10 watt zener diode • 2N3055* motorola
 
Search Tip: Try entering the part number only. Include a wildcard (eg. lm317* or 1n4148*)

 

 

AN2183 Using FLASH EEPROM MC68HC908GP32 Freescale Semiconduc


Datasheet Thumbnail

  

Download PDF



Top Searches for this datasheet



Order this document AN2183/D
AN2183
Using FLASH EEPROM MC68HC908GP32
Freescale Semiconductor, Inc.
Derrick H.J. Klotz Field Applications Engineer Toronto, Canada
Introduction
This application note describes method using on-chip FLASH memory MC68HC908GP32 would typically EEPROM (electrically erasable programmable read-only memory). purposes this application note, FLASH memory that manipulated this method referred "FlashEE." expected that reader somewhat familiar with MC68HC908GP32/08GP32 Technical Data book, Motorola document order number MC68HC908GP32/H, well typical EEPROM device usage. many projects, EEPROMs used nonvolatile storage calibration data, control information, data logging, etc. FLASH memory technology employed M68HC908 Family microcontrollers (MCU) capable being reprogrammed easily while application software executing. Project cost savings realized simply using appropriate section on-chip FLASH memory would off-chip EEPROM device.
Motorola, Inc., 2001
More Information This Product, www.freescale.com
Application Note
order verify correct operation FlashEE routines, test program included this application note. This program demonstrates these routines would integrated into project. test program communicates with host computer simple RS-232 connection order facilitate testing. User programs that include FlashEE routines free implement them would commonly expect EEPROM algorithms various forms data storage.
Freescale Semiconductor, Inc.
FlashEE Implementation
Specifications M68HC908 Family FLASH memory indicate program/erase cycle endurance 10,000 cycles across full operating temperature range. This typically more than sufficient most applications. However, this value mathematically elongated number times small data block within FLASH erase page. important note that while FLASH memory "page" erasable, fact, byte programmable. It's organization configured efficient "row" programming, algorithm must write each location byte-by-byte basis. There limit minimum number bytes that must programmed within row. every time programmed, high voltage charge pump must enabled disabled, regardless number bytes that programmed. critical FLASH memory specification cumulative program high voltage period. This maximum total time that specific FLASH program subjected being programmed between erasures. technical data MC68HC908GP32 lists this maximum specification being subroutines herein optimized program relatively small blocks data sequentially within FLASH memory, thereby minimizing total cumulative length time spent programming. These subroutines will only erase FlashEE space when there more room next data block. Each FLASH erase page consists program rows. FLASH erase page size MC68HC908GP32 bytes.
AN2183 MOTOROLA
More Information This Product, www.freescale.com
Application Note FlashEE Implementation
example application uses FlashEE data block size four bytes, then program cycles four bytes each will performed prior executing single erase cycle, which point this would considered complete program/erase cycle. Hence, this example, FlashEE endurance would calculated being 320,000 program/erase cycles other words, 10,000 32). high voltage program time used subroutines herein program four bytes less than Each program would subjected program cycle times (remember, program rows erase page). This provides cumulative time less than (150 16), which less than maximum specification given. FLASH block protect register (FLBPR) points first FLASH memory location protected. When programmed, every location from that address $FFFF will protected from accidental erasure. this reason, easiest assign FlashEE sections very beginning FLASH memory, assuming that FLBPR used protect application code. simplify FlashEE implementation, some essential guidelines have been used, specifically: FlashEE data written blocks multiple bytes. Each FlashEE data block fits within single FLASH program row. first FlashEE data block byte written cannot equal $FF.
Freescale Semiconductor, Inc.
Programming only byte possible, result application code inefficiencies since entire 128-byte FLASH erase page would need reserved each single byte FlashEE. data storage space requirement exceeds size single FLASH program (i.e., more than bytes MC68HC908GP32), then data will need split over multiple FlashEE sections, each occupying FLASH erase page (i.e., bytes MC68HC908GP32). multiple FlashEE sections used, they must manipulated separately. This demonstrated with test program provided.
AN2183 MOTOROLA
More Information This Product, www.freescale.com
Application Note
part search algorithm, software interrogates first byte location each FlashEE data block erased (i.e., $FF). this reason, when writing block data, first byte must $FF. subsequent data block locations have restrictions their stored value. Figure shows MC68HC908GP32 memory space occupied separate FlashEE sections (128 bytes each). Note that erased state FLASH memory that first locations ($8000 $8009) erased. This represents current state FlashEE1 example host test session shown Figure described later this text. defined example provided, FlashEE1 starts address $8000 with data block size five bytes. FlashEE2 starts address $8080 data block size seven bytes. Although reasonably obvious, delineations shown Figure that demonstrate that neither five seven evenly into FLASH program that bytes size. routines provided will store appropriate data sequentially respective FlashEE sections only last complete available data block space. defined, FlashEE1 will never store value last four locations FLASH program (i.e., locations $803C $803F $807C $807F will always erased.) Similarly, last byte each FLASH program FlashEE2 will also remain erased (i.e., locations $80BF $80FF). FlashEE section with data block size bytes inclusive will only data into each FLASH program once, leaving remaining locations erased. program files provided are: flashee.equ FlashEE subroutine operational parameter definitions flashee.asm FlashEE subroutines eetest.asm FlashEE test program gp32.equ MC68HC908GP32 microcontroller definitions
Freescale Semiconductor, Inc.
AN2183 MOTOROLA
More Information This Product, www.freescale.com
Application Note FlashEE Implementation
FlashEE1
0000 0040 REGISTERS BYTES BYTES 0123F 8000 8001 8002 8003 8004 8005 8006 8007 8008 8009 800A 800B 800C 800D 800E 800F 8010 8011 8012 8013 8014 8015 8016 8017 8018 8019 801A 801B 801C 801D 801E 801F 8020 8021 8022 8023 8024 8025 8026 8027 8028 8029 802A 802B 802C 802D 802E 802F 8030 8031 8032 8033 8034 8035 8036 8037 8038 8039 803A 803B 803C 803D 803E 803F 8040 8041 8042 8043 8044 8045 8046 8047 8048 8049 804A 804B 804C 804D 804E 804F 8050 8051 8052 8053 8054 8055 8056 8057 8058 8059 805A 805B 805C 805D 805E 805F 8060 8061 8062 8063 8064 8065 8066 8067 8068 8069 806A 806B 806C 806D 806E 806F 8070 8071 8072 8073 8074 8075 8076 8077 8078 8079 807A 807B 807C 807D 807E 807F 8080 8081 8082 8083 8084 8085 8086 8087 8088 8089 808A 808B 808C 808D 808E 808F 8090 8091 8092 8093 8094 8095 8096 8097 8098 8099 809A 809B 809C 809D 809E 809F 80A0 80A1 80A2 80A3 80A4 80A5 80A6 80A7 80A8 80A9 80AA 80AB 80AC 80AD 80AE 80AF 80B0 80B1 80B2 80B3 80B4 80B5 80B6 80B7 80B8 80B9 80BA 80BB 80BC 80BD 80BE 80BF
FlashEE2
80C0 80C1 80C2 80C3 80C4 80C5 80C6 80C7 80C8 80C9 80CA 80CB 80CC 80CD 80CE 80CF 80D0 80D1 80D2 80D3 80D4 80D5 80D6 80D7 80D8 80D9 80DA 80DB 80DC 80DD 80DE 80DF 80E0 80E1 80E2 80E3 80E4 80E5 80E6 80E7 80E8 80E9 80EA 80EB 80EC 80ED 80EE 80EF 80F0 80F1 80F2 80F3 80F4 80F5 80F6 80F7 80F8 80F9 80FA 80FB 80FC 80FD 80FE 80FF
Freescale Semiconductor, Inc.
UNIMPLEMENTED
8000 8080 8100
FlashEE1 FlashEE2
FLASH MEMORY 32,256 BYTES
FE00 FFDC FFFF
CONTROL REGISTERS MONITOR VECTORS
Figure MC68HC908GP32 Memory FlashEE Implementation
AN2183 MOTOROLA
More Information This Product, www.freescale.com
Application Note flashee.equ Subroutines
FlashEE subroutines tailored needs operation conditions specific application modifying parameters provided this file, which must included near application program file. help avoid assembly language label naming conflicts, labels used this file start with either "EE" "Ram". parameters defined grouped into three specific categories:
Freescale Semiconductor, Inc.
Microcontroller FLASH memory parameters FlashEE data parameters Microcontroller frequency parameters
Microcontroller FLASH Memory Parameters
specific sizes FLASH memory program erase page defined here bytes bytes, respectively, MC68HC908GP32). Also, erased state FLASH byte also declared $FF. These parameters initially defined
EE_FlashPage: EE_FlashRow: EE_FlashErased:
FlashEE Data Parameters
starting address each FlashEE section declared here. These parameters directly used FlashEE subroutines. They passed forward application program when these subroutines called. demonstration purposes, separate FlashEE sections shown, although many more possible. size each FlashEE data block also defined. Note that each FlashEE section have unique data block size.
AN2183 MOTOROLA
More Information This Product, www.freescale.com
Application Note flashee.asm Subroutines
parameters FlashEE1 initially defined
EE_StartAddr1: EE_BlockSize1: $8000
parameters FlashEE2 initially defined
EE_StartAddr2: EE_BlockSize2: {EE_StartAddr2+EE_FlashPage}
Freescale Semiconductor, Inc.
Note that assembler will assign label "EE_StartAddr2" with value $8080.
Microcontroller Frequency Parameters
FlashEE subroutines employ delay loops that must tuned microcontroller frequency. values these parameters frequency 7.3728 provided software listing. different frequency desired, then these parameters must changed accordance with formula provided, specifically: Value ((delay (bus frequency MHz) example, delay with frequency 7.3728 would result following: RamDelay30 ((30) (7.3728) 73.06 7.3728-MHz frequency, required parameters initially defined
RamDelay5: RamDelay10: RamDelay30: RamDelay50:
flashee.asm Subroutines
This file contains FlashEE subroutine source code must included application program file. These subroutines only local variables stack and, hence, require other predefined global variable space resources. maximum available stack space
AN2183 MOTOROLA
More Information This Product, www.freescale.com
Application Note
requirement bytes. help avoid assembly language label naming conflicts, labels used start with either "EE" "Ram". flow diagrams these routines (with exception Dump utility, simplicity) provided Figure through Figure available FlashEE routines are: EERead Read current valid FlashEE data block EEErase Erase entire FlashEE section EEWrite Write FlashEE data block
Freescale Semiconductor, Inc.
EERead
This subroutine called with 16-bit index register pointing starting address desired FlashEE section accumulator preloaded with that FlashEE section's data block size. FlashEE section sequentially scanned, block block, until erased FLASH byte (i.e., $FF) found occupying first location data block section reached. This subroutine returns with 16-bit index register pointing first location most recent FlashEE data block data that location stored accumulator. calling routine should check accumulator value data been stored FlashEE. Refer Check_Read subroutine eetest.asm. This check should only needed when EERead performed before very first EEWrite.
EEErase
This subroutine used erase contents FlashEE section. called with 16-bit index register pointing starting address desired FlashEE section. value returned unchanged. Regardless frequency, this subroutine will execute just over millisecond. (Specifically, frequency 7.3728 MHz, this subroutine executes about 1096 µs.) Note that this subroutine will copy execute program RAM. This required fact that erasing FLASH locations cannot performed code being executed from FLASH memory. While executing code from RAM, interrupts disabled.
AN2183 MOTOROLA
More Information This Product, www.freescale.com
Application Note eetest.asm Subroutines
EEWrite
This subroutine requires address pointers when called. 16-bit starting address desired FlashEE section must saved stack just prior calling this subroutine. addition, 16-bit index register must point first byte source data block, which typically buffer located RAM. well, accumulator preloaded with FlashEE data block size. This subroutine will then copy required number bytes sequentially from source location into FlashEE. point reference toward understanding speed this subroutine, consider using data block bytes frequency 7.3728 MHz. best case programming time would about worst case would involve writing data block into FlashEE with available room. This requires that FlashEE first erased prior programming data. this given scenario, this subroutine executes about 1772 which just over 1000 FlashEE erasure procedure. Note that this subroutine will copy execute program RAM. This required fact that programming FLASH locations cannot performed code being executed from FLASH memory. While executing code from RAM, interrupts disabled.
Freescale Semiconductor, Inc.
eetest.asm Subroutines
This file provides executable demo program used test verify FlashEE subroutines files. Note that files flashee.equ, flashee.asm, gp32.equ incorporated this test program "include" assembler directive. simple user interface provided on-chip serial communications interface (SCI) industry standard RS232 communications with host computer executing simple terminal program. serial rate configured 115.2 kbaud. software implements four single ASCII character commands (case insensitive) provides ability test interrogate separate
AN2183 MOTOROLA
More Information This Product, www.freescale.com
Application Note
FlashEE sections. Each command followed either indicate desired FlashEE section. commands are: Read FlashEE Erase FlashEE Write FlashEE Dump FlashEE
Freescale Semiconductor, Inc.
example host terminal display during simple test session using FlashEE1 with block size five bytes shown Figure program implements default prompt user FlashEE>. first user command "dump contents FlashEE1." bytes printed format that relatively easy read. Note that this point, entire FlashEE section erased (i.e., locations contain $FF). second command issued "read most recent FlashEE1 data block." Since FlashEE1 erased, message sent indicating that data currently stored FlashEE1. Next, user requested that block data written into FlashEE1 with program responds with equal sign then accepts correct number hexadecimal values (five total FlashEE1). user verifies that data been programmed correctly first using command, secondly with which clearly indicates where data been stored. user enters another block data with next command. following entry shows that data been correctly stored next data block location. next command confirms that read subroutine correctly identifies which most recent data. Continuing with this method, demo program provided used test verify correct operation FlashEE subroutines.
AN2183 MOTOROLA
More Information This Product, www.freescale.com
Application Note eetest.asm Subroutines
Freescale Semiconductor, Inc.
FlashEE>d1 FlashEE>r1 FlashEE erased FlashEE>w1=12 FlashEE>r1 FlashEE>d1 FlashEE>w1= FlashEE>d1 FlashEE>r1 FlashEE>_
Figure Simple Host Terminal Test Session Display
Read FlashEE
After entering single character followed either "2", program will respond outputting most recent data byte block. example shown, first time entered FlashEE erased indicated software's response. Subsequent examples show current data block data being reported back host.
Erase FlashEE
This command will directly execute EEErase subroutine erase selected FlashEE section.
AN2183 MOTOROLA
More Information This Product, www.freescale.com
Application Note
Write FlashEE After entering single character followed either "2", program will respond prompting user enter data block string data. Each entry must valid hexadecimal value echoed back typed. Entering non-hexadecimal value results process being stopped with default prompt being output. After entering required number bytes, FlashEE programmed with data provided.
Dump FlashEE
Freescale Semiconductor, Inc.
This command will output current contents selected FlashEE section.
Summary
Most projects using M68HC908 Family microcontrollers requiring nonvolatile data storage that application software programmable need incur added cost external EEPROM devices. method using on-chip FLASH memory such application purposes been demonstrated with this application note.
AN2183 MOTOROLA
More Information This Product, www.freescale.com
Application Note Summary
POWER-ON RESET
INITIALIZE CGM, RAM,
Freescale Semiconductor, Inc.
OUTPUT PROMPT WAIT USER INPUT
READ FlashEE ('R') COMMAND?
PERFORM READ FlashEE PROCESS
ERASE FlashEE ('E') COMMAND?
PERFORM ERASE FlashEE PROCESS
WRITE FlashEE ('W') COMMAND?
PERFORM WRITE FlashEE PROCESS
DUMP FlashEE ('D') COMMAND?
PERFORM DUMP FlashEE PROCESS
OUTPUT UNKNOWN COMMAND RESPONSE
Figure eetest.asm Software Flow Diagram
AN2183 MOTOROLA
More Information This Product, www.freescale.com
Application Note
PERFORM READ FlashEE PROCESS
PERFORM FIND FIRST ERASED FLASH LOCATION PROCESS
FIRST LOCATION FIRST ERASED?
Freescale Semiconductor, Inc.
THERE ROOM ANOTHER DATA BLOCK? SAVE CURRENT LOCATION POINTER TEMPORARILY
ADVANCE LOCATION POINTER START SECOND PROGRAM
FIRST LOCATION SECOND ERASED? PERFORM FIND FIRST ERASED FLASH LOCATION PROCESS
RESTORE PREVIOUS LOCATION POINTER
ADJUST LOCATION POINTER BACK DATA BLOCK SIZE
RETURN WITH FIRST DATA BYTE FROM BLOCK
EXIT PROCESS
Figure Read FlashEE Software Flow Diagram
AN2183 MOTOROLA
More Information This Product, www.freescale.com
Application Note Summary
PERFORM ERASE FlashEE PROCESS
COPY ERASE FLASH ROUTINE ONTO STACK
SAVE CONDITION CODE REGISTER DISABLE INTERRUPTS
Freescale Semiconductor, Inc.
EXECUTE ERASE FLASH ROUTINE
RESTORE CONDITION CODE REGISTER
RETURN WITH FlashEE PAGE LOCATION POINTER
EXIT PROCESS
EXECUTE ERASE FLASH ROUTINE
ERASE FLCR, READ FLBPR WRITE POINTED PAGE
WAIT HVEN FLCR WAIT
CLEAR ERASE FLCR WAIT
CLEAR HVEN FLCR WAIT
EXIT PROCESS
Figure Erase FlashEE Software Flow Diagrams
AN2183 MOTOROLA
More Information This Product, www.freescale.com
Application Note
PERFORM WRITE FlashEE PROCESS
PERFORM FIND FIRST ERASED FLASH LOCATION PROCESS
THERE ROOM ANOTHER DATA BLOCK? ADVANCE LOCATION POINTER START SECOND PROGRAM
COPY PROGRAM FLASH ROUTINE ONTO STACK
Freescale Semiconductor, Inc.
PREPARE SOURCE DESTINATION POINTERS PERFORM FIND FIRST ERASED FLASH LOCATION PROCESS PREPARE BLOCK SIZE COUNTER
THERE ROOM ANOTHER DATA BLOCK? PERFORM ERASED FlashEE PROCESS
SAVE CONDITION CODE REGISTER DISABLEINTERRUPTS
EXECUTE PROGRAM FLASH ROUTINE
RESTORE CONDITION CODE REGISTER
EXIT PROCESS
Figure Write FlashEE Software Flow Diagram
AN2183 MOTOROLA
More Information This Product, www.freescale.com
Application Note Summary
EXECUTE PROGRAM FLASH ROUTINE
FLCR, READ FLBPR WRITE POINTED PAGE
WAIT HVEN FLCR WAIT
Freescale Semiconductor, Inc.
COPY DATA BYTE FROM SOURCE DESTINATION WAIT 30-40
ADVANCE SOURCE DESTINATION POINTERS
DECREMENT BLOCK SIZE COUNTER
BLOCK SIZE COUNTER ZERO? CLEAR FLCR WAIT
CLEAR HVEN FLCR WAIT
EXIT PROCESS
Figure Write FlashEE Routine Software Flow Diagram
AN2183 MOTOROLA
More Information This Product, www.freescale.com
Application Note
PERFORM FIND FIRST ERASED FLASH LOCATION PROCESS
INITIALIZE BLOCK COUNTER
CURRENT LOCATION ERASED?
Freescale Semiconductor, Inc.
SUBTRACT BLOCK SIZE FROM BLOCK COUNTER
BLOCK COUNTER NEGATIVE?
RETURN WITH BLOCK COUNTER
EXIT PROCESS
ADVANCE LOCATION POINTER
Figure Find First Erased FlashEE Data Block Software Flow Diagram
AN2183 MOTOROLA
More Information This Product, www.freescale.com
Application Note flashee.equ
flashee.equ
Flash EEPROM MC68HC908GP32 Copyright Motorola, 2001 This file provides application specific parameters FlashEE routines. This program been specially tailored towards MC68HC908GP32. File name: flashee.equ Current Release Level: Last Edit Date: 15-Jun-01 Classification: Include Files: gp32.equ MC68HC908GP32 definitions Assembler: P&E's CASM08Z Version: 3.16 Target: MC68HC908GP32 Documentation: MC68HC908GP32/H Motorola Microcontroller Technical Data Author: Klotz First Release: 15-Jun-01 Update History: Date Author Description Change 15-Jun-01 DHJK Initial release. Notes: This file intended included within another source program along with program file "flashee.asm". labels used this file start with either "EE" "Ram". "FlashEE Data Parameters" "Microcontroller Frequency Parameters" declared start this listing must tailored specific needs target application prior using programs herein. Motorola reserves right make changes without further notice product herein improve reliability, function, design. Motorola does assume liability arising application product, circuit, software described herein; neither does convey license under patent rights rights others. Motorola products designed, intended, authorized
Freescale Semiconductor, Inc.
AN2183 MOTOROLA
More Information This Product, www.freescale.com
Application Note
components systems intended surgical implant into body, other applications intended support life, other application which failure Motorola product could create situation where personal injury death occur. Should Buyer purchase Motorola products such intended unauthorized application, Buyer shall indemnify hold Motorola officers, employees, subsidiaries, affiliates, distributors harmless against claims, costs, damages, expenses, reasonable attorney fees arising directly indirectly, claim personal injury death associated with such unintended unauthorized use, even such claim alleges that Motorola negligent regarding design manufacture part. Motorola Motorola logo registered trademarks Motorola Ltd.
Freescale Semiconductor, Inc.
Mircontroller FLASH Memory Parameters These parameters reflect specific FLASH memory characteristics MC68HC908GP32. FlashEE software easily ported other MC68HC908 family members changing parameters listed here. EE_FlashPage: Flash Erase Page size EE_FlashRow: Flash Program size EE_FlashErased: Flash erased state
FlashEE Data Parameters default, very first Flasherase page assigned FlashEE usage, that rest Flash memory protected Flash Block Protect Register (FLBPR). EE_StartAddr1: $8000 starting address FlashEE EE_StartAddr2: {EE_StartAddr1+EE_FlashPage} starting address FlashEE data block size each FlashEE section defined here. Each must less than equal "EE_FlashRow" EE_BlockSize1: data block size FlashEE EE_BlockSize2: data block size FlashEE Microcontroller Frequency Parameters Software delay loops initially calculated 7.3728 frequency. other frequencies, following parameters must modified accordingly. Microsecond delay parameter calculation clock) example, 7.3728 MHz, then 10us ((10us 7372800 23.9 check, clock example, 7.3728 MHz, then ((24 7372800 10us RamDelay5: delay parameter RamDelay10: 10us delay parameter RamDelay30: 30us delay parameter RamDelay50: 50us delay parameter
AN2183 MOTOROLA
More Information This Product, www.freescale.com
Application Note flashee.asm
flashee.asm
Flash EEPROM MC68HC908GP32 Copyright Motorola, 2001 This file provides level assembly routines using Flash EEPROM. This program been specially tailored towards MC68HC908GP32. File name: flashee.asm Current Release Level: Last Edit Date: 15-Jun-01 Classification: Include Files: gp32.equ MC68HC908GP32 definitions flashee.equ FlashEE parameters Assembler: P&E's CASM08Z Version: 3.16 Target: MC68HC908GP32 Documentation: MC68HC908GP32/H Motorola Microcontroller Technical Data Author: Klotz First Release: 15-Jun-01 Update History: Date Author Description Change 15-Jun-01 DHJK Initial release. Notes: This file intended included within another source program along with FlashEE parameter file "flashee.equ". labels used this file start with either "EE" "Ram". "FlashEE Data Parameters" "Microcontroller Frequency Parameters" declared include file "flashee.equ" must tailored specific needs target application prior using programs herein. Callable subroutines are: EERead returns with pointing first FlashEE data block entry EEWrite programs FlashEE with data block pointed EEErase erases entire FlashEE space pointed
Freescale Semiconductor, Inc.
AN2183 MOTOROLA
More Information This Product, www.freescale.com
Application Note
Motorola reserves right make changes without further notice product herein improve reliability, function, design. Motorola does assume liability arising application product, circuit, software described herein; neither does convey license under patent rights rights others. Motorola products designed, intended, authorized components systems intended surgical implant into body, other applications intended support life, other application which failure Motorola product could create situation where personal injury death occur. Should Buyer purchase Motorola products such intended unauthorized application, Buyer shall indemnify hold Motorola officers, employees, subsidiaries, affiliates, distributors harmless against claims, costs, damages, expenses, reasonable attorney fees arising directly indirectly, claim personal injury death associated with such unintended unauthorized use, even such claim alleges that Motorola negligent regarding design manufacture part. Motorola Motorola logo registered trademarks Motorola Ltd. Read FlashEE Block Subroutine This subroutine expects pointing first FlashEE page location returns with pointing most recent FlashEE data. FlashEE data block size passed forward ACC. Calling convention: ldhx #EE_StartAddr #EE_BlockSize EERead Returns: FlashEE block address first FlashEE data byte Changes: everything EERead: Find first erased location within FlashEE page. Check room within first FlashEE row. entire erased, then return with unchanged. next available erased FlashEE block within first program row, then return pointing block just before psha save FlashEE data block size pshx save FlashEE address stack EEFindFirst find next free location 1,sp check start blank location EERead3 exit 2,sp check there's room another data block EERead2 exit Check room within second FlashEE row.
Freescale Semiconductor, Inc.
AN2183 MOTOROLA
More Information This Product, www.freescale.com
Application Note flashee.asm
second erased, then return pointing last block first row. Otherwise, return pointing last used block second row. pulx psha pulx pshx save current address restore FlashEE address points second program save previous address stack check first location erased skip else, restore previous FlashEE address back stack clean exit exit
#EE_FlashRow #EE_FlashErased EERead1
EERead2 2,sp EEFindFirst
EERead1:
Freescale Semiconductor, Inc.
EERead2: pshh pula psha pulh EERead3:
FlashEE data block size find next free location perform 16-bit subtraction order adjust FlashEE pointer backwards data block size deallocate stack usage first FlashEE data byte return
2,sp
Executable FlashEE Page Erase Subroutine This subroutine will erase Flash memory page that being pointed H:X. This subroutine copied into executed from expects called "jsr ,x". RamEraseEE: Retrieve page address. psha save previous stack {RamEraseSize},x {RamEraseSize+1},x address psha pulh into HREG Step ERASE, read Flash Block Protect Register write data into Flash page. #{ERASE} ERASE control flcr Flash Control Register flbpr read from Flash Block Protect Register write data address within page
AN2183 MOTOROLA
More Information This Product, www.freescale.com
Application Note
Step Wait >10us, then HVEN. dbnza #RamDelay10 #{ERASE HVEN} flcr wait 10us HVEN control Flash Control Register
Step Wait >1ms, then clear ERASE.
Freescale Semiconductor, Inc.
outer loop RamEraseEE1: #RamDelay50 inner loop dbnza 50us dbnzx RamEraseEE1 loop back until done #{HVEN} clear ERASE control bits flcr Flash Control Register Step Wait >5us, then clear HVEN, then wait >1us return. #RamDelay5 wait dbnza clra clear HVEN control flcr Flash Control Register pula retreive previous wait least before returning RamEraseSize: {*-RamEraseEE}
FlashEE Page Erase Subroutine This subroutine will erase Flash memory page that being pointed H:X. bytes stack space used, including this subroutine's call return address. Calling convention: ldhx #EE_StartAddr EEErase Returns: unchanged Changes: EEErase: pshx save pointer pshh stack Copy FlashEE page erase routine into ldhx #RamEraseSize initialize pointer
AN2183 MOTOROLA
More Information This Product, www.freescale.com
Application Note flashee.asm
Freescale Semiconductor, Inc.
EEErase1: RamEraseEE-1,x psha dbnzx EEErase1 Execute program routine RAM. #RamEraseSize pulh pulx
program from Flash copy into Stack decrement pointer loop back until done
point executable routine disable interrupts erase Flash page deallocate stack space used restore address pointer restore previous return
Find First Erased FlashEE Location Subroutine This subroutine used find first erased FlashEE block, starting address being pointed H:X. FlashEE data block size passed forward ACC. Calling convention: ldhx #address #EE_BlockSize EEFindFirst Returns: first erased FlashEE block address number erased FlashEE bytes left CCRZ erased location successfully found, otherwise clear Changes: everything EEFindFirst: psha save FlashEE data block size #EE_FlashRow Flash Program size psha save stack counter EEFindFirst1: #EE_FlashErased erased Flash data check Flash location erased EEFindFirst2 exit pula else, counter 1,sp adjust subtracting block size EEFindFirst3 exit room psha else, save count perform 2,sp 16-bit addition order pshh advance pula FlashEE pointer forwards psha pulh next block EEFindFirst1 loop back
AN2183 MOTOROLA
More Information This Product, www.freescale.com
Application Note
EEFindFirst2: pula EEFindFirst3:
retrieve remaining erased bytes count deallocate stack usage return
FlashEE Block Program Subroutine This subroutine will write block data being pointed into FlashEE. bytes stack space used, including this subroutine call return address. FlashEE data block size passed forward ACC. Calling convention: ldhx #EE_StartAddr pshx pshh ldhx #BlockSourceAddress #EE_BlockSize WriteEE Returns: nothing Changes: everything EEWrite: psha save FlashEE data block size pshx save block pshh source pointer Check room within first FlashEE row. 7,sp first FlashEE address 6,sp first FlashEE psha address pulh 3,sp FlashEE data block size EEFindFirst find next free location 3,sp check there's room another data block EEWrite1 continue Check room within second FlashEE (which within same erase page). 7,sp first FlashEE address 6,sp first FlashEE psha address pulh #EE_FlashRow points second program 3,sp FlashEE data block size EEFindFirst find next free location 3,sp check there's room another data block EEWrite1 continue
Freescale Semiconductor, Inc.
AN2183 MOTOROLA
More Information This Product, www.freescale.com
Application Note flashee.asm
there's room, then erase entire FlashEE page.
Freescale Semiconductor, Inc.
7,sp first FlashEE address 6,sp first FlashEE psha address pulh EEErase erase entire FlashEE page EEWrite1: pshx save block pshh destination pointer Copy FlashEE byte program routine into ldhx #RamWriteSize initialize program size counter EEWrite2: RamWriteEE-1,x program from Flash psha copy onto stack dbnzx EEWrite2 decrement pointer loop back until done Prepare source destination pointers FlashEE block byte counter. point executable routine {RamWriteSize+2},x source address {RamWriteSRC},x save executable routine {RamWriteSize+3},x source address {RamWriteSRC+1},x save executable routine {RamWriteSize},x destination address {RamWriteDST1},x save {RamWriteDST2},x executable routine {RamWriteSize+1},x destination address {RamWriteDST1+1},x save {RamWriteDST2+1},x executable routine Execute program routine RAM. current I-bit status disable interrupts write data into Flash #{RamWriteSize+5} deallocate stack space used restore previous CCR, specifically I-bit return
Executable FlashEE Block Program Subroutine
This subroutine controls FlashEE block programming sequence. This subroutine copied into executed from RAM. self-modifying expects called "jsr ,x".
AN2183 MOTOROLA
More Information This Product, www.freescale.com
Application Note
RamWriteEE: psha save previous stack Step PGM, read Flash Block Protect Register write data first Flash address. #{PGM} control flcr Flash Control Register flbpr read from Flash Block Protect Register "RamWriteDST1" location offset relative "RamWriteEE". This location used 16-bit destination address pointer. RamWriteDST1: {*-RamWriteEE+1} $FFFF write data first Flash address Step Wait >10us, then HVEN, then wait >5us. #RamDelay10 wait dbnza 10us #{PGM HVEN} HVEN control flcr Flash Control Register #RamDelay5 wait dbnza Step Write data Flash wait 40us. Repeat until done. RamWriteEE1: "RamWriteSRC" location offset relative "RamWriteEE". This location used 16-bit source address pointer. RamWriteSRC: {*-RamWriteEE+1} $FFFF data "RamWriteDST2" location offset relative "RamWriteEE". This location used 16-bit destination address pointer. RamWriteDST2: {*-RamWriteEE+1} $FFFF write data Flash
Freescale Semiconductor, Inc.
Advance source destination pointers. This sequence requires between cycles. {RamWriteDST2+1},x RamWriteEE2 RamWriteDST2,x {RamWriteSRC+1},x RamWriteEE3 RamWriteSRC,x advance destination address skip overflow else, advance destination address advance source address skip overflow else, advance source address
RamWriteEE2:
AN2183 MOTOROLA
More Information This Product, www.freescale.com
Application Note flashee.asm
Freescale Semiconductor, Inc.
RamWriteEE3: #{RamDelay30-4} wait dbnza total 30us dbnz {RamWriteSize+8},sp,RamWriteEE1 decrement byte counter, loop back done Step Clear wait >5us. #{HVEN} clear control flcr Flash Control Register #RamDelay5 wait dbnza Step Clear HVEN, wait >1us return. clra clear HVEN control flcr Flash Control Register pula retreive previous wait least before returning RamWriteSize: {*-RamWriteEE}
AN2183 MOTOROLA
More Information This Product, www.freescale.com
Application Note eetest.asm
.header 'MC68HC908GP32 Flash EEPROM Test' .base .pagewidth .pagelength Flash EEPROM Test MC68HC908GP32 Copyright Motorola, 2001 Test program FlashEE. File name: eetest.asm Current Release Level: Last Edit Date: 15-Jun-01 Classification: Include Files: gp32.equ MC68HC908GP32 definitions flashee.equ FlashEE parameters flashee.asm FlashEE routines Assembler: P&E's CASM08Z Version: 3.16 Target: MC68HC908GP32 Documentation: MC68HC908GP32/H Motorola Microcontroller Technical Data Author: Klotz First Release: 15-Jun-01 Update History: Date Author Description Change 15-Jun-01 DHJK Initial release. Notes: Motorola reserves right make changes without further notice product herein improve reliability, function, design. Motorola does assume liability arising application product, circuit, software described herein; neither does convey license under patent rights rights others. Motorola products designed, intended, authorized components systems intended surgical implant into body, other applications intended support life, other application which failure Motorola product could create situation where personal injury
Freescale Semiconductor, Inc.
AN2183 MOTOROLA
More Information This Product, www.freescale.com
Application Note eetest.asm
death occur. Should Buyer purchase Motorola products such intended unauthorized application, Buyer shall indemnify hold Motorola officers, employees, subsidiaries, affiliates, distributors harmless against claims, costs, damages, expenses, reasonable attorney fees arising directly indirectly, claim personal injury death associated with such unintended unauthorized use, even such claim alleges that Motorola negligent regarding design manufacture part. Motorola Motorola logo registered trademarks Motorola Ltd. .set simulate enable simulation situational assembly
Freescale Semiconductor, Inc.
Microcontroller Peripheral Equates nolist include "gp32.equ" list
include microcontroller definitions file
init_config2: init_config1: init_stack:
%00000001 %00000001 ram_last
initial Configuration Register initial Configuration Register initialize stack pointer last location
;***** Serial Communications Interface (SCI) init_scc1: %01000000 initial Control Register init_scc2: %00001100 initial Control Register init_scc3: %00000000 initial Control Register init_scbr: %00000000 initial Baud Rate Register
include "flashee.equ"
include FlashEE paramters file
Global Variables
ram_start generic input data buffer
buffer:
Power-on Reset
$9000
Start: ldhx copctl #init_config2,config2 #init_config1,config1 #init_stack+1 clear counter initialize Configuration Register initialize Configuration Register initialize stack pointer
Initialize 7.3728 speed from 32.768 crystal. ldhx #bus7372800 PLLset point 7.372800 parameters change speed
AN2183 MOTOROLA
More Information This Product, www.freescale.com
Application Note
Clear RAM. point start clear location advance pointer done loop back
Freescale Semiconductor, Inc.
ldhx #ram_start ClearRAM: cphx #ram_last+1 ClearRAM Initialize Port Variables #init_scc1,scc1 #init_scc2,scc2 #init_scc3,scc3 #init_scbr,scbr
initialize initialize initialize initialize
Control Register Control Register Control Register Baud Rate Register
enable interrupts
Main Control Loop Interface commands: write following sting into FlashEE read back current FlashEE block data dump entire FlashEE erase entire FlashEE cmd_read: Read command cmd_erase: Erase command cmd_write: Write command cmd_dump: Dump command main: ldhx #msg_hello point hello message PrintString output GetChar character from #ascii_CR check ASCII carriage return main just loop back PutChar else, echo character back #$DF convert uppercase Check Read command execute. Check_Read: #cmd_read check Read command Check_Erase skip GetChar character from PutChar echo character back #'1' check target FlashEE Check_Read1 continue #'2' check target FlashEE Check_Read2 continue Check_What else, respond unknown command
AN2183 MOTOROLA
More Information This Product, www.freescale.com
Application Note eetest.asm
Check_Read1: ldhx #EE_StartAddr1 #EE_BlockSize1 Check_Read3 Check_Read2: ldhx #EE_StartAddr2 #EE_BlockSize2 Check_Read3: psha EERead #EE_FlashErased Check_Read4 pula ldhx #msg_erased PrintString main Check_Read4: PutChar PutHexByte dbnz 1,sp,Check_Read4 pula main Check Erase command execute. Check_Erase: #cmd_erase Check_Write GetChar PutChar #'1' Check_Erase1 #'2' Check_Erase2 Check_What Check_Erase1: ldhx #EE_StartAddr1 Check_Erase3 Check_Erase2: ldhx #EE_StartAddr2 Check_Erase3: EEErase ldhx #msg_erased PrintString main Check Write command execute.
point start FlashEE FlashEE data block size continue point start FlashEE FlashEE data block size
Freescale Semiconductor, Inc.
save FlashEE data block size stack move pointer FlashEE data check data erased skip else, deallocate stack usage point FlashEE erased message output loop back output space read FlashEE data output advance FlashEE pointer loop back until done deallocate stack usage loop back
check Erase command skip character from echo character back check target FlashEE continue check target FlashEE continue else, respond unknown command
point start FlashEE continue point start FlashEE
Erase FlashEE point FlashEE erased message output loop back
AN2183 MOTOROLA
More Information This Product, www.freescale.com
Application Note
Check_Write: #cmd_write Check_Dump GetChar PutChar #'1' Check_Write1 #'2' Check_Write2 Check_What Check_Write1: ldhx #EE_StartAddr1 #EE_BlockSize1 Check_Write3 Check_Write2: ldhx #EE_StartAddr2 #EE_BlockSize2 Check_Write3: pshx pshh psha psha #'=' PutChar ldhx #buffer Check_Write4: GetHexByte Check_What PutChar dbnz 1,sp,Check_Write4 pula pula ldhx #buffer EEWrite main Check Dump command execute. Check_Dump: #cmd_dump Check_What GetChar PutChar #'1' Check_Dump1 #'2' Check_Dump2 Check_What
check Write command skip character from echo character back check target FlashEE continue check target FlashEE continue else, respond unknown command
Freescale Semiconductor, Inc.
point start FlashEE FlashEE data block size continue point start FlashEE FlashEE data block size save FlashEE save FlashEE save FlashEE initialize address temporarily address temporarily data block size temporarily counter with value
output indicate ready data reset buffer pointer retrieve data byte output error hexadecimal save data buffer output space advance buffer pointer loop back until entire FlashEE block received deallocate stack usage retrieve FlashEE data block size point buffer (FlashEE address stack) write data into FlashEE deallocte stack usage loop back
check Dump command skip character from echo character back check target FlashEE continue check target FlashEE continue else, respond unknown command
AN2183 MOTOROLA
More Information This Product, www.freescale.com
Application Note eetest.asm
Check_Dump1: ldhx #EE_StartAddr1 Check_Dump3 Check_Dump2: ldhx #EE_StartAddr2 Check_Dump3: psha psha pshh pula psha Check_Dump4: ldhx #msg_CRLF PrintString pulh pulx pshx pshh psha Check_Dump5: PutChar PutHexByte dbnz 1,sp,Check_Dump5 pula dbnz 3,sp,Check_Dump4 main Handle unknown commands. Check_What: ldhx #msg_what PrintString main
point start FlashEE continue point start FlashEE
initialize line counter perform 16-bit subtraction order adjust FlashEE pointer backwards dump print pointer stack point <CR><LF> message output restore location pointer offset save result back stack initialize byte counter output space read FlashEE data move location pointer output loop back until bytes done deallocate stack usage loop back until lines done deallocate stack usage loop back
Freescale Semiconductor, Inc.
point unknown command message output loop back
Messages ascii_CR: ASCII carriage return ascii_LF: ASCII line feed msg_hello: ascii_CR,ascii_LF,'FlashEE>',0 msg_erased: FlashEE erased',0 msg_what: what?',0 msg_CRLF: ascii_CR,ascii_LF,0
AN2183 MOTOROLA
More Information This Product, www.freescale.com
Application Note
PrintString Subroutine This subroutine will output null teminated string pointed SCI. Calling convention: ldhx #string point start string PrintString output Returns: nothing Changes: PrintString1: brclr SCTE,scs1,PrintString1 wait until transmitter empty x+,scdr output character advance pointer PrintString: test string character PrintString1 loop back null else, return
Freescale Semiconductor, Inc.
PutChar Subroutine This subroutine will output character passed SCI. function prototype: void PutChar (char data); Calling convention: data character PutChar output Returns: nothing Changes: nothing PutChar: brclr SCTE,scs1,PutChar wait until transmitter empty scdr output character return
GetChar Subroutine
This subroutine will wait forever character received then returns with that character ACC. error checking performed. Note that this primary loop where counter cleared. function prototype: char GetChar (void); Calling convention: GetChar character from
AN2183 MOTOROLA
More Information This Product, www.freescale.com
Application Note eetest.asm
Returns: ACC= data GetChar: copctl brclr SCRF,scs1,GetChar scdr
clear counter wait forever until receiver full data return
Freescale Semiconductor, Inc.
PutHexByte Subroutine This subroutine converts data ASCII byte equivalent outputs them SCI. Calling convention: data PutHexByte Returns: nothing Changes: PutHexByte: psha save temporarily move upper nibble down FromHex convert ASCII PutChar output pula retrieve data FromHex convert lower nibble ASCII PutChar output return
GetHexByte Subroutine This subroutine retrieves ASCII bytes converts (packs) them into byte, which returned ACC. Calling convention: GetHexByte Returns: CCRZ= valid byte retrieved. Otherwise, CCRZ= ACC= data Changes: GetHexByte: GetChar character from PutChar echo back IsHex check valid ASCII character GetHexByte2 exit ToHex convert ASCII character value swap lower nibble psha save temporarily
AN2183 MOTOROLA
More Information This Product, www.freescale.com
Application Note
GetHexByte1: GetHexByte2: GetChar PutChar IsHex GetHexByte1 ToHex 1,sp character from echo back check valid ASCII character exit convert ASCII character value combine nibbles CCRZ=
deallocate local variable return
Freescale Semiconductor, Inc.
FromHex Subroutine This subroutine converts value passed lower nibble it's ASCII equivalent. Calling convention: FromHex Returns: ACC= data. Changes: FromHex: #$0F mask upper nibble #'0' ASCII offset #'9' check result between FromHex1 skip else, adjust value between FromHex1: return
ToHex Subroutine This subroutine converts ASCII value passed binary value. Calling convention: data ToHex Returns: ACC= data. Changes: ToHex: #'0' adjust first subtracting check value between ToHex1 exit else, adjust value between ToHex1: return
AN2183 MOTOROLA
More Information This Product, www.freescale.com
Application Note eetest.asm
Freescale Semiconductor, Inc.
IsHex Subroutine This subroutine checks value passed valid ASCII character within within ranges 'f'. Adjusts lowercase. Calling convention: data IsHex Returns: CCRZ= data valid character. Otherwise, CCRZ= Changes: lowercsae) IsHex: #'0' check value against IsntHex lower #'9' check value against IsHex1 lower #'A' check value against IsntHex lower #'F' check value against IsHex1 lower #$20 adjust uppercase #'A' check value against IsntHex lower #'F' check value against IsntHex isnt higher IsHex1: CCRZ= IsntHex: return Frequency Change Subroutine This subroutine will program change frequency accordance with data being pointed H:X. Calling convention: ldhx #busfreq_table PLLset Returns: data Changes: PLLset: bclr BCS,pctl select external reference base clock bclr PLLON,pctl turn x+,pctl program x+,pmrs program x+,pmsh program x+,pmsl program bset AUTO,pbwc enable automatic bandwidth control bset PLLON,pctl turn
AN2183 MOTOROLA
More Information This Product, www.freescale.com
Application Note
PLLwait: .ifnot simulate brclr LOCK,pbwc,PLLwait .endif bset BCS,pctl 8.003584 frequency parameters bus8003584: %00110000 7.3728 frequency parameters bus7372800: %00010010 include "flashee.asm" Dummy Interrupt Vector Handler Dummy:
wait lock select base clock return
Freescale Semiconductor, Inc.
delay_msb delay_lsb Baud Rate Register 9600 100us delay parameter
delay_msb delay_lsb Baud Rate Register 9600 100us delay parameter
include FlashEE routines
Vectors
vec_timebase Dummy vec_adc Dummy vec_kbd Dummy vec_scitx Dummy vec_scirx Dummy vec_scierr Dummy vec_spitx Dummy vec_spirx Dummy vec_tim2ov Dummy Timebase vector vector Keyboard vector transmit vector receive vector error vector transmit vector receive vector Timer overflow vector
AN2183 MOTOROLA
More Information This Product, www.freescale.com
Application Note eetest.asm
Freescale Semiconductor, Inc.
vec_tim2ch1 Dummy vec_tim2ch0 Dummy vec_tim1ov Dummy vec_tim1ch1 Dummy vec_tim1ch0 Dummy vec_pll Dummy vec_irq Dummy vec_swi Dummy vec_reset Start
Timer channel vector Timer channel vector Timer oveflow vector Timer channel vector Timer channel vector vector vector vector Reset vector
AN2183 MOTOROLA
More Information This Product, www.freescale.com
Application Note gp32.equ
MC68HC908GP32 Definitions Copyright Derrick Klotz, 2001 File name: gp32.equ Current Release Level: Last Edit Date: 22-Feb-00 Classification: Include Files: none Assembler: P&E's CASM08 Version: 3.06 Target Device: MC68HC908GP32 Documentation: MC68HC908GP32/H Microcontroller Technical Data Author: Klotz Location: First Release: 22-Feb-00 Update History: Date Author Description Change 22-Feb-00 DHJK Initial release. Motorola reserves right make changes without further notice product herein improve reliability, function, design. Motorola does assume liability arising application product, circuit, software described herein; neither does convey license under patent rights rights others. Motorola products designed, intended, authorized components systems intended surgical implant into body, other applications intended support life, other application which failure Motorola product could create situation where personal injury death occur. Should Buyer purchase Motorola products such intended unauthorized application, Buyer shall indemnify hold Motorola officers, employees, subsidiaries, affiliates, distributors harmless against claims, costs, damages, expenses, reasonable attorney fees arising directly indirectly, claim personal injury death associated with such unintended unauthorized use, even such claim alleges that Motorola negligent regarding design manufacture part. Motorola Motorola logo registered trademarks Motorola Ltd.
Freescale Semiconductor, Inc.
AN2183 MOTOROLA
More Information This Product, www.freescale.com
Application Note gp32.equ
Freescale Semiconductor, Inc.
Memory Interrupt Vectors ram_start: $0040 start ram_last: $023F last location rom_start: $8000 start rom_last: $FDFF last location vec_timebase: $FFDC Timebase vector vec_adc: $FFDE vector vec_kbd: $FFE0 Keyboard vector vec_scitx: $FFE2 transmit vector vec_scirx: $FFE4 receive vector vec_scierr: $FFE6 error vector vec_spitx: $FFE8 transmit vector vec_spirx: $FFEA receive vector vec_tim2ov: $FFEC Timer overflow vector vec_tim2ch1: $FFEE Timer channel vector vec_tim2ch0: $FFF0 Timer channel vector vec_tim1ov: $FFF2 Timer oveflow vector vec_tim1ch1: $FFF4 Timer channel vector vec_tim1ch0: $FFF6 Timer channel vector vec_pll: $FFF8 vector vec_irq: $FFFA vector vec_swi: $FFFC vector vec_reset: $FFFE Reset vector Input/Output (I/O) Ports porta: Port Data Register portb: Port Data Register portc: Port Data Register portd: Port Data Register ddra: Port Data Direction Register ddrb: Port Data Direction Register ddrc: Port Data Direction Register ddrd: Port Data Direction Register porte: Port Data Register ddre: Port Data Direction Register ptapue: Port Input Pullup Enable Register ptcpue: Port Input Pullup Enable Register ptdpue: Port Input Pullup Enable Register Serial Peripheral Interface Module (SPI) spcr: Control Register SPRIE: receiver interrupt enable SPMSTR: master CPOL: clock polarity CPHA: clock phase SPWOM: wired-or mode SPE: enable SPTIE: transmit interrupt enable
AN2183 MOTOROLA
More Information This Product, www.freescale.com
Application Note
spscr: SPRF: ERRIE: OVRF: MODF: SPTE: MODFEN: SPR1: SPR0: spdr: Status Control Register receiver full error interrupt enable overflow mode fault transmitter empty mode fault enable baud rate select bits
Data Register
Serial Communications Interface (SCI) scc1: Control Register LOOPS: loop mode select ENSCI: enable TXINV: transmit inversion mode WAKE: wakeup condition ILTY: idle line type PEN: parity enable PTY: parity scc2: Control Register SCTIE: transmit interrupt enable TCIE: transmission complete interrupt enable SCRIE: receive interrupt enable ILIE: idle line interrupt enable transmitter enable receiver enable RWU: receiver wakeup SBK: send break scc3: Control Register received transmitted DMARE: receive enable DMATE: transfer enable ORIE: receiver overrun interrupt enable NEIE: receiver noise error interrupt enable FEIE: receiver framing error interrupt enable PEIE: receiver parity error interrupt enable scs1: Status Register SCTE: transmitter empty transmission complete SCRF: receiver full IDLE: receiver idle receiver overrun receiver noise flag receiver framing error receiver parity error
Freescale Semiconductor, Inc.
AN2183 MOTOROLA
More Information This Product, www.freescale.com
Application Note gp32.equ
scs2: BKF: RPF: scdr: scbr:
Status Register break flag reception progress flag Data Register Baud Rate Register
Freescale Semiconductor, Inc.
Keyboard Interrupt Module (KBI) intkbscr: Keyboard Status Control Register KEYF: keyboard flag ACKK: keyboard acknowledge IMASKK: keyboard interrupt mask MODEK: keyboard triggering sensitivity intkbier: Keyboard Interrupt Enable Register KBIE7: KBIE6: KBIE5: KBIE4: KBIE3: KBIE2: KBIE1: KBIE0: Timebase Module (TBM) tbcr: Timebase Control Register TBIF: timebase interrupt flag TBR2: TBR1: timebase rate selection TBR0: TACK: timebase acknowledge TBIE: timebase interrupt enable TBON: timebase enabled External Interrupt (IRQ) intscr: Status Control Register IRQF: flag ACK: interrupt request acknowledge IMASK: interrupt mask MODE: edge/level select Configuration Registers (CONFIG) config2: Configuration Register config1: Configuration Register
AN2183 MOTOROLA
More Information This Product, www.freescale.com
Application Note
Timer Interface module (TIM) t1sc: Timer Status Control Register t2sc: Timer Status Control Register TOF: overflow flag TOIE: overflow interrupt enable TSTOP: stop TRST: reset PS2: PS1: prescaler select bits PS0: t1sc0: Timer Channel Status Control Register t1sc1: Timer Channel Status Control Register t2sc0: Timer Channel Status Control Register t2sc1: Timer Channel Status Control Register CHxF: channel flag CHxIE: channel interrupt enable MSxB: channel mode select MSxA: channel mode select ELSxB: channel edge/level select ELSxA: channel edge/level select TOVx: channel toggle overflow CHxMAX: channel maximum duty cycle t1cnt: Timer Counter Register t1mod: Timer Counter Modulo Register t1ch0: Timer Channel Register t1ch1: Timer Channel Register t2cnt: Timer Counter Register t2mod: Timer Counter Module Register t2ch0: Timer Channel Register t2ch1: Timer Channel Register Clock Generator Module (CGMC) pctl: Control Register PLLIE: interrupt enable PLLF: interrupt flag PLLON: BCS: base clock select PRE1: prescaler PRE0: program bits VPR1: power-of-two VPR0: range select bits pbwc: Bandwidth Control Register AUTO: automatic bandwidth control LOCK: lock indicator ACQ: acquisition mode pmsh: Multiplier Select High Register pmsl: Multiplier Select Register pmrs: Select Range Register pmds: Reference Divider Select Register
Freescale Semiconductor, Inc.
AN2183 MOTOROLA
More Information This Product, www.freescale.com
Application Note gp32.equ
Freescale Semiconductor, Inc.
Analog-to-Digital Converter (ADC) adscr: Status Control Register COCO: conversions complete flag AIEN: interrupt enable ADCO: continuous conversion ADCH4: ADCH3: ADCH2: channel select bits ADCH1: ADCH0: adr: Data Register adclk: Clock Register ADIV2: ADIV1: clock prescaler bits ADIV0: ADICLK: input clock select System Integration Module (SIM) sbsr: $FE00 Break Status Register SBSW: break stop/wait srsr: $FE01 Reset Status Register POR: power-on reset PIN: external reset COP: reset ILOP: illegal opcode reset ILAD: illegal opcode address reset MODRST: monitor mode entry module reset LVI: reset subar: $FE02 Upper Byte Address Register sbfcr: $FE03 Break Flag Control Register BCFE: break clear flag enable int1: $FE04 Interrupt Status Register int2: $FE05 Interrupt Status Register int3: $FE06 Interrupt Status Register Flash Memory flcr: $FE08 Flash Control Register HVEN: %00001000 high-voltage enable mask MASS: %00000100 mass erase control mask ERASE: %00000010 erase control mask PGM: %00000001 program control mask flbpr: $FF7E Flash Block Protect Register
AN2183 MOTOROLA
More Information This Product, www.freescale.com
Application Note
Breakpoint Module (BRK) brkh: $FE09 Break Address Register High brkl: $FE0A Break Address Register brkscr: $FE0B Break Status Control Register BRKE: break enable BRKA: break active Low-Voltage Inhibit (LVI) lvisr: $FE0C Status Register LVIOUT: output Computer Operating Properly (COP) copctl: $FFFF Control Register
Freescale Semiconductor, Inc.
Motorola reserves right make changes without further notice products herein. Motorola makes warranty, representation guarantee regarding suitability products particular purpose, does Motorola assume liability arising application product circuit, specifically disclaims liability, including without limitation consequential incidental damages. "Typical" parameters which provided Motorola data sheets and/or specifications vary different applications actual performance vary over time. operating parameters, including "Typicals" must validated each customer application customer's technical experts. Motorola does convey license under patent rights rights others. Motorola products designed, intended, authorized components systems intended surgical implant into body, other applications intended support sustain life, other application which failure Motorola product could create situation where personal injury death occur. Should Buyer purchase Motorola products such unintended unauthorized application, Buyer shall indemnify hold Motorola officers, employees, subsidiaries, affiliates, distributors harmless against claims, costs, damages, expenses, reasonable attorney fees arising directly indirectly, claim personal injury death associated with such unintended unauthorized use, even such claim alleges that Motorola negligent regarding design manufacture part. Motorola registered trademarks Motorola, Inc. Motorola, Inc. Equal Opportunity/Affirmative Action Employer.
reach USA/EUROPE/Locations Listed: Motorola Literature Distribution; P.O. 5405, Denver, Colorado 80217. 1-303-675-2140 1-800-441-2447 JAPAN: Motorola Japan Ltd.; SPS, Technical Information Center, 3-20-1, Minami-Azabu, Minato-ku, Tokyo 106-8573 Japan. 81-3-3440-3569 ASIA/PACIFIC: Motorola Semiconductors H.K. Ltd.; Silicon Harbour Centre, King Street, Industrial Estate, N.T., Hong Kong. 852-26668334 Technical Information Center: 1-800-521-6274 HOME PAGE:
Motorola, Inc., 2001
AN2183/D
More Information This Product, www.freescale.com

Other recent searches


ZTX1055A - ZTX1055A   ZTX1055A Datasheet
uPD4713A - uPD4713A   uPD4713A Datasheet
NJW5511 - NJW5511   NJW5511 Datasheet
NJW5511F2 - NJW5511F2   NJW5511F2 Datasheet
MSA-0886 - MSA-0886   MSA-0886 Datasheet
LMX2531LQ1415E - LMX2531LQ1415E   LMX2531LQ1415E Datasheet
ISL6336B - ISL6336B   ISL6336B Datasheet
AD8226 - AD8226   AD8226 Datasheet
2SK3453 - 2SK3453   2SK3453 Datasheet

 

Privacy Policy | Disclaimer
© 2012 Datasheet Archive