| 전자부품 데이터시트 검색엔진 |
|
MCS3142 데이터시트(PDF) 8 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
MCS3142 데이터시트(HTML) 8 Page - Microchip Technology |
|
8 / 37 page ![]() MCS3142 DS40001747A-page 8 2014 Microchip Technology Inc. 3.1 Counter and Timer Protection Because they are written during normal operation of the device, the two synchronization counters, Reset counter and time value receive special protection to guard against data loss from unexpected power loss. An 8-bit CRC is calculated and stored alongside each variable. Further, each variable is duplicated in a different portion of memory. Whenever a value is read, the CRC is calculated and verified against the stored value. If there is a mismatch, the second copy of the data is read instead. The CRC calculation uses a polynomial represented by . Example 3-1 describes a sample C function to compute this value. EXAMPLE 3-1: CRC CALCULATION x 8 x 4 x 3 x 2 1 ++++ static uint8_t crc(const uint8_t* buffer, size_t len){ uint8_t bitcount; uint8_t c = 0xFF; while(len--) { c ^= *buffer++; for(bitcount = 0; bitcount < 8; bitcount++){ if((c & 0x80)!= 0) { c <<= 1; c ^= 0x1D; }else{ c <<= 1; } } } return ~c; } |
|
링크 URL |
| 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 |