| 数据搜索系统,热门电子元器件搜索 |
|
STGAP1STR 数据表(PDF) 48 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
STGAP1STR 数据表(HTML) 48 Page - STMicroelectronics |
|
48 / 67 page ![]() Programming manual STGAP1S 48/67 DocID027190 Rev 3 9.1.2 WriteReg command The device register can be written through the WriteReg command when the device is set in the configuration mode only (refer to Section 9.1.1), otherwise the write command is ignored and the SPI_ERR flag is forced low. The WriteReg command is followed by the data to be written into the target register. The CRC code following the data is based on both command and data bytes. In this way, in case of communication error, a data byte cannot be decoded as a command and vice-versa (refer to Section : CRC protection on page 45). 9.1.3 ReadReg command The registers of the device can be read anytime through the ReadReg command. After the command is received and decoded by the device, the register value and the respective CRC code is prepared for the transmission. The CRC polynomial used by the device during the transmission is different from the one used by the host, but the CRC code is not inverted before transmission (refer to Section : CRC protection). The time required to obtain the reading result changes according to the side where the register is located. The reading of a local register (low voltage side) is available in 800 ns. The reading of a remote register (isolated side), if no communication error occurs between the two sides of the device, is available in 30 µs. After the read result is ready, the host microcontroller must send another command in order to receive it. The time required to make the read result available depends on the register type: remote registers need longer time because of the isolated interface communication. Table 16. WriteReg command synopsis Byte 123 4 To device 100A AAAA(1) 1. The command byte where AAAAA is the address of the target register. CCCC CCCC(2) 2. The CRC byte of the command, if the CRC check is disabled this byte is ignored. DDDD DDDD(3) 3. Data to be written into the target register. KKKK KKKK(4) 4. The CRC byte of the command and data, if the CRC check is disabled this byte is ignored. Table 17. ReadReg command synopsis Byte 1 2 3(1) 1. Proper time have to be waited in order to allow the device to prepare the data. 4 To device 101A AAAA(2) 2. The command byte where AAAAA is the address of the target register. CCCC CCCC(3) 3. The CRC byte of the command, if the CRC check is disabled this byte is ignored. 0000 0000 CCCC CCCC(4) 4. The CRC byte of the NOP command. From device 0000 0000 0000 0000 DDDD DDDD(5) 5. Data read from the target register. KKKK KKKK(6) 6. The CRC byte of the data. |
|
链接网址 |
| ALLDATASHEET是否为您带来帮助? [ DONATE ] |
关于 Alldatasheet | 广告服务 | 联系我们 | 隐私政策 | 数据表链接 | 链接交换 | 制造商名单 All Rights Reserved©Alldatasheet.com |
| 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 |