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

X  

PM0054 датащи(PDF) 25 Page - STMicroelectronics

номер детали PM0054
подробное описание детали  How to program STM8L and STM8AL Flash program memory and data EEPROM
PDF  28 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
производитель  STMICROELECTRONICS [STMicroelectronics]
домашняя страница  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

PM0054 датащи(HTML) 25 Page - STMicroelectronics

Back Button PM0054 Datasheet HTML 20Page - STMicroelectronics PM0054 Datasheet HTML 21Page - STMicroelectronics PM0054 Datasheet HTML 22Page - STMicroelectronics PM0054 Datasheet HTML 23Page - STMicroelectronics PM0054 Datasheet HTML 24Page - STMicroelectronics PM0054 Datasheet HTML 25Page - STMicroelectronics PM0054 Datasheet HTML 26Page - STMicroelectronics PM0054 Datasheet HTML 27Page - STMicroelectronics PM0054 Datasheet HTML 28Page - STMicroelectronics  
Zoom Inzoom in Zoom Outzoom out
 25 / 28 page
background image
PM0054
Programming STM8 Flash microcontrollers
Doc ID 15433 Rev 9
25/28
5.6.1
ICP methods
The in-circuit programming (ICP) method is used to update Flash program memory and
data EEPROM. The programming interface for STM8 devices is the SWIM (Single Wire
Interface Module). It is used to communicate with an external programming device
connected via a cable.
See STM8 SWIM communication protocol and debug module user manual (UM0470) for
more details on the SWIM mode entry and SWIM protocol. When using the SWIM protocol,
two methods can be used.
First method
This method writes 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
This 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 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
5.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 23 24 25 26 27 28


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

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