поискавой системы для электроныых деталей
  Russian  ▼
ALLDATASHEETRU.COM

X  

AN1796 датащи(PDF) 14 Page - STMicroelectronics

номер детали AN1796
подробное описание детали  FIELD UPDATES FOR FLASH BASED ST7 APPLICATIONS USING A PC COMM PORT
PDF  17 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
производитель  STMICROELECTRONICS [STMicroelectronics]
домашняя страница  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN1796 датащи(HTML) 14 Page - STMicroelectronics

Back Button AN1796 Datasheet HTML 9Page - STMicroelectronics AN1796 Datasheet HTML 10Page - STMicroelectronics AN1796 Datasheet HTML 11Page - STMicroelectronics AN1796 Datasheet HTML 12Page - STMicroelectronics AN1796 Datasheet HTML 13Page - STMicroelectronics AN1796 Datasheet HTML 14Page - STMicroelectronics AN1796 Datasheet HTML 15Page - STMicroelectronics AN1796 Datasheet HTML 16Page - STMicroelectronics AN1796 Datasheet HTML 17Page - STMicroelectronics  
Zoom Inzoom in Zoom Outzoom out
 14 / 17 page
background image
14/17
FIELD UPDATES FOR FLASH BASED ST7 APPLICATIONS USING A PC COMM PORT
6 APPENDEX2: BLOW BY BLOW SOFTWARE DESCRIPTION
6.1 POWER-UP INITIALIZATION
At power up reset the vector at $FFFE is fetched, which branches execution to the code label
BANK0. At BANK0 interrupts are disabled, the UART baud rate is set to 9600 and the UART
transmitter and receiver are enabled. Next the 40 byte routine at label FLASHPROGRAMMER
is copied from its location in flash to a block in RAM. This is the code which actually writes to
the flash and it is necessary that this code be executed out of RAM since, once the write se-
quence to flash is started, data cannot be read out of flash until the write is completed.
6.2 TO UPDATE OR NOT TO UPDATE
At label BOOTUPWAIT a 24 bit counter made up of concatenated registers x:y:a is load with
$550000 and then the polling loop starting at label CHARCHECK is cycled through a total of
5,570,560 times, each time checking to see if a UART character has been received. With an
8 MHZ effective clock, this polling will take about five seconds. If no character is detected then
the “jp $FDFC” instruction branches execution to the normal sector1 program via the skip-
jump table. At label CHARCHECK, if a character is detected then execution branches to label
DOUPDATE.
6.3 UPDATE
To begin the flash update process a sequence of two unique “keys” are written to control reg-
ister FCSR. This exact data in this exact sequence must be written to this register in order to
remove write protection from the flash. If any other data is written, the protection will “lock up”
until the next reset of the MCU. Next, whatever character had been received in order to acti-
vate the update sequence is echoed back to the operator terminal as a confirmation.
6.4 INTERPRETING THE S-RECORDS FILE
At label B001 the subroutine WAITFORCHAR is called. This routine will poll indefinitely
waiting for a character to be received by the UART and then echo back the character to the
terminal and return it in the a register. Since an S-Records line must start with an upper case
S, the program will loop back through label B001 until an S is seen. Next the program looks for
either a 1 or a 9 to indicate an S1 or S9 record. Anything else is discarded as an error and ex-
ecution goes back to label B001 to look for an S again. At label GOTS1 subroutine GETBI-
NARY is called. This routine will read two characters from the character stream, convert them
from hex/ascii to binary format, and return the number in register a. This number is the nn
record (see appendix 3) which is the total number of bytes in the record. To get the number of
actual data bytes in the record, 3 is subtracted from the value to account for the two address
and one checksum byte that are included in the total count. This is saved in the variable



Html Pages

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


датащи скачать

Go To PDF Page


ссылки URL



Вашему бизинису помогли Аллдатащит?  [ DONATE ] 

Что такое Аллдатащит   |   реклама   |   контакт   |   Конфиденциальность   |   Ссылка на техническое описание    |   обмен ссыками   |   поиск по производителю
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