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

X  

PM0212 数据表(PDF) 19 Page - STMicroelectronics

部件名 PM0212
功能描述  How to program the STM8TL5xxx Flash program memory and data EEPROM
PDF  22 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
制造商  STMICROELECTRONICS [STMicroelectronics]
网页  http://www.st.com
标志 STMICROELECTRONICS - STMicroelectronics

PM0212 数据表(HTML) 19 Page - STMicroelectronics

Back Button PM0212 Datasheet HTML 14Page - STMicroelectronics PM0212 Datasheet HTML 15Page - STMicroelectronics PM0212 Datasheet HTML 16Page - STMicroelectronics PM0212 Datasheet HTML 17Page - STMicroelectronics PM0212 Datasheet HTML 18Page - STMicroelectronics PM0212 Datasheet HTML 19Page - STMicroelectronics PM0212 Datasheet HTML 20Page - STMicroelectronics PM0212 Datasheet HTML 21Page - STMicroelectronics PM0212 Datasheet HTML 22Page - STMicroelectronics  
Zoom Inzoom in Zoom Outzoom out
 19 / 22 page
background image
PM0212
Programming STM8 Flash microcontrollers
Doc ID 022351 Rev 2
19/22
First method
The first method consists of writing directly into the Flash registers and memory locations
through the write memory command of the SWIM protocol. To make sure that the CPU is
not accessing the memory during block Flash programming, the core must be stalled by
setting the STALL bit in the DM_CSR2 debug module register.
The following sequence is required:
1.
Apply a RESET
2.
Activate the SWIM by sending the entry sequence on the SWIM pin
3.
Activate the SWIM_CSR register by writing 1 to the DM bit in SWIM_CSR
4.
Disable interrupts by setting the SAFE_MASK bit in SWIM_CSR
5.
Release RESET
6.
Verify the DeviceID by reading it using ROTF command
7.
Send the SWIM SRST command
8.
Unlock the memory by writing the MASS keys
9.
Program the Flash program memory using the SWIM WOTF command
Second method
The second method uses the same sequence of operations as the first method except that
the ICP driver firmware must be downloaded in RAM before being launched:
1.
Apply a RESET
2.
Activate the SWIM by sending the entry sequence on the SWIM pin
3.
Activate the SWIM_CSR register by writing 1 to the DM bit in SWIM_CSR
4.
Disable interrupts by setting the SAFE_MASK bit in SWIM_CSR
5.
Release RESET
6.
Verify the DeviceID by reading it using ROTF command
7.
Send the SWIM SRST command
8.
Unlock the memory by writing the MASS keys
9.
Download the ICP driver firmware into the device RAM using the SWIM WOTF
command
10. Execute the ICP driver:
a)
Modify the CPU registers (new PC, X, Y, CC...) using the WOTF commands
b)
Set the FLASH bit in the DM_CSR2 register
c)
Clear the STALL bit in the DM_CSR2 register
4.6.2
IAP method
Refer to application note AN2737- Basic in-application programming example using the
STM8 I2C and SPI peripherals.



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22


数据表 下载

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