Electronic Components Datasheet Search
  New Zealand  ▼
ALLDATASHEET.CO.NZ

X  

AN1796 Datasheet(PDF) 3 Page - STMicroelectronics

Part # AN1796
Description  FIELD UPDATES FOR FLASH BASED ST7 APPLICATIONS USING A PC COMM PORT
PDF  17 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN1796 Datasheet(HTML) 3 Page - STMicroelectronics

  AN1796 Datasheet HTML 1Page - STMicroelectronics AN1796 Datasheet HTML 2Page - STMicroelectronics AN1796 Datasheet HTML 3Page - STMicroelectronics AN1796 Datasheet HTML 4Page - STMicroelectronics AN1796 Datasheet HTML 5Page - STMicroelectronics AN1796 Datasheet HTML 6Page - STMicroelectronics AN1796 Datasheet HTML 7Page - STMicroelectronics AN1796 Datasheet HTML 8Page - STMicroelectronics AN1796 Datasheet HTML 9Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 3 / 17 page
background image
3/17
FIELD UPDATES FOR FLASH BASED ST7 APPLICATIONS USING A PC COMM PORT
2 ABSOLUTE ADRESSES AND VECTORS
The example program was written for the ST72264 but, so long as the reset and interrupt
vector locations are the same, it can be executed without change on any ST7 regardless of the
size of its flash memory. This is because whatever the size of the flash, it will occupy the top
of the 0000 to $FFFF 64k possible addressing space of an ST7. We would thus always want
sector0 to occupy the top 0.5k, the space from $FE00 to $FFFF. We would also want the skip-
jump table (which is technically part of sector1) to always be located in the area just below
sector0 (also the top of sector1). In the example program this table occupies from $FDD0 to
$FDFF. Looking at the vector section at the end the program, the segment directive is used to
place the program pointer at each of the absolute memory locations for the various interrupt
vectors (and the reset vector) as described in the data sheet for the MCU. At each of these lo-
cations, a dc.w directive is used to place a 16 bit absolute address vector. In most micro con-
troller software we would be more accustomed to seeing a symbolic (and relocatable) address
reference used here and this points out an important concept that must be understood. After
we make our first version of the software application and send it “out into the world” by pro-
gramming it into the MCU with a standard programmer (sector0 and sector1), sector0 will
probably (if all goes according to plan) never be changed again, although sector1 can have
many revisions. When sector1 code is revised, the addresses of any or all of the interrupt
service routines associated with the interrupt vectors will move. Since sector0 and the vector
table will not change we need the address references in the vector table to be fixed. This lim-
itation would cause a severe loss of flexibility in the program if it were not for the use of the
skip-jump table located at $FDD0. This table has one entry for each interrupt vector. The table
consists of long jump (to cover the entire 64k space) instructions spaced every four bytes. Ac-
tually a long jump only takes up three bytes (one for the jp op code and two for the address)
but it’s easier to count by four.
Please note that, in the example program, all of the jumps are to the symbolic (and re-locat-
able) address “dummyisr” except for the one associated with the reset vector, which jumps to
“start”. This is because the example program does not make use of any interrupts. The pro-
gram must provide a mechanism to use any of the interrupts since we cannot “get at” the
vector table once we send our program out into the world. If we send out a version 1.0 of our
application which perhaps uses only the SCI interrupt and later decide to revise the program
and make use of the TIMERA interrupt we can do that by simply replacing the appropriate “jp
dummyisr” instruction in the skip-jump table with a jump to our TIMERA interrupt service rou-
tine. Since the skip-jump table resides in sector1 we are free to change the destination of the
jumps whenever we please although the absolute location of the jump instruction itself is fixed
so that it always agrees with sector0.
A careful examination of the reset vector reveals that it is treated specially. This vector does
use a symbolic (and re-locatable) address reference, “BANK0”. This is permissible because



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17


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