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

X  

AN2737 数据表(PDF) 4 Page - STMicroelectronics

部件名 AN2737
功能描述  Basic in-application programming example
PDF  16 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
制造商  STMICROELECTRONICS [STMicroelectronics]
网页  http://www.st.com
标志 STMICROELECTRONICS - STMicroelectronics

AN2737 数据表(HTML) 4 Page - STMicroelectronics

  AN2737 Datasheet HTML 1Page - STMicroelectronics AN2737 Datasheet HTML 2Page - STMicroelectronics AN2737 Datasheet HTML 3Page - STMicroelectronics AN2737 Datasheet HTML 4Page - STMicroelectronics AN2737 Datasheet HTML 5Page - STMicroelectronics AN2737 Datasheet HTML 6Page - STMicroelectronics AN2737 Datasheet HTML 7Page - STMicroelectronics AN2737 Datasheet HTML 8Page - STMicroelectronics AN2737 Datasheet HTML 9Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 4 / 16 page
background image
IAP example with I2C
AN2737
4/16
The firmware implements byte, word, and block programming features offered by the STM8
Flash program memory and data EEPROM.
Block programming has to be executed from the RAM memory. Consequently, at the
beginning of the code, the Flash function section is copied to the RAM memory. To copy and
link some code to the RAM memory using the Cosmic linker, the steps below must be
followed:
●
Define the section to be linked in RAM as a movable segment using the linker option ‘-
ic’.
●
At the begining of the code, execute the ‘_fctcpy’ function which copies the code from
the Flash to the RAM memory.
For more details about movable codes, please refer to the COSMIC “C Cross Compiler
User’s Guide for ST Microelectronics STM8” available on www.cosmicsoftware.com.
1.3
Read and write command examples
The firmware allows read or write operations in the Flash program memory (from address
8000h up to 27FFFh) or in the data EEPROM (from address 4000h up to 47FFh) memory of
the STM8.
Current and random options are available for both read and write operations:
●
The random command allows data to be read/writen at a specific address.
●
The current command allows data to be read/writen at the current address pointer. The
default current address pointer value (after reset) is 4000h (start of the data EEPROM).
So, for example, after writing (or reading) 10 bytes to the memory, the current address
pointer value becomes 400Ah. The address is passed on 3 bytes with the most
significant bit (MSB) first.
Note:
The firmware follows standard serial I²C EEPROM protocol rules.
Before starting, the firmware example must be loaded with STVD and executed using the
run command. The evaluation board LCD displays a welcome message ‘STM8 IAP-I2C
Demo’.
1.3.1
Packet description
The different packets composing an I2C command are:
START: Start signal which is generated by the master.
ADD SLV DEVICE-W: Slave device address which is sent by the master with the direction
bit set to write.
ACK-S: Acknowledge signal which is generated by the slave.
ACK-M: Acknowledge signal which is generated by the master.
ACKF: Acknowledge failure or ‘no acknowledge’ signal which are both generated by the
master. A ‘no acknowledge’ signal is generated by the master to notify the slave device that
the last read byte has been correctly received which marks the end of a read operation.
STOP: Stop signal which is generated by the master.



Html Pages

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


数据表 下载

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