Electronic Components Datasheet Search
  English  ▼

X  

AN2635 Datasheet(PDF) 13 Page - Freescale Semiconductor, Inc

Part # AN2635
Description  On-Chip FLASH Programming Routines
PDF  36 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  FREESCALE [Freescale Semiconductor, Inc]
Direct Link  http://www.freescale.com
Logo FREESCALE - Freescale Semiconductor, Inc

AN2635 Datasheet(HTML) 13 Page - Freescale Semiconductor, Inc

Back Button AN2635 Datasheet HTML 9Page - Freescale Semiconductor, Inc AN2635 Datasheet HTML 10Page - Freescale Semiconductor, Inc AN2635 Datasheet HTML 11Page - Freescale Semiconductor, Inc AN2635 Datasheet HTML 12Page - Freescale Semiconductor, Inc AN2635 Datasheet HTML 13Page - Freescale Semiconductor, Inc AN2635 Datasheet HTML 14Page - Freescale Semiconductor, Inc AN2635 Datasheet HTML 15Page - Freescale Semiconductor, Inc AN2635 Datasheet HTML 16Page - Freescale Semiconductor, Inc AN2635 Datasheet HTML 17Page - Freescale Semiconductor, Inc Next Button
Zoom Inzoom in Zoom Outzoom out
 13 / 36 page
background image
How to Use the Routines
On-Chip FLASH Programming Routines, Rev. 4
Freescale Semiconductor
13
Example 6:
Programming a Range Smaller than a Row
PRGRNGE can be used to program a range less than 32 bytes. Example 6 shows how to program $55
and $AA at location $E004 and $E005, respectively.
PRGRNGE equ
$038A
;LB8 PRGRNGE jump address
mov
#$55,DATA
mov
#$AA,DATA+1
mov
#$18,CPUSPD
;fop = 6.0MHz in this example
ldhx #$E005
;Load last address to LADDR
sthx LADDR
ldhx #$E004
;Load beginning address to H:X
jsr
PRGRNGE
;Call PRGRNGE routine
ERARNGE
ERARNGE can be called to erase a page (64 bytes) or a whole array of FLASH. Registers H and X can
be any address within the page or array to be erased. To select erase size, CTRLBYT is used. Writing
$40 to CTRLBYT selects the entire array (MASS) erase. Writing $00 to CTRLBYT selects the page erase.
When other values are written to CTRLBYT, the erase operation is not executed. This routine supports
an internal operating frequency between 1.0 MHz and 8.4 MHz.
In this routine, both PAGE erase time (tErase) and MASS erase time (tMErase) are set between 4 ms and
5.5 ms. The CPUSPD value is the nearest integer of fop (in MHz) times 4. For example if fop is 3.1 MHz,
the CPUSPD is 12 ($0C). If fop is 4.9152 MHz, the CPUSPD is 20 ($14).
Interrupts are masked and the COP is serviced in ERARNGE. The first COP is serviced on
(40+3xCPUSPD) bus cycles after this routine is called in the user software.
Entry Condition
CTRLBYT — For MASS erase, write $40. For PAGE erase, write $00.
H:X — Contains an address within a desired erase page or an array.
CPUSPD — Contains the nearest integer value of fop (in MHz) times 4.
Exit Condition
None



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com