{"id":385522,"date":"2024-06-29T06:09:44","date_gmt":"2024-06-29T06:09:44","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=385522"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=385522","title":{"rendered":"<span>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430 \u043d\u0430\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043d\u0430 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0435 1986BE92QI<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0417\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439\u0442\u0435. \u0425\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u043c \u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438\u0437\u0434\u0435\u043b\u0438\u044f \u043d\u0430 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0435 1986BE92QI \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 \u0421\u0438.<\/p>\n<p>\u041e\u0447\u0435\u043d\u044c \u0447\u0430\u0441\u0442\u043e \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u043e\u0442\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0432\u0440\u0435\u043c\u044f, \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u043e\u0435 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u043c. \u0414\u043b\u044f \u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430 \u043d\u0430\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0438 \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u0430\u0436\u0434\u0443\u044e \u043c\u0438\u043d\u0443\u0442\u0443, \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0445\u0440\u0430\u043d\u044f\u0449\u0435\u0435\u0441\u044f \u0432 \u044f\u0447\u0435\u0439\u043a\u0435 \u044d\u043d\u0435\u0440\u0433\u043e\u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 EEPROM. \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0440\u0435\u0441\u0443\u0440\u0441 \u0446\u0438\u043a\u043b\u043e\u0432 \u0437\u0430\u043f\u0438\u0441\u0438 \u0438 \u0441\u0442\u0438\u0440\u0430\u043d\u0438\u044f \u044d\u0442\u0438\u0445 \u044f\u0447\u0435\u0435\u043a \u043f\u0430\u043c\u044f\u0442\u0438 \u043e\u0431\u044b\u0447\u043d\u043e \u043c\u0430\u043b \u0438 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u043a\u043e\u043b\u043e 10.000 \u0446\u0438\u043a\u043b\u043e\u0432 (\u043f\u043e \u043e\u0446\u0435\u043d\u043a\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044f). \u0417\u043d\u0430\u0447\u0438\u0442, \u0435\u0441\u043b\u0438 \u0441\u0442\u0438\u0440\u0430\u0442\u044c \u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 \u043e\u0434\u043d\u0443 \u0438 \u0442\u0443\u0436\u0435 \u044f\u0447\u0435\u0439\u043a\u0443 \u043f\u0430\u043c\u044f\u0442\u0438 \u0441 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u043e\u043c \u0432 1 \u043c\u0438\u043d\u0443\u0442\u0443, \u0442\u043e \u0440\u0435\u0441\u0443\u0440\u0441 \u044f\u0447\u0435\u0439\u043a\u0438 \u0431\u0443\u0434\u0435\u0442 \u0438\u0437\u0440\u0430\u0441\u0445\u043e\u0434\u043e\u0432\u0430\u043d \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0437\u0430 \u043d\u0435\u0434\u0435\u043b\u044e. \u0414\u043b\u044f \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0435 \u043e\u0434\u043d\u0443 \u044f\u0447\u0435\u0439\u043a\u0443, \u0430 \u0432\u0441\u0435 \u044f\u0447\u0435\u0439\u043a\u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0439, \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043f\u0430\u043c\u044f\u0442\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439. \u042d\u0442\u043e \u0434\u0430\u0441\u0442 \u043d\u0430\u043c 1024 * 10.000 \u0437\u0430\u043f\u0430\u0441 \u0446\u0438\u043a\u043b\u043e\u0432 \u0437\u0430\u043f\u0438\u0441\u0438 \u0438 \u0441\u0442\u0438\u0440\u0430\u043d\u0438\u044f, \u0447\u0442\u043e \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u043e, \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e 19 \u0433\u043e\u0434\u0430\u043c \u043f\u0440\u0438 \u0435\u0436\u0435\u043c\u0438\u043d\u0443\u0442\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430. \u0418\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u0436\u0435 \u0434\u0432\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439. \u0412 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0435 1986BE92QI \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b 32 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u044d\u043d\u0435\u0440\u0433\u043e\u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u0434\u043b\u044f \u0437\u0430\u043f\u0438\u0441\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0438 1 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u044d\u043d\u0435\u0440\u0433\u043e\u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u043f\u043e 4 \u043a\u0431\u0430\u0439\u0442. \u041a\u0430\u0436\u0434\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u043f\u043e\u0434\u0435\u043b\u0435\u043d\u0430 \u043d\u0430 4 \u0441\u0435\u043a\u0442\u043e\u0440\u0430 (SECTOR_A, SECTOR_B, SECTOR_C, SECTOR_D). \u0420\u0430\u0437\u0431\u0438\u0442\u0438\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043d\u0430 \u0441\u0435\u043a\u0442\u043e\u0440\u0430 \u0434\u0430\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u0442\u0438\u0440\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043d\u0435 \u0446\u0435\u043b\u0438\u043a\u043e\u043c, \u0430 \u043f\u043e\u0431\u043b\u043e\u0447\u043d\u043e \u043f\u043e 256 \u0447\u0435\u0442\u044b\u0440\u0435\u0445 \u0431\u0430\u0439\u0442\u043d\u044b\u0445 \u0441\u043b\u043e\u0432\u0430 \u0432 \u0447\u0435\u0442\u044b\u0440\u0435 \u044d\u0442\u0430\u043f\u0430.<\/p>\n<p>\u0418\u0442\u0430\u043a, \u0434\u043b\u044f \u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430 \u043d\u0430\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c. \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u044f\u0447\u0435\u0439\u043a\u0443 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0441\u0435\u043a\u0442\u043e\u0440\u0430 (SECTOR_A). \u0427\u0435\u0440\u0435\u0437 \u043c\u0438\u043d\u0443\u0442\u0443 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430 \u0438 \u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u043e \u0432\u0442\u043e\u0440\u0443\u044e \u044f\u0447\u0435\u0439\u043a\u0443 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0441\u0435\u043a\u0442\u043e\u0440\u0430 \u0438 \u0442\u0430\u043a \u0434\u043e \u043a\u043e\u043d\u0446\u0430 \u0441\u0435\u043a\u0442\u043e\u0440\u0430. \u0417\u0430\u0442\u0435\u043c \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0441\u0435\u043a\u0442\u043e\u0440 (SECTOR_B), \u043d\u043e \u043f\u0435\u0440\u0435\u0434 \u0437\u0430\u043f\u0438\u0441\u044c\u044e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441\u0442\u0438\u0440\u0430\u043d\u0438\u0435 \u044d\u0442\u043e\u0433\u043e \u0441\u0435\u043a\u0442\u043e\u0440\u0430 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0437\u0430\u043f\u0438\u0441\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u044f\u0447\u0435\u0439\u043a\u0443 \u0441\u0435\u043a\u0442\u043e\u0440\u0430 B, \u0437\u0430\u0442\u0435\u043c \u0432\u043e \u0432\u0442\u043e\u0440\u0443\u044e \u044f\u0447\u0435\u0439\u043a\u0443 \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435 \u0434\u043e \u043a\u043e\u043d\u0446\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b. \u0417\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0432\u0441\u0435\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0437\u0430 1024 \u043c\u0438\u043d\u0443\u0442\u044b. \u041a\u043e\u0433\u0434\u0430 \u0432\u0441\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0430 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u043d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0441\u0435\u043a\u0442\u043e\u0440 SECTOR_A, \u043e\u043d \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0447\u0438\u0449\u0430\u0435\u0442\u0441\u044f, \u0442.\u043a. \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0432\u0448\u0438\u0435\u0441\u044f \u0442\u0430\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430\u043c \u0443\u0436\u0435 \u043d\u0435 \u043d\u0443\u0436\u043d\u044b, \u0432\u0435\u0434\u044c \u0441\u0430\u043c\u044b\u0435 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u0441\u0435\u043a\u0442\u043e\u0440\u0435 D. \u0418 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u0442\u0441\u044f \u0437\u0430\u043f\u0438\u0441\u044c \u0434\u0430\u043d\u043d\u044b\u0445 \u0443\u0436\u0435 \u0432 \u043f\u0435\u0440\u0432\u044b\u0439 \u0441\u0435\u043a\u0442\u043e\u0440.<\/p>\n<p>\u041a\u0430\u0436\u0434\u043e\u0435 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c\u043e\u0435 \u0432 \u044f\u0447\u0435\u0439\u043a\u0443 \u043f\u0430\u043c\u044f\u0442\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0447\u0435\u0442\u044b\u0440\u0435\u0445 \u0431\u0430\u0439\u0442. \u0412 \u043f\u0435\u0440\u0432\u044b\u0445 \u0442\u0440\u0435\u0445 \u0431\u0430\u0439\u0442\u0430\u0445 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u0430\u043c\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430 \u043c\u0438\u043d\u0443\u0442. \u0412 \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043e\u043c \u0431\u0430\u0439\u0442\u0435 8 \u0431\u0438\u0442\u043d\u0430\u044f, \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u043d\u043d\u0430\u044f \u0434\u043b\u044f \u044d\u0442\u0438\u0445 \u0442\u0440\u0435\u0445 \u0431\u0430\u0439\u0442 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u0430\u044f \u0441\u0443\u043c\u043c\u0430 CRC8. \u042d\u0442\u0430 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u0430\u044f \u0441\u0443\u043c\u043c\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u0438\u0441\u043f\u043e\u0440\u0447\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u041d\u0438\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0430 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u0432 \u043f\u0430\u043c\u044f\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430 \u0441 \u0442\u0440\u0435\u043c\u044f \u0431\u0430\u0439\u0442\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 uint8_t val[3] \u0438 \u0431\u0430\u0439\u0442\u043e\u043c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0441\u0443\u043c\u043c\u044b uint8_t crc.<\/p>\n<pre><code class=\"cpp\">typedef struct  {   union    {     struct      {       uint8_t val[3];       uint8_t crc; }; uint32_t value; }; } counter_value_t;<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u0430\u044f \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u0430\u044f \u0441\u0443\u043c\u043c\u0430 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0442\u044c \u0441 \u043f\u043e\u0434\u0441\u0447\u0438\u0442\u0430\u043d\u043d\u043e\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0441\u0443\u043c\u043c\u043e\u0439, \u0442\u043e \u044d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u044f\u0447\u0435\u0439\u043a\u0435 \u0438\u0441\u043f\u043e\u0440\u0447\u0435\u043d\u044b \u0438 \u0438\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u043b\u044c\u0437\u044f \u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u0437\u044f\u0442\u044c \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043c\u0438\u043d\u0443\u0442. \u041f\u043e\u0442\u0435\u0440\u044f \u043e\u0434\u043d\u043e\u0439-\u0434\u0432\u0443\u0445 \u043c\u0438\u043d\u0443\u0442 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u043e\u0439, \u0435\u0441\u043b\u0438 \u043d\u0430\u0434\u043e \u043f\u043e\u0434\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043b\u0435\u0442 \u043d\u0430\u0440\u0430\u0431\u043e\u0442\u043a\u0438. <\/p>\n<p>\u0418\u0441\u043f\u043e\u0440\u0442\u0438\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0442\u0430\u043a\u0436\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0435\u0442 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043f\u0438\u0442\u0430\u043d\u0438\u044f \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u044f\u0447\u0435\u0439\u043a\u0443 EEPROM. \u041d\u0430\u043b\u0438\u0447\u0438\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0441\u0443\u043c\u043c\u044b \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u0438\u0441\u043f\u043e\u0440\u0447\u0435\u043d\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u0438 \u0437\u0430\u043f\u0438\u0441\u0438.<\/p>\n<p>\u041f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u0439 \u044f\u0447\u0435\u0439\u043a\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b, \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430 \u0438 \u0438\u0449\u0435\u0442\u0441\u044f \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043d\u0435 \u0438\u0441\u043f\u043e\u0440\u0447\u0435\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u0421 \u0430\u0434\u0440\u0435\u0441\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0437\u0430 \u044d\u0442\u0438\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u0441\u044f \u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430 \u0432 \u043f\u0430\u043c\u044f\u0442\u044c. <\/p>\n<p>\u0412 \u043b\u0438\u0441\u0442\u0438\u043d\u0433\u0435 \u043d\u0438\u0436\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u043a\u043e\u0434 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 \u0421\u0438 \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430.<\/p>\n<pre><code class=\"cpp\">#include &lt;MDR32Fx.h>  #include &lt;stdlib.h> #include &lt;crc8.h> #include &lt;MDR32F9Qx_eeprom.h> #include &lt;stdint.h> #include &lt;MDR32F9Qx_config.h> #include &lt;MDR32F9Qx_eeprom.h>  \/\/ \u0421\u0442\u0430\u0440\u0442\u043e\u0432\u044b\u0439 \u0430\u0434\u0440\u0435\u0441 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0434\u043b\u044f \u0437\u0430\u043f\u0438\u0441\u0438. #define PAGE    0x0801F000 #define SECTORA (PAGE)  #define SECTORB (PAGE + 0x04) #define SECTORC (PAGE + 0x08) #define SECTORD (PAGE + 0x0C)  \/\/ \u041a\u043e\u043b-\u0432\u043e \u0441\u0435\u043a\u0442\u043e\u0440\u043e\u0432 \u0432 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 #define SECTORS 4 \/\/ \u041a\u043e\u043b-\u0432\u043e 32 \u0431\u0438\u0442\u043d\u044b\u0445 \u0441\u043b\u043e\u0432 \u0432 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 #define WORDS 256 \/\/ EEPROM Bank Selector #define BANK_SELECT EEPROM_Main_Bank_Select  #define EEPROM_REG_ACCESS_KEY ((uint32_t)0x8AAA5551) #define DELAY_LOOP_CYCLES (8UL) #define GET_US_LOOPS(N) ((uint32_t)((float)(N) * FLASH_PROG_FREQ_MHZ \/ DELAY_LOOP_CYCLES))  #pragma anon_unions typedef struct  { union    { struct      {     uint8_t val[3]; \/\/ \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430 uint8_t crc; \/\/ \u041a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u0430\u044f \u0441\u0443\u043c\u043c\u0430 }; uint32_t value; }; } counter_value_t;  typedef enum {     RC_OK = 0,     RC_EMPTY = 1,     RC_CRCERR = 2 }rc_mem_t;  const uint32_t sectors[4]={ SECTORA, SECTORB, SECTORC, SECTORD };  uint32_t last_eeprom_word = 0; \/\/ \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 uint32_t eeprom_word = 0; \/\/ \u0422\u0435\u043a\u0443\u0449\u0435\u0435 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 uint32_t sector = 0; \/\/ \u0422\u0435\u043a\u0443\u0449\u0438\u0439 \u0441\u0435\u043a\u0442\u043e\u0440 uint32_t position = 0; \/\/ \u0422\u0435\u043a\u0443\u0449\u0430\u044f \u043f\u043e\u0437\u0438\u0446\u0438\u044f \u0432 \u0441\u0435\u043a\u0442\u043e\u0440\u0435  \/**----------------------------------------------------------------------------   * @brief  Program delay.   * @param  loops: Number of the loops.   * @retval None.   *\/ __RAMFUNC static void ProgramDelay(uint32_t loops) {   volatile uint32_t i = loops;   for (; i > 0; i--)   {   } }  \/**-----------------------------------------------------------------------------   * @brief  \u0421\u0442\u0438\u0440\u0430\u043d\u0438\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u0441\u0435\u043a\u0442\u043e\u0440\u0430.   * @param  adress: \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u0430\u0434\u0440\u0435\u0441 \u0441\u0435\u043a\u0442\u043e\u0440\u0430.   * @param  bankSelector: \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0439 \u0431\u0430\u043d\u043a \u043f\u0430\u043c\u044f\u0442\u0438.   * @retval None.   *\/ __RAMFUNC void EEPROM_EraseSector(uint32_t address, uint32_t bankSelector) { uint32_t Command; assert_param(IS_EEPROM_BANK_SELECTOR(BankSelector)); MDR_EEPROM->KEY = EEPROM_REG_ACCESS_KEY; Command = (MDR_EEPROM->CMD &amp; EEPROM_CMD_DELAY_Msk) | EEPROM_CMD_CON; Command |= (bankSelector == EEPROM_Info_Bank_Select) ? EEPROM_CMD_IFREN : 0; MDR_EEPROM->CMD = Command; MDR_EEPROM->ADR = address; \/\/ Page Address MDR_EEPROM->DI = 0; Command |= EEPROM_CMD_XE | EEPROM_CMD_ERASE; MDR_EEPROM->CMD = Command; ProgramDelay(GET_US_LOOPS(5)); \/\/ Wait for 5 us Command |= EEPROM_CMD_NVSTR; MDR_EEPROM->CMD = Command; ProgramDelay(GET_US_LOOPS(40000)); \/\/ Wait for 40 ms Command &amp;= ~EEPROM_CMD_ERASE; MDR_EEPROM->CMD = Command; ProgramDelay(GET_US_LOOPS(5)); \/\/ Wait for 5 us Command &amp;= ~(EEPROM_CMD_XE | EEPROM_CMD_NVSTR); MDR_EEPROM->CMD = Command; ProgramDelay(GET_US_LOOPS(1)); \/\/ Wait for 1 us Command &amp;= EEPROM_CMD_DELAY_Msk; MDR_EEPROM->CMD = Command; MDR_EEPROM->KEY = 0; }  \/**-----------------------------------------------------------------------------   * @brief  \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.   * @param  adress: \u0430\u0434\u0440\u0435\u0441\u0441 \u044f\u0447\u0435\u043a\u0438 \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f.   * @param  bankSelector: \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0439 \u0431\u0430\u043d\u043a \u043f\u0430\u043c\u044f\u0442\u0438.   * @param  value: \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u0437 \u043f\u0430\u043c\u044f\u0442\u0438.   * @retval \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438.   *\/ rc_mem_t GetWord(uint32_t address, uint32_t bankSelector, uint32_t * value) {   rc_mem_t ret = 0; counter_value_t count; uint8_t crc = 0; address -= address % 4; __disable_irq(); count.value = EEPROM_ReadWord (address, bankSelector); __enable_irq(); crc = getCRC8byTable( count.val, 3); if (count.value == 0xFFFFFFFF)   ret = RC_EMPTY;   else if (count.crc != crc)   ret = RC_CRCERR;   else   {   ret = RC_OK;     *value = count.value &amp; 0x00FFFFFF;   } return ret; }  \/**-----------------------------------------------------------------------------   * @brief  \u0417\u0430\u043f\u0438\u0441\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u043f\u0430\u043c\u044f\u0442\u044c.   * @param  adress: \u0430\u0434\u0440\u0435\u0441\u0441 \u044f\u0447\u0435\u043a\u0438 \u0434\u043b\u044f \u0437\u0430\u043f\u0438\u0441\u0438.   * @param  bankSelector: \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0439 \u0431\u0430\u043d\u043a \u043f\u0430\u043c\u044f\u0442\u0438.   * @param  value: \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u044f\u0447\u0435\u0439\u043a\u0443 \u043f\u0430\u043c\u044f\u0442\u0438.   * @retval \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438.   *\/ void SetWord(uint32_t address, uint32_t bankSelector, uint32_t value) { counter_value_t count; address -= address%4; memcpy( count.val, &amp;value, 3); count.crc = getCRC8byTable( count.val, 3); __disable_irq(); EEPROM_ProgramWord ( address, bankSelector, count.value); __enable_irq(); }  \/**-----------------------------------------------------------------------------   * @brief  \u0412\u0435\u0434\u0435\u043d\u0438\u0435 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430.   * @param  \u041d\u0435\u0442.   * @retval \u041d\u0435\u0442.   *\/ void Moto() { static uint8_t isFirst = 1; uint32_t i = 0;   rc_mem_t ret = 0; \/\/ \u043f\u043e\u0438\u0441\u043a \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0441\u0435\u043a\u0442\u043e\u0440\u0430 for (i = sector, last_eeprom_word = 0; i &lt; 4; i++) { ret = GetWord(sectors[i], BANK_SELECT, &amp;eeprom_word); if ( ret == RC_EMPTY || ret == RC_CRCERR || eeprom_word &lt; last_eeprom_word) break; else { sector = i; last_eeprom_word = eeprom_word; } }   \/\/ \u043f\u043e\u0438\u0441\u043a \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u0432 \u0441\u0435\u043a\u0442\u043e\u0440\u0435 for (i = 0; i &lt; WORDS; i++) { ret = GetWord(sectors[sector] + i * 16, BANK_SELECT, &amp;eeprom_word); if (ret == RC_EMPTY) break; else if (ret != RC_EMPTY) last_eeprom_word = eeprom_word + 1; } position = i;   if (isFirst)   {   isFirst = 0;     return;   } \/\/ \u0441\u0442\u0438\u0440\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0441\u0435\u043a\u0442\u043e\u0440, \u0435\u0441\u043b\u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u0442\u044c \u0441\u043d\u0430\u0447\u0430\u043b\u0430 if (position == WORDS) { position = 0; sector++;     if(sector == SECTORS )     sector = 0; __disable_irq(); EEPROM_EraseSector(sectors[sector], BANK_SELECT); __enable_irq(); } \/\/ \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 + 1  SetWord(sectors[sector] + position * 16, BANK_SELECT, last_eeprom_word); }  \/**----------------------------------------------------------------------------   * @brief  \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.   * @param  \u041d\u0435\u0442.   * @retval \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430.   *\/ uint32_t GetMoto() { return last_eeprom_word; }  \/**-----------------------------------------------------------------------------   * @brief  \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430.   * @param  value: \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430.   * @retval \u041d\u0435\u0442.   *\/ void SetMoto(uint32_t value) { __disable_irq(); EEPROM_ErasePage (PAGE, BANK_SELECT); __enable_irq(); sector = 0; position = 0; last_eeprom_word = value; SetWord(sectors[sector] + position * 16, BANK_SELECT, value); } <\/code><\/pre>\n<p>\u0421\u0442\u043e\u0438\u0442 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u043f\u0440\u0438 \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 EEPROM \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u044b\u043c \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u043e\u043c \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0437\u0430\u0449\u0438\u0442\u044b \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f\u0445, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f\u0445 \u043f\u043e \u043a\u043e\u043c\u043f\u0430\u0440\u0430\u0442\u043e\u0440\u0443. <\/p>\n<p>\u0414\u0430\u043d\u043d\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u043e\u0448\u0438\u0431\u043e\u043a \u0438 \u043d\u0435 \u043f\u0440\u0435\u0442\u0435\u043d\u0434\u0443\u0435\u0442 \u043d\u0430 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0443\u044e \u043f\u043e\u043b\u043d\u043e\u0442\u0443 \u043e\u0445\u0432\u0430\u0442\u0430 \u0440\u0435\u0448\u0430\u0435\u043c\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b. \u041c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u0442\u044c \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u0438 \u0442.\u0434.<\/p>\n<p>\u0418, \u043d\u0430 \u0432\u0441\u044f\u043a\u0438\u0439 \u0441\u043b\u0443\u0447\u0430\u0439, \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0441\u0443\u043c\u043c\u044b CRC8 \u0442\u0430\u0431\u043b\u0438\u0447\u043d\u044b\u043c \u043c\u0435\u0442\u043e\u0434\u043e\u043c.<\/p>\n<pre><code class=\"cpp\">#include &lt;stdint.h>  const uint8_t crc8tab[256] =  { 0x00, 0x31, 0x62, 0x53, 0xC4, 0xF5, 0xA6, 0x97,   0xB9, 0x88, 0xDB, 0xEA, 0x7D, 0x4C, 0x1F, 0x2E,   0x43, 0x72, 0x21, 0x10, 0x87, 0xB6, 0xE5, 0xD4,   0xFA, 0xCB, 0x98, 0xA9, 0x3E, 0x0F, 0x5C, 0x6D,   0x86, 0xB7, 0xE4, 0xD5, 0x42, 0x73, 0x20, 0x11,   0x3F, 0x0E, 0x5D, 0x6C, 0xFB, 0xCA, 0x99, 0xA8,   0xC5, 0xF4, 0xA7, 0x96, 0x01, 0x30, 0x63, 0x52,   0x7C, 0x4D, 0x1E, 0x2F, 0xB8, 0x89, 0xDA, 0xEB,   0x3D, 0x0C, 0x5F, 0x6E, 0xF9, 0xC8, 0x9B, 0xAA,   0x84, 0xB5, 0xE6, 0xD7, 0x40, 0x71, 0x22, 0x13,   0x7E, 0x4F, 0x1C, 0x2D, 0xBA, 0x8B, 0xD8, 0xE9,   0xC7, 0xF6, 0xA5, 0x94, 0x03, 0x32, 0x61, 0x50,   0xBB, 0x8A, 0xD9, 0xE8, 0x7F, 0x4E, 0x1D, 0x2C,   0x02, 0x33, 0x60, 0x51, 0xC6, 0xF7, 0xA4, 0x95,   0xF8, 0xC9, 0x9A, 0xAB, 0x3C, 0x0D, 0x5E, 0x6F,   0x41, 0x70, 0x23, 0x12, 0x85, 0xB4, 0xE7, 0xD6,   0x7A, 0x4B, 0x18, 0x29, 0xBE, 0x8F, 0xDC, 0xED,   0xC3, 0xF2, 0xA1, 0x90, 0x07, 0x36, 0x65, 0x54,   0x39, 0x08, 0x5B, 0x6A, 0xFD, 0xCC, 0x9F, 0xAE,   0x80, 0xB1, 0xE2, 0xD3, 0x44, 0x75, 0x26, 0x17,   0xFC, 0xCD, 0x9E, 0xAF, 0x38, 0x09, 0x5A, 0x6B,   0x45, 0x74, 0x27, 0x16, 0x81, 0xB0, 0xE3, 0xD2,   0xBF, 0x8E, 0xDD, 0xEC, 0x7B, 0x4A, 0x19, 0x28,   0x06, 0x37, 0x64, 0x55, 0xC2, 0xF3, 0xA0, 0x91,   0x47, 0x76, 0x25, 0x14, 0x83, 0xB2, 0xE1, 0xD0,   0xFE, 0xCF, 0x9C, 0xAD, 0x3A, 0x0B, 0x58, 0x69,   0x04, 0x35, 0x66, 0x57, 0xC0, 0xF1, 0xA2, 0x93,   0xBD, 0x8C, 0xDF, 0xEE, 0x79, 0x48, 0x1B, 0x2A,   0xC1, 0xF0, 0xA3, 0x92, 0x05, 0x34, 0x67, 0x56,   0x78, 0x49, 0x1A, 0x2B, 0xBC, 0x8D, 0xDE, 0xEF,   0x82, 0xB3, 0xE0, 0xD1, 0x46, 0x77, 0x24, 0x15,   0x3B, 0x0A, 0x59, 0x68, 0xFF, 0xCE, 0x9D, 0xAC };  \/\/----------------------------------------------------------------------------- \/\/ \/\/ getCRC8byTable \/\/ \/\/ Calculation of the CRC-8 \/\/ \/\/ Parametric model of CRC-8 algorithm: \/\/ Name  : CRC-8 \/\/ Poly  : 0x31    x^8 + x^5 + x^4 + 1 \/\/ Init  : 0xFF \/\/ Revert: false \/\/ XorOut: 0x00 \/\/ Check : 0xF7 (\"123456789\") \/\/ MaxLen: 15 bytes(127 bits) - detection of single, dual,  \/\/triple and all odd errors \/\/ uint8_t getCRC8byTable(uint8_t* arr, uint16_t len ) { uint8_t crc8 = 0xff; unsigned int i; for(  i = 0; i&lt; len; i++) { crc8 = crc8tab[ crc8 ^ arr[i] ]; } return crc8; }  \/\/----------------------------------------------------------------------------- \/\/ \/\/ getCRC8 \/\/ \/\/ calculation of the CRC directly \/\/ \/\/ Parametric model of CRC-8 algorithm: \/\/ Name  : CRC-8 \/\/ Poly  : 0x31    x^8 + x^5 + x^4 + 1 \/\/ Init  : 0xFF \/\/ Revert: false \/\/ XorOut: 0x00 \/\/ Check : 0xF7 (\"123456789\") \/\/ MaxLen: 15 bytes(127 bits) - detection of single, dual,  \/\/triple and all odd errors \/\/ uint8_t getCRC8(uint8_t *pcBlock, uint16_t len ) { uint8_t crc = 0xff; unsigned int i; while (len--) { crc ^= *pcBlock++; for (i = 0; i &lt; 8; i++)       crc = crc &amp; 0x80 ? (crc &lt;&lt; 1) ^ 0x31 : crc &lt;&lt; 1; } return crc; }<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/571172\/\"> https:\/\/habr.com\/ru\/articles\/571172\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0417\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439\u0442\u0435. \u0425\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u043c \u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438\u0437\u0434\u0435\u043b\u0438\u044f \u043d\u0430 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0435 1986BE92QI \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 \u0421\u0438.<\/p>\n<p>\u041e\u0447\u0435\u043d\u044c \u0447\u0430\u0441\u0442\u043e \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u043e\u0442\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0432\u0440\u0435\u043c\u044f, \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u043e\u0435 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u043c. \u0414\u043b\u044f \u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430 \u043d\u0430\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0438 \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u0430\u0436\u0434\u0443\u044e \u043c\u0438\u043d\u0443\u0442\u0443, \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0445\u0440\u0430\u043d\u044f\u0449\u0435\u0435\u0441\u044f \u0432 \u044f\u0447\u0435\u0439\u043a\u0435 \u044d\u043d\u0435\u0440\u0433\u043e\u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 EEPROM. \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0440\u0435\u0441\u0443\u0440\u0441 \u0446\u0438\u043a\u043b\u043e\u0432 \u0437\u0430\u043f\u0438\u0441\u0438 \u0438 \u0441\u0442\u0438\u0440\u0430\u043d\u0438\u044f \u044d\u0442\u0438\u0445 \u044f\u0447\u0435\u0435\u043a \u043f\u0430\u043c\u044f\u0442\u0438 \u043e\u0431\u044b\u0447\u043d\u043e \u043c\u0430\u043b \u0438 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u043a\u043e\u043b\u043e 10.000 \u0446\u0438\u043a\u043b\u043e\u0432 (\u043f\u043e \u043e\u0446\u0435\u043d\u043a\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044f). \u0417\u043d\u0430\u0447\u0438\u0442, \u0435\u0441\u043b\u0438 \u0441\u0442\u0438\u0440\u0430\u0442\u044c \u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 \u043e\u0434\u043d\u0443 \u0438 \u0442\u0443\u0436\u0435 \u044f\u0447\u0435\u0439\u043a\u0443 \u043f\u0430\u043c\u044f\u0442\u0438 \u0441 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u043e\u043c \u0432 1 \u043c\u0438\u043d\u0443\u0442\u0443, \u0442\u043e \u0440\u0435\u0441\u0443\u0440\u0441 \u044f\u0447\u0435\u0439\u043a\u0438 \u0431\u0443\u0434\u0435\u0442 \u0438\u0437\u0440\u0430\u0441\u0445\u043e\u0434\u043e\u0432\u0430\u043d \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0437\u0430 \u043d\u0435\u0434\u0435\u043b\u044e. \u0414\u043b\u044f \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0435 \u043e\u0434\u043d\u0443 \u044f\u0447\u0435\u0439\u043a\u0443, \u0430 \u0432\u0441\u0435 \u044f\u0447\u0435\u0439\u043a\u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0439, \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043f\u0430\u043c\u044f\u0442\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439. \u042d\u0442\u043e \u0434\u0430\u0441\u0442 \u043d\u0430\u043c 1024 * 10.000 \u0437\u0430\u043f\u0430\u0441 \u0446\u0438\u043a\u043b\u043e\u0432 \u0437\u0430\u043f\u0438\u0441\u0438 \u0438 \u0441\u0442\u0438\u0440\u0430\u043d\u0438\u044f, \u0447\u0442\u043e \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u043e, \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e 19 \u0433\u043e\u0434\u0430\u043c \u043f\u0440\u0438 \u0435\u0436\u0435\u043c\u0438\u043d\u0443\u0442\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430. \u0418\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u0436\u0435 \u0434\u0432\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439. \u0412 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0435 1986BE92QI \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b 32 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u044d\u043d\u0435\u0440\u0433\u043e\u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u0434\u043b\u044f \u0437\u0430\u043f\u0438\u0441\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0438 1 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u044d\u043d\u0435\u0440\u0433\u043e\u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u043f\u043e 4 \u043a\u0431\u0430\u0439\u0442. \u041a\u0430\u0436\u0434\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u043f\u043e\u0434\u0435\u043b\u0435\u043d\u0430 \u043d\u0430 4 \u0441\u0435\u043a\u0442\u043e\u0440\u0430 (SECTOR_A, SECTOR_B, SECTOR_C, SECTOR_D). \u0420\u0430\u0437\u0431\u0438\u0442\u0438\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043d\u0430 \u0441\u0435\u043a\u0442\u043e\u0440\u0430 \u0434\u0430\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u0442\u0438\u0440\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043d\u0435 \u0446\u0435\u043b\u0438\u043a\u043e\u043c, \u0430 \u043f\u043e\u0431\u043b\u043e\u0447\u043d\u043e \u043f\u043e 256 \u0447\u0435\u0442\u044b\u0440\u0435\u0445 \u0431\u0430\u0439\u0442\u043d\u044b\u0445 \u0441\u043b\u043e\u0432\u0430 \u0432 \u0447\u0435\u0442\u044b\u0440\u0435 \u044d\u0442\u0430\u043f\u0430.<\/p>\n<p>\u0418\u0442\u0430\u043a, \u0434\u043b\u044f \u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430 \u043d\u0430\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c. \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u044f\u0447\u0435\u0439\u043a\u0443 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0441\u0435\u043a\u0442\u043e\u0440\u0430 (SECTOR_A). \u0427\u0435\u0440\u0435\u0437 \u043c\u0438\u043d\u0443\u0442\u0443 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430 \u0438 \u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u043e \u0432\u0442\u043e\u0440\u0443\u044e \u044f\u0447\u0435\u0439\u043a\u0443 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0441\u0435\u043a\u0442\u043e\u0440\u0430 \u0438 \u0442\u0430\u043a \u0434\u043e \u043a\u043e\u043d\u0446\u0430 \u0441\u0435\u043a\u0442\u043e\u0440\u0430. \u0417\u0430\u0442\u0435\u043c \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0441\u0435\u043a\u0442\u043e\u0440 (SECTOR_B), \u043d\u043e \u043f\u0435\u0440\u0435\u0434 \u0437\u0430\u043f\u0438\u0441\u044c\u044e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441\u0442\u0438\u0440\u0430\u043d\u0438\u0435 \u044d\u0442\u043e\u0433\u043e \u0441\u0435\u043a\u0442\u043e\u0440\u0430 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0437\u0430\u043f\u0438\u0441\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u044f\u0447\u0435\u0439\u043a\u0443 \u0441\u0435\u043a\u0442\u043e\u0440\u0430 B, \u0437\u0430\u0442\u0435\u043c \u0432\u043e \u0432\u0442\u043e\u0440\u0443\u044e \u044f\u0447\u0435\u0439\u043a\u0443 \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435 \u0434\u043e \u043a\u043e\u043d\u0446\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b. \u0417\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0432\u0441\u0435\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0437\u0430 1024 \u043c\u0438\u043d\u0443\u0442\u044b. \u041a\u043e\u0433\u0434\u0430 \u0432\u0441\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0430 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u043d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0441\u0435\u043a\u0442\u043e\u0440 SECTOR_A, \u043e\u043d \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0447\u0438\u0449\u0430\u0435\u0442\u0441\u044f, \u0442.\u043a. \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0432\u0448\u0438\u0435\u0441\u044f \u0442\u0430\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430\u043c \u0443\u0436\u0435 \u043d\u0435 \u043d\u0443\u0436\u043d\u044b, \u0432\u0435\u0434\u044c \u0441\u0430\u043c\u044b\u0435 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u0441\u0435\u043a\u0442\u043e\u0440\u0435 D. \u0418 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u0442\u0441\u044f \u0437\u0430\u043f\u0438\u0441\u044c \u0434\u0430\u043d\u043d\u044b\u0445 \u0443\u0436\u0435 \u0432 \u043f\u0435\u0440\u0432\u044b\u0439 \u0441\u0435\u043a\u0442\u043e\u0440.<\/p>\n<p>\u041a\u0430\u0436\u0434\u043e\u0435 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c\u043e\u0435 \u0432 \u044f\u0447\u0435\u0439\u043a\u0443 \u043f\u0430\u043c\u044f\u0442\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0447\u0435\u0442\u044b\u0440\u0435\u0445 \u0431\u0430\u0439\u0442. \u0412 \u043f\u0435\u0440\u0432\u044b\u0445 \u0442\u0440\u0435\u0445 \u0431\u0430\u0439\u0442\u0430\u0445 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u0430\u043c\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430 \u043c\u0438\u043d\u0443\u0442. \u0412 \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043e\u043c \u0431\u0430\u0439\u0442\u0435 8 \u0431\u0438\u0442\u043d\u0430\u044f, \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u043d\u043d\u0430\u044f \u0434\u043b\u044f \u044d\u0442\u0438\u0445 \u0442\u0440\u0435\u0445 \u0431\u0430\u0439\u0442 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u0430\u044f \u0441\u0443\u043c\u043c\u0430 CRC8. \u042d\u0442\u0430 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u0430\u044f \u0441\u0443\u043c\u043c\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u0438\u0441\u043f\u043e\u0440\u0447\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u041d\u0438\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0430 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u0432 \u043f\u0430\u043c\u044f\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430 \u0441 \u0442\u0440\u0435\u043c\u044f \u0431\u0430\u0439\u0442\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 uint8_t val[3] \u0438 \u0431\u0430\u0439\u0442\u043e\u043c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0441\u0443\u043c\u043c\u044b uint8_t crc.<\/p>\n<pre><code class=\"cpp\">typedef struct  {   union    {     struct      {       uint8_t val[3];       uint8_t crc; }; uint32_t value; }; } counter_value_t;<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u0430\u044f \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u0430\u044f \u0441\u0443\u043c\u043c\u0430 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0442\u044c \u0441 \u043f\u043e\u0434\u0441\u0447\u0438\u0442\u0430\u043d\u043d\u043e\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0441\u0443\u043c\u043c\u043e\u0439, \u0442\u043e \u044d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u044f\u0447\u0435\u0439\u043a\u0435 \u0438\u0441\u043f\u043e\u0440\u0447\u0435\u043d\u044b \u0438 \u0438\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u043b\u044c\u0437\u044f \u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u0437\u044f\u0442\u044c \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043c\u0438\u043d\u0443\u0442. \u041f\u043e\u0442\u0435\u0440\u044f \u043e\u0434\u043d\u043e\u0439-\u0434\u0432\u0443\u0445 \u043c\u0438\u043d\u0443\u0442 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u043e\u0439, \u0435\u0441\u043b\u0438 \u043d\u0430\u0434\u043e \u043f\u043e\u0434\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043b\u0435\u0442 \u043d\u0430\u0440\u0430\u0431\u043e\u0442\u043a\u0438. <\/p>\n<p>\u0418\u0441\u043f\u043e\u0440\u0442\u0438\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0442\u0430\u043a\u0436\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0435\u0442 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043f\u0438\u0442\u0430\u043d\u0438\u044f \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u044f\u0447\u0435\u0439\u043a\u0443 EEPROM. \u041d\u0430\u043b\u0438\u0447\u0438\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0441\u0443\u043c\u043c\u044b \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u0438\u0441\u043f\u043e\u0440\u0447\u0435\u043d\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u0438 \u0437\u0430\u043f\u0438\u0441\u0438.<\/p>\n<p>\u041f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u0439 \u044f\u0447\u0435\u0439\u043a\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b, \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430 \u0438 \u0438\u0449\u0435\u0442\u0441\u044f \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043d\u0435 \u0438\u0441\u043f\u043e\u0440\u0447\u0435\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u0421 \u0430\u0434\u0440\u0435\u0441\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0437\u0430 \u044d\u0442\u0438\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u0441\u044f \u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430 \u0432 \u043f\u0430\u043c\u044f\u0442\u044c. <\/p>\n<p>\u0412 \u043b\u0438\u0441\u0442\u0438\u043d\u0433\u0435 \u043d\u0438\u0436\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u043a\u043e\u0434 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 \u0421\u0438 \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430.<\/p>\n<pre><code class=\"cpp\">#include &lt;MDR32Fx.h>  #include &lt;stdlib.h> #include &lt;crc8.h> #include &lt;MDR32F9Qx_eeprom.h> #include &lt;stdint.h> #include &lt;MDR32F9Qx_config.h> #include &lt;MDR32F9Qx_eeprom.h>  \/\/ \u0421\u0442\u0430\u0440\u0442\u043e\u0432\u044b\u0439 \u0430\u0434\u0440\u0435\u0441 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0434\u043b\u044f \u0437\u0430\u043f\u0438\u0441\u0438. #define PAGE    0x0801F000 #define SECTORA (PAGE)  #define SECTORB (PAGE + 0x04) #define SECTORC (PAGE + 0x08) #define SECTORD (PAGE + 0x0C)  \/\/ \u041a\u043e\u043b-\u0432\u043e \u0441\u0435\u043a\u0442\u043e\u0440\u043e\u0432 \u0432 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 #define SECTORS 4 \/\/ \u041a\u043e\u043b-\u0432\u043e 32 \u0431\u0438\u0442\u043d\u044b\u0445 \u0441\u043b\u043e\u0432 \u0432 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 #define WORDS 256 \/\/ EEPROM Bank Selector #define BANK_SELECT EEPROM_Main_Bank_Select  #define EEPROM_REG_ACCESS_KEY ((uint32_t)0x8AAA5551) #define DELAY_LOOP_CYCLES (8UL) #define GET_US_LOOPS(N) ((uint32_t)((float)(N) * FLASH_PROG_FREQ_MHZ \/ DELAY_LOOP_CYCLES))  #pragma anon_unions typedef struct  { union    { struct      {     uint8_t val[3]; \/\/ \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430 uint8_t crc; \/\/ \u041a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u0430\u044f \u0441\u0443\u043c\u043c\u0430 }; uint32_t value; }; } counter_value_t;  typedef enum {     RC_OK = 0,     RC_EMPTY = 1,     RC_CRCERR = 2 }rc_mem_t;  const uint32_t sectors[4]={ SECTORA, SECTORB, SECTORC, SECTORD };  uint32_t last_eeprom_word = 0; \/\/ \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 uint32_t eeprom_word = 0; \/\/ \u0422\u0435\u043a\u0443\u0449\u0435\u0435 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 uint32_t sector = 0; \/\/ \u0422\u0435\u043a\u0443\u0449\u0438\u0439 \u0441\u0435\u043a\u0442\u043e\u0440 uint32_t position = 0; \/\/ \u0422\u0435\u043a\u0443\u0449\u0430\u044f \u043f\u043e\u0437\u0438\u0446\u0438\u044f \u0432 \u0441\u0435\u043a\u0442\u043e\u0440\u0435  \/**----------------------------------------------------------------------------   * @brief  Program delay.   * @param  loops: Number of the loops.   * @retval None.   *\/ __RAMFUNC static void ProgramDelay(uint32_t loops) {   volatile uint32_t i = loops;   for (; i > 0; i--)   {   } }  \/**-----------------------------------------------------------------------------   * @brief  \u0421\u0442\u0438\u0440\u0430\u043d\u0438\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u0441\u0435\u043a\u0442\u043e\u0440\u0430.   * @param  adress: \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u0430\u0434\u0440\u0435\u0441 \u0441\u0435\u043a\u0442\u043e\u0440\u0430.   * @param  bankSelector: \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0439 \u0431\u0430\u043d\u043a \u043f\u0430\u043c\u044f\u0442\u0438.   * @retval None.   *\/ __RAMFUNC void EEPROM_EraseSector(uint32_t address, uint32_t bankSelector) { uint32_t Command; assert_param(IS_EEPROM_BANK_SELECTOR(BankSelector)); MDR_EEPROM->KEY = EEPROM_REG_ACCESS_KEY; Command = (MDR_EEPROM->CMD &amp; EEPROM_CMD_DELAY_Msk) | EEPROM_CMD_CON; Command |= (bankSelector == EEPROM_Info_Bank_Select) ? EEPROM_CMD_IFREN : 0; MDR_EEPROM->CMD = Command; MDR_EEPROM->ADR = address; \/\/ Page Address MDR_EEPROM->DI = 0; Command |= EEPROM_CMD_XE | EEPROM_CMD_ERASE; MDR_EEPROM->CMD = Command; ProgramDelay(GET_US_LOOPS(5)); \/\/ Wait for 5 us Command |= EEPROM_CMD_NVSTR; MDR_EEPROM->CMD = Command; ProgramDelay(GET_US_LOOPS(40000)); \/\/ Wait for 40 ms Command &amp;= ~EEPROM_CMD_ERASE; MDR_EEPROM->CMD = Command; ProgramDelay(GET_US_LOOPS(5)); \/\/ Wait for 5 us Command &amp;= ~(EEPROM_CMD_XE | EEPROM_CMD_NVSTR); MDR_EEPROM->CMD = Command; ProgramDelay(GET_US_LOOPS(1)); \/\/ Wait for 1 us Command &amp;= EEPROM_CMD_DELAY_Msk; MDR_EEPROM->CMD = Command; MDR_EEPROM->KEY = 0; }  \/**-----------------------------------------------------------------------------   * @brief  \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.   * @param  adress: \u0430\u0434\u0440\u0435\u0441\u0441 \u044f\u0447\u0435\u043a\u0438 \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f.   * @param  bankSelector: \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0439 \u0431\u0430\u043d\u043a \u043f\u0430\u043c\u044f\u0442\u0438.   * @param  value: \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u0437 \u043f\u0430\u043c\u044f\u0442\u0438.   * @retval \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438.   *\/ rc_mem_t GetWord(uint32_t address, uint32_t bankSelector, uint32_t * value) {   rc_mem_t ret = 0; counter_value_t count; uint8_t crc = 0; address -= address % 4; __disable_irq(); count.value = EEPROM_ReadWord (address, bankSelector); __enable_irq(); crc = getCRC8byTable( count.val, 3); if (count.value == 0xFFFFFFFF)   ret = RC_EMPTY;   else if (count.crc != crc)   ret = RC_CRCERR;   else   {   ret = RC_OK;     *value = count.value &amp; 0x00FFFFFF;   } return ret; }  \/**-----------------------------------------------------------------------------   * @brief  \u0417\u0430\u043f\u0438\u0441\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u043f\u0430\u043c\u044f\u0442\u044c.   * @param  adress: \u0430\u0434\u0440\u0435\u0441\u0441 \u044f\u0447\u0435\u043a\u0438 \u0434\u043b\u044f \u0437\u0430\u043f\u0438\u0441\u0438.   * @param  bankSelector: \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0439 \u0431\u0430\u043d\u043a \u043f\u0430\u043c\u044f\u0442\u0438.   * @param  value: \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u044f\u0447\u0435\u0439\u043a\u0443 \u043f\u0430\u043c\u044f\u0442\u0438.   * @retval \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438.   *\/ void SetWord(uint32_t address, uint32_t bankSelector, uint32_t value) { counter_value_t count; address -= address%4; memcpy( count.val, &amp;value, 3); count.crc = getCRC8byTable( count.val, 3); __disable_irq(); EEPROM_ProgramWord ( address, bankSelector, count.value); __enable_irq(); }  \/**-----------------------------------------------------------------------------   * @brief  \u0412\u0435\u0434\u0435\u043d\u0438\u0435 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430.   * @param  \u041d\u0435\u0442.   * @retval \u041d\u0435\u0442.   *\/ void Moto() { static uint8_t isFirst = 1; uint32_t i = 0;   rc_mem_t ret = 0; \/\/ \u043f\u043e\u0438\u0441\u043a \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0441\u0435\u043a\u0442\u043e\u0440\u0430 for (i = sector, last_eeprom_word = 0; i &lt; 4; i++) { ret = GetWord(sectors[i], BANK_SELECT, &amp;eeprom_word); if ( ret == RC_EMPTY || ret == RC_CRCERR || eeprom_word &lt; last_eeprom_word) break; else { sector = i; last_eeprom_word = eeprom_word; } }   \/\/ \u043f\u043e\u0438\u0441\u043a \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u0432 \u0441\u0435\u043a\u0442\u043e\u0440\u0435 for (i = 0; i &lt; WORDS; i++) { ret = GetWord(sectors[sector] + i * 16, BANK_SELECT, &amp;eeprom_word); if (ret == RC_EMPTY) break; else if (ret != RC_EMPTY) last_eeprom_word = eeprom_word + 1; } position = i;   if (isFirst)   {   isFirst = 0;     return;   } \/\/ \u0441\u0442\u0438\u0440\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0441\u0435\u043a\u0442\u043e\u0440, \u0435\u0441\u043b\u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u0442\u044c \u0441\u043d\u0430\u0447\u0430\u043b\u0430 if (position == WORDS) { position = 0; sector++;     if(sector == SECTORS )     sector = 0; __disable_irq(); EEPROM_EraseSector(sectors[sector], BANK_SELECT); __enable_irq(); } \/\/ \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 + 1  SetWord(sectors[sector] + position * 16, BANK_SELECT, last_eeprom_word); }  \/**----------------------------------------------------------------------------   * @brief  \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.   * @param  \u041d\u0435\u0442.   * @retval \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430.   *\/ uint32_t GetMoto() { return last_eeprom_word; }  \/**-----------------------------------------------------------------------------   * @brief  \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430.   * @param  value: \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430.   * @retval \u041d\u0435\u0442.   *\/ void SetMoto(uint32_t value) { __disable_irq(); EEPROM_ErasePage (PAGE, BANK_SELECT); __enable_irq(); sector = 0; position = 0; last_eeprom_word = value; SetWord(sectors[sector] + position * 16, BANK_SELECT, value); } <\/code><\/pre>\n<p>\u0421\u0442\u043e\u0438\u0442 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u043f\u0440\u0438 \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 EEPROM \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u044b\u043c \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u043e\u043c \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0437\u0430\u0449\u0438\u0442\u044b \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f\u0445, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f\u0445 \u043f\u043e \u043a\u043e\u043c\u043f\u0430\u0440\u0430\u0442\u043e\u0440\u0443. <\/p>\n<p>\u0414\u0430\u043d\u043d\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u043e\u0448\u0438\u0431\u043e\u043a \u0438 \u043d\u0435 \u043f\u0440\u0435\u0442\u0435\u043d\u0434\u0443\u0435\u0442 \u043d\u0430<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-385522","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/385522","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=385522"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/385522\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=385522"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=385522"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=385522"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}