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

X  

AN2159 数据表(PDF) 13 Page - STMicroelectronics

部件名 AN2159
功能描述  SPI protocol for STPM01/STPM10 metering devices
PDF  23 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
制造商  STMICROELECTRONICS [STMicroelectronics]
网页  http://www.st.com
标志 STMICROELECTRONICS - STMicroelectronics

AN2159 数据表(HTML) 13 Page - STMicroelectronics

Back Button AN2159 Datasheet HTML 9Page - STMicroelectronics AN2159 Datasheet HTML 10Page - STMicroelectronics AN2159 Datasheet HTML 11Page - STMicroelectronics AN2159 Datasheet HTML 12Page - STMicroelectronics AN2159 Datasheet HTML 13Page - STMicroelectronics AN2159 Datasheet HTML 14Page - STMicroelectronics AN2159 Datasheet HTML 15Page - STMicroelectronics AN2159 Datasheet HTML 16Page - STMicroelectronics AN2159 Datasheet HTML 17Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 13 / 23 page
background image
AN2159
Data processing
Doc ID 11400 Rev 3
13/23
5
Data processing
5.1
Reading process
As told before, to start a SPI communication with STPMxx to read new values of registers, it
is necessary to apply a latching phase first. Then a shifting phase starts, as reported in
Figure 4.
After that, 32 pulses of serial clocks needs to be applied to pin SCL in order to read the DAP
register. If additional 32 pulses are applied to pin SCL, the DRP register is read. At this point
there are two possibilities. Either reading is continued by applying 32 clocks per register until
all registers of interest are read or a precharge command is applied first (8 pulses to pin
SCLNLC while SYN=0 and SDA=1) which moves an internal read pointer to register DEV
which effectively skips DSP and DFP registers, and then reading may be continued.
It is up to an application to decide how many records should be read out from the device.
After all registers are read, SCS can be returned to idle state which ends the shifting phase.
Shifting phase can be repeated and it should read the same values. This repetition is used
to improve the reliability of successful reading in a strong EMI environment.
Every register is packed into 4-bytes where the most significant nibble (4 bits) is reserved for
parity code and the rest of 28 bits are used for data. This means that every register is
protected by its own parity bit.
As shown in Figure 6, the first read out byte of data record is Least Significant Byte (LSB) of
data value and the fourth is Most Significant Byte (MSB) of data value, then it is necessary
to re-order the four bytes after reading.
Normally, each byte is read out as most significant bit (MSB) first. But this can be changed
by setting the MSBF configuration bit. If this is done, each byte is read out as least
significant bit (LSB) first.
Figure 6.
STPMxx data registers
7
0
7
0
7
0
7
0
7
0
7
0
15
8
15
8
23
16
23
16
00
24
24
8 bit SPI reading order
32 bits register assembling
1st byte - LSB
msb
lsb
4th byte - MSB
7
0
7
0
7
0
7
0
parity nibble
msb
lsb
parity nibble
28 bit data



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


数据表 下载

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