数据搜索系统,热门电子元器件搜索
  Chinese  ▼
ALLDATASHEETCN.COM

X  

AN2792 数据表(PDF) 9 Page - STMicroelectronics

部件名 AN2792
功能描述  STM8A easy programmer
PDF  12 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
制造商  STMICROELECTRONICS [STMicroelectronics]
网页  http://www.st.com
标志 STMICROELECTRONICS - STMicroelectronics

AN2792 数据表(HTML) 9 Page - STMicroelectronics

Back Button AN2792 Datasheet HTML 4Page - STMicroelectronics AN2792 Datasheet HTML 5Page - STMicroelectronics AN2792 Datasheet HTML 6Page - STMicroelectronics AN2792 Datasheet HTML 7Page - STMicroelectronics AN2792 Datasheet HTML 8Page - STMicroelectronics AN2792 Datasheet HTML 9Page - STMicroelectronics AN2792 Datasheet HTML 10Page - STMicroelectronics AN2792 Datasheet HTML 11Page - STMicroelectronics AN2792 Datasheet HTML 12Page - STMicroelectronics  
Zoom Inzoom in Zoom Outzoom out
 9 / 12 page
background image
AN2792
Software and hardware requirements
9/12
5
Software and hardware requirements
5.1
Batch file
The STxx boot loader tester tool, used to load files into the application board, manages .s19
files in a standard format. There are 16 bytes for single string and increase addresses
options (option -m16 and -s respectively). To produce a .s19 file with both these options, the
following check option must be added:
Es.
"%COS_PATH%\chex" -m16 -s ".\%PRJ_PATH%\%PRJ_NAME%.st7" >
".\PRJ_PATH\%PRJ_NAME%.s19"
COS_PATH is the COSMIC compiler path
PRJ_NAME is the name of the project
5.2
Application software
To program the application board of the STM8A, the device must be in boot mode (see
Section 4: Transfering the .s19 file to the STM8A application board on page 8). If the device
is not in boot mode, the easy programmer must write two option bytes (487Eh and 487Fh).
This is done by the easy programmer sending a pulse on the PH4 pin which is connected to
the external interrupt pin of the application board (PORTx/pin). This external interrupt forces
the application code to execute the interrupt routine that writes the option bytes and resets
the device (the option bytes are updated with the new values only after reset). The interrupt
routine code is as follows:
@interrupt void EXTI_PORTx_IRQHandler (void)
{
volatile u8 opt
@0x487E;
volatile u8 nopt @0x487F;
if ( GPIOx.IDR & 0xPin )
{
/* Enable write to EEProm Data */
FLASH.DUNPR = 0xAE;
FLASH.DUNPR = 0x56;
/* Enable write to option byte */
FLASH.CR2 |= 0x80;
FLASH.NCR2 &= 0x7F;
/* Write option byte */
opt = 0x55;
nopt = 0xAA;
/* Reset micro with LSWDG */
IWDG.KR = 0xCC;
IWDG.KR = 0x55;
}
return;
}
‘PORTx’ and ‘pin’ indicate any pin of PORTx with external interrupts. Pins can be chosen
from any available I/0 pin of the application board.



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12


数据表 下载

Go To PDF Page


链接网址



ALLDATASHEET是否为您带来帮助?  [ DONATE ] 

关于 Alldatasheet   |   广告服务   |   联系我们   |   隐私政策   |   数据表链接    |   链接交换   |   制造商名单
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