{"id":286479,"date":"2017-05-17T13:05:07","date_gmt":"2017-05-17T09:05:07","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=286479"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2017-05-17T09:05:07","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=286479","title":{"rendered":"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 stm32cube \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u043e \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0445 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u043e\u0432"},"content":{"rendered":"<p><img decoding=\"async\" width=\"400\" src=\"https:\/\/habrastorage.org\/web\/400\/16b\/466\/40016b4660824f82b24531aab0e5f56f.png\" align=\"right\"\/><br \/>  \u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442!<br \/>  \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0431\u044b \u0445\u043e\u0442\u0435\u043b \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u043e\u043f\u044b\u0442\u043e\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u043e\u0432 \u0434\u043b\u044f \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c \u0441\u0435\u0440\u0438\u0438 stm32. \u0418\u0434\u0435\u044f \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0432 <a href=\"https:\/\/github.com\/embox\/embox\">\u041e\u0421 Embox<\/a>, \u043d\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0435\u0440\u0438\u0438 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c STM32F3, STM32F4 \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435. \u0412\u0435\u0434\u044c \u043a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u044d\u0442\u043e \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u0432\u0440\u0435\u043c\u044f, \u043d\u043e\u0432\u044b\u0439 \u043a\u043e\u0434 \u043d\u0435\u0438\u0437\u0431\u0435\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438.<br \/>  <a name=\"habracut\"><\/a><\/p>\n<p>  \u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043c\u044b \u0431\u0440\u0430\u043b\u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u0438 \u043f\u0435\u0440\u0435\u0434\u0435\u043b\u044b\u0432\u0430\u043b\u0438 \u0438\u0445 \u043f\u043e\u0434 \u0441\u0432\u043e\u0438 \u043d\u0443\u0436\u0434\u044b. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432\u0441\u0451-\u0442\u0430\u043a\u0438 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043e\u0431\u0449\u0443\u044e \u0431\u0430\u0437\u0443, \u0438 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0442\u0430\u043a\u043e\u0439 \u0431\u0430\u0437\u044b \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432 (STMicroelectronics) \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 <a href=\"http:\/\/www.st.com\/en\/embedded-software\/stm32cube-embedded-software.html?querycriteria=productId=LN1897\">stm32cube<\/a> (\u0442\u043e\u0447\u043d\u0435\u0435, \u0441\u0435\u0440\u0438\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a). \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0434\u0430\u043d\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u043e\u0435, \u0445\u043e\u0442\u044f \u0438 \u043e\u0447\u0435\u043d\u044c \u0441\u0445\u043e\u0436\u0435\u0435 API \u0434\u043b\u044f \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u0435\u0440\u0438\u0439. \u0412\u0435\u0434\u044c, \u043a\u0430\u043a \u043c\u043d\u043e\u0433\u0438\u0435, \u043d\u0430\u0432\u0435\u0440\u043d\u043e\u0435, \u0437\u043d\u0430\u044e\u0442, \u0432 \u0441\u043e\u0441\u0442\u0430\u0432 stm32cube \u0432\u0445\u043e\u0434\u0438\u0442 stm32cubemx, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u043c \u043a\u043e\u0434\u0430. \u0422\u043e \u0435\u0441\u0442\u044c, \u0441 \u0435\u0433\u043e \u043f\u043e\u043c\u043e\u0449\u044c\u044e, \u043c\u043e\u0436\u043d\u043e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u0440\u043a\u0430\u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043f\u043e\u0434 \u043b\u044e\u0431\u0443\u044e \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443 \u0438\u0437 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0435\u0440\u0438\u0438, \u0438 \u0443\u0436\u0435 \u0432 \u043d\u0451\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c\u0438 \u0434\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0443\u0436\u043d\u044b\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b. \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u044d\u0442\u043e\u043c\u0443, \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u0441\u0438\u043b\u044c\u043d\u043e \u0437\u0430\u0431\u043e\u0442\u0438\u0442\u044c\u0441\u044f \u043e \u0435\u0434\u0438\u043d\u043e\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435.<\/p>\n<p>  \u041d\u043e \u043d\u0430\u043c, \u043a\u0430\u043a \u044f \u0443\u0436\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u043b, \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c stm32cube \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u043e\u0432 \u0441 \u0443\u043d\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c API, \u0432\u0435\u0434\u044c \u044d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u043e \u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0435 \u043e\u0442 \u0443\u0440\u043e\u0432\u043d\u044f \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u041f\u041e \u0431\u043e\u043b\u0435\u0435 \u0432\u044b\u0441\u043e\u043a\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f. \u041a \u0442\u043e\u043c\u0443 \u0436\u0435, \u043a\u0430\u043a \u044f \u0443\u0436\u0435 \u043f\u0438\u0441\u0430\u043b \u0432 \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 <a href=\"https:\/\/habrahabr.ru\/company\/embox\/blog\/255835\/\">\u0441\u0442\u0430\u0442\u0435\u0439<\/a>, \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043c\u0435\u043b\u043a\u0438\u0445 ARM (cortex-m) \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0430\u044e\u0442\u0441\u044f, \u0443\u0441\u043b\u043e\u0432\u043d\u043e, \u043a \u043f\u0435\u043d\u0442\u0438\u0443\u043c\u0430\u043c. \u041c\u043e\u0436\u043d\u043e, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u043a\u0430\u043a \u043a\u0440\u0443\u0442\u044b\u0435 \u0430\u0440\u0434\u0443\u0438\u043d\u043e, \u043d\u043e \u044d\u0442\u043e \u0432\u0440\u044f\u0434 \u043b\u0438 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0440\u0430\u0441\u043a\u0440\u043e\u0435\u0442 \u0438\u0445 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b.<\/p>\n<h3>\u0421\u0442\u0430\u0440\u0442\u043e\u0432\u044b\u0439 \u043a\u043e\u0434 \u0438 \u043b\u0438\u043d\u043a\u0435\u0440-\u0441\u043a\u0440\u0438\u043f\u0442<\/h3>\n<p>  \u041f\u0435\u0440\u0432\u043e\u0435, \u0441 \u0447\u0435\u0433\u043e \u043e\u0431\u044b\u0447\u043d\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u043c, \u0434\u0430 \u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u043c \u0442\u043e\u0436\u0435, \u2014 \u044d\u0442\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u043e\u0447\u043d\u044b\u0439 \u043a\u043e\u0434, \u0432\u0435\u043a\u0442\u043e\u0440 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0439 \u0438 \u043f\u0440\u043e\u0447\u0438\u0435 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043d\u044b\u0435 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438. \u042f \u043a\u0440\u0430\u0442\u043a\u043e \u0437\u0430\u0442\u0440\u043e\u043d\u0443, \u043a\u0430\u043a \u044d\u0442\u043e \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u043d\u043e \u0432 stm32cube. <\/p>\n<p>  \u0412 stm32cube \u0435\u0441\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u0439 \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u044b\u0439 \u043a\u043e\u0434 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430, \u0434\u0430 \u0435\u0449\u0451 \u0438 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 (ARM, AIR \u0438 gcc). \u0412\u0441\u0451 \u044d\u0442\u043e \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043f\u0430\u043f\u043a\u0435 Drivers\/CMSIS\/Device\/ST\/STM32, \u0433\u0434\u0435 XXX \u2014 \u044d\u0442\u043e \u0441\u0435\u0440\u0438\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, F3, F4 \u0438\u043b\u0438 F7.<br \/>  \u0421\u0430\u043c \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u044b\u0439 \u043a\u043e\u0434 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0435\u0440\u0438\u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u041d\u0430\u043c \u0431\u043b\u0438\u0436\u0435 gcc-\u0448\u043d\u044b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 \u0444\u0430\u0439\u043b\u043e\u0432. \u041e\u043d\u0438 \u043b\u0435\u0436\u0430\u0442 \u0432\u043e \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0439 \u043f\u0430\u043f\u043a\u0435 Source\/Templates\/gcc.<br \/>  \u041f\u0440\u0438 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0438 \u043f\u0430\u0440\u044b \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0432 \u043d\u0438\u0445 \u043b\u0435\u0436\u0438\u0442 \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u043e\u0447\u043d\u044b\u0439 \u043a\u043e\u0434, \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0449\u0438\u0439\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0430\u0431\u043b\u0438\u0446\u0435\u0439 (\u0432\u0435\u043a\u0442\u043e\u0440\u043e\u043c) \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0439. \u042d\u0442\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u0435 \u0432\u043f\u043e\u043b\u043d\u0435 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e, \u0432\u0435\u0434\u044c \u0443 \u0440\u0430\u0437\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432 \u0440\u0430\u0437\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432. \u041d\u043e \u043d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u0435\u0441\u043b\u0438 \u0432\u044b\u043d\u0435\u0441\u0442\u0438 \u043e\u0431\u0449\u0438\u0439 \u043a\u043e\u0434 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0444\u0430\u0439\u043b, \u0430 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0439 \u0433\u0435\u043d\u0435\u0440\u0438\u0442\u044c \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u043c \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u044f, \u0441\u0442\u0430\u043d\u0435\u0442 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043b\u0443\u0447\u0448\u0435. \u041f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0442\u0430\u043a \u0443 \u043d\u0430\u0441 \u0432 Embox \u0438 \u0441\u0434\u0435\u043b\u0430\u043d\u043e.<\/p>\n<p>  \u041a\u0440\u043e\u043c\u0435 \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0432 \u044d\u0442\u043e\u0439 \u0436\u0435 \u043f\u0430\u043f\u043a\u0435 \u043b\u0435\u0436\u0430\u0442 \u043b\u0438\u043d\u043a\u0435\u0440-\u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0435\u0440\u0438\u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432. \u041e\u043f\u044f\u0442\u044c \u0436\u0435, \u0435\u0441\u043b\u0438 \u043c\u044b \u0437\u0430\u0433\u043b\u044f\u043d\u0435\u043c \u0432 \u043d\u0438\u0445 \u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u043c, \u0443\u0432\u0438\u0434\u0438\u043c \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u043d\u0438 \u043f\u043e\u0445\u043e\u0436\u0438. \u0420\u0430\u0437\u043b\u0438\u0447\u0438\u044f \u044f \u043d\u0430\u0448\u0435\u043b \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0440\u0430\u0437\u043c\u0435\u0440\u0430\u0445 \u0441\u0435\u043a\u0446\u0438\u0439 \u0438 \u0432 \u043d\u0430\u043b\u0438\u0447\u0438\u0438 \u0441\u0435\u043a\u0446\u0438\u0438 CCMRAM. \u0423 \u0441\u0435\u0431\u044f \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043c\u044b \u0438\u0437\u0431\u0430\u0432\u0438\u043b\u0438\u0441\u044c \u043e\u0442 \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043b\u0438\u043d\u043a\u0435\u0440-\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432, \u0438 \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0435\u0440\u0451\u0442 \u043a\u043e\u043d\u0444\u0438\u0433-\u0444\u0430\u0439\u043b \u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0440\u0435\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430 \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0435\u0433\u043e \u0432 \u043b\u0438\u043d\u043a\u0435\u0440-\u0441\u043a\u0440\u0438\u043f\u0442.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0412\u043e\u0442 \u043a\u0430\u043a, \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u0443 \u043d\u0430\u0441 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0434\u043b\u044f stm32f3-discovery<\/b><\/p>\n<div class=\"spoiler_text\"><code>\/* region (origin, length) *\/<br \/>  ROM (0x08000000, 256K)<br \/>  RAM (0x20000000, 40K)<br \/>  region(SRAM_CCM, 0x10000000, 8K)<\/p>\n<p>  \/* section (region[, lma_region]) *\/<br \/>  text (ROM)<br \/>  rodata (ROM)<br \/>  data (RAM, ROM)<br \/>  bss (RAM)<\/code>  <\/div>\n<\/div>\n<h3>\u041e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441<\/h3>\n<p>  \u0412 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435, \u0437\u0430\u0433\u0440\u0443\u0437\u043e\u0447\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0438 \u043b\u0438\u043d\u043a\u0435\u0440-\u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043e\u0442\u043b\u0430\u0434\u0447\u0438\u043a\u043e\u043c \u0438 \u043f\u043e\u0445\u043e\u0434\u0438\u0442\u044c \u043f\u043e \u0448\u0430\u0433\u0430\u043c. \u041d\u043e \u044d\u0442\u043e\u0433\u043e, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e, \u043c\u0430\u043b\u043e \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u0430\u043a\u043e\u0439-\u043b\u0438\u0431\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b. \u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0440\u0435\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0432\u043d\u0435\u0448\u043d\u0438\u0435 \u0432\u043e\u0437\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0438\u043b\u0438 \u0445\u043e\u0442\u044f \u0431\u044b \u043a\u0430\u043a-\u0442\u043e \u043f\u0440\u043e\u044f\u0432\u043b\u044f\u0442\u044c \u0441\u0435\u0431\u044f. \u0421\u0430\u043c\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u043f\u0440\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u2014 \u044d\u0442\u043e \u043b\u0438\u0431\u043e \u043c\u0438\u0433\u0430\u043d\u0438\u0435 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u043e\u043c, \u043b\u0438\u0431\u043e \u0432\u044b\u0432\u043e\u0434 \u0447\u0435\u0433\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0432 UART (COM \u043f\u043e\u0440\u0442). \u0412 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043f\u0440\u0438\u043d\u044f\u0442\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0442\u044c \u0441 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 diag \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 UART\u0430, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044d\u0442\u043e \u0441\u0438\u043b\u044c\u043d\u043e \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043e\u0442\u043b\u0430\u0434\u043a\u0443.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u0430\u043a \u0438 \u0441\u0430\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 UART, \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u043e\u0440\u0442\u0430 \u0443 \u043d\u0430\u0441 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u0430\u044f<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">const struct uart_ops stm32_uart_ops = {         .uart_getc = stm32_uart_getc,         .uart_putc = stm32_uart_putc,         .uart_hasrx = stm32_uart_hasrx,         .uart_setup = stm32_uart_setup, };  static struct uart stm32_diag = {         .uart_ops = &stm32_uart_ops,         .irq_num = USARTx_IRQn,         .base_addr = (unsigned long) USARTx, };<\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041f\u043e \u0441\u0443\u0442\u0438, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0447\u0435\u0442\u044b\u0440\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0442\u0440\u0438 \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u044b \u2014 \u043e\u043d\u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0438\u0437 \u0441\u0435\u0431\u044f \u0437\u0430\u043f\u0438\u0441\u044c \u0438\u043b\u0438 \u0447\u0442\u0435\u043d\u0438\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0445 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0445 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432. \u0424\u0443\u043d\u043a\u0446\u0438\u044f <code>uart_setup()<\/code> \u043d\u0435 \u0441\u0438\u043b\u044c\u043d\u043e \u0441\u043b\u043e\u0436\u043d\u0435\u0435, \u0432 \u043d\u0435\u0439 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u043e\u0440\u0442\u0430.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0412 \u0438\u0442\u043e\u0433\u0435, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e API \u0438\u0437 STM32CUBE \u043a\u043e\u0434 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c:<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">static int stm32_uart_setup(struct uart *dev, const struct uart_params *params) {     UART_HandleTypeDef UartHandle;      memset(&UartHandle, 0, sizeof(UartHandle));      UartHandle.Instance = (void*) dev-&gt;base_addr;      UartHandle.Init.BaudRate = params-&gt;baud_rate;     UartHandle.Init.WordLength = UART_WORDLENGTH_8B;     UartHandle.Init.StopBits = UART_STOPBITS_1;     UartHandle.Init.Parity = UART_PARITY_NONE;     UartHandle.Init.HwFlowCtl = UART_HWCONTROL_NONE;     UartHandle.Init.Mode = UART_MODE_TX_RX;      if (HAL_UART_Init(&UartHandle) != HAL_OK) {         return -1;     }      if (dev-&gt;params.irq) {         \/* Enable the UART Data Register not empty Interrupt *\/         __HAL_UART_ENABLE_IT(&UartHandle, UART_IT_RXNE);     }      return 0; }  static int stm32_uart_putc(struct uart *dev, int ch) {     USART_TypeDef *uart = (void *) dev-&gt;base_addr;      while ((STM32_USART_FLAGS(uart) & USART_FLAG_TXE) == 0);      STM32_USART_TXDATA(uart) = (uint8_t) ch;      return 0; }  static int stm32_uart_hasrx(struct uart *dev) {     USART_TypeDef *uart = (void *) dev-&gt;base_addr;     return STM32_USART_FLAGS(uart) & USART_FLAG_RXNE; }  static int stm32_uart_getc(struct uart *dev) {     USART_TypeDef *uart = (void *) dev-&gt;base_addr;      return (uint8_t)(STM32_USART_RXDATA(uart) & 0xFF); } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b UART \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0432 STM32Cube, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c <code>HAL_UART_MspInit()<\/code> \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0438\u043b\u0438 \u0438\u043d\u043e\u0433\u043e \u0441\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u0430 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432. \u042d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0430 \u043a\u0430\u043a \u0441\u043b\u0430\u0431\u0430\u044f (weak) \u0432 \u0441\u0430\u043c\u043e\u043c cube \u0438 \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430. \u0412\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u043d\u0430 \u0438\u0437 <code>HAL_UART_Init()<\/code> \u0438, \u043f\u043e \u0441\u0443\u0442\u0438, \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442 \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u044b \u0432\u0432\u043e\u0434\u0430-\u0432\u044b\u0432\u043e\u0434\u0430 \u043d\u0443\u0436\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0414\u043b\u044f stm32f4 \u043a\u043e\u0434 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">void HAL_UART_MspInit(UART_HandleTypeDef *huart) {     GPIO_InitTypeDef  GPIO_InitStruct;     void *uart_base = huart-&gt;Instance;      \/*##-1- Enable peripherals and GPIO Clocks #################################*\/     \/* Enable GPIO TX\/RX clock *\/     USART_TX_GPIO_CLK_ENABLE(uart_base);     USART_RX_GPIO_CLK_ENABLE(uart_base);     \/* Enable USART2 clock *\/     USART_CLK_ENABLE(uart_base);      \/*##-2- Configure peripheral GPIO ##########################################*\/     \/* UART TX GPIO pin configuration  *\/     GPIO_InitStruct.Pin       = USART_TX_PIN(uart_base);     GPIO_InitStruct.Mode      = GPIO_MODE_AF_PP;     GPIO_InitStruct.Pull      = GPIO_NOPULL;     GPIO_InitStruct.Speed     = GPIO_SPEED_FREQ_HIGH;     GPIO_InitStruct.Alternate = USART_TX_AF(uart_base);      HAL_GPIO_Init(USART_TX_GPIO_PORT(uart_base), &GPIO_InitStruct);      \/* UART RX GPIO pin configuration  *\/     GPIO_InitStruct.Pin = USART_RX_PIN(uart_base);     GPIO_InitStruct.Alternate = USART_RX_AF(uart_base);      HAL_GPIO_Init(USART_RX_GPIO_PORT(uart_base), &GPIO_InitStruct); }<\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0412 \u041e\u0421 Embox \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e UART-\u043e\u0432 \u0447\u0435\u0440\u0435\u0437 UNIX-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c, \u0442\u043e \u0435\u0441\u0442\u044c, \u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u043a \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0443 \u043f\u043e \u0438\u043c\u0435\u043d\u0438 \u0444\u0430\u0439\u043b\u0430 (\/dev\/ttyS0, \/dev\/ttyS1). \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u044d\u0442\u0443 \u0444\u0438\u0447\u0443 \u0434\u043b\u044f stm32, \u043c\u044b \u043f\u043e\u043a\u0430 \u043d\u0435 \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u043b\u0438 \u043d\u0438\u0447\u0435\u0433\u043e \u043b\u0443\u0447\u0448\u0435, \u0447\u0435\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0435\u0440\u0438\u0438 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u0444\u0430\u0439\u043b, \u0438 \u0432 \u043d\u0451\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u043f\u0440\u0438\u0447\u0435\u043c \u044d\u0442\u043e \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f \u0434\u0430\u0436\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432 \u043f\u043e\u0440\u0442\u0430, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u044b\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u0435\u0440\u0438\u0439 \u0440\u0430\u0437\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0414\u043b\u044f STM32F4 \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">#define MODOPS_USARTX OPTION_GET(NUMBER, usartx)  #if MODOPS_USARTX == 6  #define USARTx                           USART6 #define USARTx_CLK_ENABLE()              __HAL_RCC_USART6_CLK_ENABLE() #define USARTx_RX_GPIO_CLK_ENABLE()      __HAL_RCC_GPIOC_CLK_ENABLE() #define USARTx_TX_GPIO_CLK_ENABLE()      __HAL_RCC_GPIOC_CLK_ENABLE()  #define USARTx_FORCE_RESET()             __HAL_RCC_USART6_FORCE_RESET() #define USARTx_RELEASE_RESET()           __HAL_RCC_USART6_RELEASE_RESET()  \/* Definition for USARTx Pins *\/ #define USARTx_TX_PIN                    GPIO_PIN_6 #define USARTx_TX_GPIO_PORT              GPIOC #define USARTx_TX_AF                     GPIO_AF8_USART6 #define USARTx_RX_PIN                    GPIO_PIN_7 #define USARTx_RX_GPIO_PORT              GPIOC #define USARTx_RX_AF                     GPIO_AF8_USART6  \/* Definition for USARTx's NVIC *\/ #define USARTx_IRQn                      USART6_IRQn + 16 #define USARTx_IRQHandler                USART6_IRQHandler  #elif MODOPS_USARTX == 2 #define USARTx                           USART2 #define USARTx_CLK_ENABLE()              __HAL_RCC_USART2_CLK_ENABLE() #define USARTx_RX_GPIO_CLK_ENABLE()      __HAL_RCC_GPIOA_CLK_ENABLE() #define USARTx_TX_GPIO_CLK_ENABLE()      __HAL_RCC_GPIOA_CLK_ENABLE()  #define USARTx_FORCE_RESET()             __HAL_RCC_USART2_FORCE_RESET() #define USARTx_RELEASE_RESET()           __HAL_RCC_USART2_RELEASE_RESET()  \/* Definition for USARTx Pins *\/ #define USARTx_TX_PIN                    GPIO_PIN_2 #define USARTx_TX_GPIO_PORT              GPIOA #define USARTx_TX_AF                     GPIO_AF7_USART2 #define USARTx_RX_PIN                    GPIO_PIN_3 #define USARTx_RX_GPIO_PORT              GPIOA #define USARTx_RX_AF                     GPIO_AF7_USART2  \/* Definition for USARTx's NVIC *\/ #define USARTx_IRQn                      USART2_IRQn + 16 #define USARTx_IRQHandler                USART2_IRQHandler #else #error Unsupported USARTx #endif  #define STM32_USART_FLAGS(uart)   uart-&gt;SR #define STM32_USART_RXDATA(uart)  uart-&gt;DR #define STM32_USART_TXDATA(uart)  uart-&gt;DR<\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0414\u043b\u044f STM32F7<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">#define MODOPS_USARTX OPTION_GET(NUMBER, usartx)  #if MODOPS_USARTX == 6  #define USARTx                           USART6 #define USARTx_CLK_ENABLE()              __HAL_RCC_USART6_CLK_ENABLE(); #define USARTx_RX_GPIO_CLK_ENABLE()      __HAL_RCC_GPIOC_CLK_ENABLE() #define USARTx_TX_GPIO_CLK_ENABLE()      __HAL_RCC_GPIOC_CLK_ENABLE()  #define USARTx_FORCE_RESET()             __HAL_RCC_USART6_FORCE_RESET() #define USARTx_RELEASE_RESET()           __HAL_RCC_USART6_RELEASE_RESET()  \/* Definition for USARTx Pins *\/ #define USARTx_TX_PIN                    GPIO_PIN_6 #define USARTx_TX_GPIO_PORT              GPIOC #define USARTx_TX_AF                     GPIO_AF8_USART6 #define USARTx_RX_PIN                    GPIO_PIN_7 #define USARTx_RX_GPIO_PORT              GPIOC #define USARTx_RX_AF                     GPIO_AF8_USART6  \/* Definition for USARTx's NVIC *\/ #define USARTx_IRQn                      USART6_IRQn + 16 #define USARTx_IRQHandler                USART6_IRQHandler  #elif MODOPS_USARTX == 2 #define USARTx                           USART2 #define USARTx_CLK_ENABLE()              __HAL_RCC_USART2_CLK_ENABLE(); #define USARTx_RX_GPIO_CLK_ENABLE()      __HAL_RCC_GPIOA_CLK_ENABLE() #define USARTx_TX_GPIO_CLK_ENABLE()      __HAL_RCC_GPIOA_CLK_ENABLE()  #define USARTx_FORCE_RESET()             __HAL_RCC_USART2_FORCE_RESET() #define USARTx_RELEASE_RESET()           __HAL_RCC_USART2_RELEASE_RESET()  \/* Definition for USARTx Pins *\/ #define USARTx_TX_PIN                    GPIO_PIN_2 #define USARTx_TX_GPIO_PORT              GPIOA #define USARTx_TX_AF                     GPIO_AF7_USART2 #define USARTx_RX_PIN                    GPIO_PIN_3 #define USARTx_RX_GPIO_PORT              GPIOA #define USARTx_RX_AF                     GPIO_AF7_USART2  \/* Definition for USARTx's NVIC *\/ #define USARTx_IRQn                      USART2_IRQn + 16 #define USARTx_IRQHandler                USART2_IRQHandler  #elif MODOPS_USARTX == 1 #define USARTx                           USART1 #define USARTx_CLK_ENABLE()              __HAL_RCC_USART1_CLK_ENABLE(); #define USARTx_RX_GPIO_CLK_ENABLE()      __HAL_RCC_GPIOB_CLK_ENABLE() #define USARTx_TX_GPIO_CLK_ENABLE()      __HAL_RCC_GPIOA_CLK_ENABLE()  #define USARTx_FORCE_RESET()             __HAL_RCC_USART1_FORCE_RESET() #define USARTx_RELEASE_RESET()           __HAL_RCC_USART1_RELEASE_RESET()  \/* Definition for USARTx Pins *\/ #define USARTx_TX_PIN                    GPIO_PIN_9 #define USARTx_TX_GPIO_PORT              GPIOA #define USARTx_TX_AF                     GPIO_AF7_USART1 #define USARTx_RX_PIN                    GPIO_PIN_7 #define USARTx_RX_GPIO_PORT              GPIOB #define USARTx_RX_AF                     GPIO_AF7_USART1  \/* Definition for USARTx's NVIC *\/ #define USARTx_IRQn                      USART1_IRQn + 16 #define USARTx_IRQHandler                USART1_IRQHandler #else #error Unsupported USARTx #endif   #define STM32_USART_FLAGS(uart)   uart-&gt;ISR #define STM32_USART_RXDATA(uart)  uart-&gt;RDR #define STM32_USART_TXDATA(uart)  uart-&gt;TDR<\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0414\u043b\u044f STM32F3<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">#define MODOPS_USARTX OPTION_GET(NUMBER, usartx)  #if MODOPS_USARTX == 1  #define USARTx                           USART1 #define USARTx_CLK_ENABLE()              __USART1_CLK_ENABLE(); #define USARTx_RX_GPIO_CLK_ENABLE()      __GPIOC_CLK_ENABLE() #define USARTx_TX_GPIO_CLK_ENABLE()      __GPIOC_CLK_ENABLE()  #define USARTx_FORCE_RESET()             __USART1_FORCE_RESET() #define USARTx_RELEASE_RESET()           __USART1_RELEASE_RESET()  \/* Definition for USARTx Pins *\/ #define USARTx_TX_PIN                    GPIO_PIN_4 #define USARTx_TX_GPIO_PORT              GPIOC #define USARTx_TX_AF                     GPIO_AF7_USART1 #define USARTx_RX_PIN                    GPIO_PIN_5 #define USARTx_RX_GPIO_PORT              GPIOC #define USARTx_RX_AF                     GPIO_AF7_USART1  \/* Definition for USARTx's NVIC *\/ \/* In Embox we assume that the lower external irq number is 0,  * but in the cortexm3 it is -15 *\/ #define USARTx_IRQn                      USART1_IRQn + 16 #define USARTx_IRQHandler                USART1_IRQHandler  #elif MODOPS_USARTX == 2  #define USARTx                           USART2 #define USARTx_CLK_ENABLE()              __USART2_CLK_ENABLE(); #define USARTx_RX_GPIO_CLK_ENABLE()      __GPIOA_CLK_ENABLE() #define USARTx_TX_GPIO_CLK_ENABLE()      __GPIOA_CLK_ENABLE()  #define USARTx_FORCE_RESET()             __USART2_FORCE_RESET() #define USARTx_RELEASE_RESET()           __USART2_RELEASE_RESET()  \/* Definition for USARTx Pins *\/ #define USARTx_TX_PIN                    GPIO_PIN_2 #define USARTx_TX_GPIO_PORT              GPIOA #define USARTx_TX_AF                     GPIO_AF7_USART2 #define USARTx_RX_PIN                    GPIO_PIN_3 #define USARTx_RX_GPIO_PORT              GPIOA #define USARTx_RX_AF                     GPIO_AF7_USART2  \/* Definition for USARTx's NVIC *\/ \/* In Embox we assume that the lower external irq number is 0,  * but in the cortexm3 it is -15 *\/ #define USARTx_IRQn                      USART2_IRQn + 16 #define USARTx_IRQHandler                USART2_IRQHandler  #elif MODOPS_USARTX == 3  #define USARTx                           USART3 #define USARTx_CLK_ENABLE()              __USART3_CLK_ENABLE(); #define USARTx_RX_GPIO_CLK_ENABLE()      __GPIOB_CLK_ENABLE() #define USARTx_TX_GPIO_CLK_ENABLE()      __GPIOB_CLK_ENABLE()  #define USARTx_FORCE_RESET()             __USART3_FORCE_RESET() #define USARTx_RELEASE_RESET()           __USART3_RELEASE_RESET()  \/* Definition for USARTx Pins *\/ #define USARTx_TX_PIN                    GPIO_PIN_10 #define USARTx_TX_GPIO_PORT              GPIOB #define USARTx_TX_AF                     GPIO_AF7_USART3 #define USARTx_RX_PIN                    GPIO_PIN_11 #define USARTx_RX_GPIO_PORT              GPIOB #define USARTx_RX_AF                     GPIO_AF7_USART3  \/* Definition for USARTx's NVIC *\/ \/* In Embox we assume that the lower external irq number is 0,  * but in the cortexm3 it is -15 *\/ #define USARTx_IRQn                      USART3_IRQn + 16 #define USARTx_IRQHandler                USART3_IRQHandler  #endif  #define STM32_USART_FLAGS(uart)   uart-&gt;ISR #define STM32_USART_RXDATA(uart)  uart-&gt;RDR #define STM32_USART_TXDATA(uart)  uart-&gt;TDR <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0415\u0441\u043b\u0438 \u0437\u0430\u0433\u043b\u044f\u043d\u0435\u0442\u0435 \u0432 \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d\u043d\u044b\u0439 \u043a\u043e\u0434, \u0442\u043e \u0443\u0432\u0438\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0430\u043d\u043e \u0443 \u043d\u0430\u0441 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e \u043f\u0430\u0440\u0435 \u043d\u043e\u043c\u0435\u0440\u043e\u0432 UART-\u043e\u0432 \u0434\u043b\u044f \u0442\u0435\u0445 \u043f\u043b\u0430\u0442 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u043b\u0438. \u0421 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u0437\u0430\u0434\u0430\u0447\u0430 \u0431\u044b\u043b\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430, \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 Embox \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u043b\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \/dev\/ttyS0 \u0438 \/dev\/ttyS1, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u0438 \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d\u044b \u043a \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u044b\u043c \u043f\u043e\u0440\u0442\u0430\u043c UART-\u043e\u0432 \u0441 \u043d\u043e\u043c\u0435\u0440\u0430\u043c \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u043d\u0444\u0438\u0433\u0430<\/b><\/p>\n<div class=\"spoiler_text\"><code>@Runlevel(1) include embox.driver.serial.stm_ttyS1(baud_rate=57600, usartx=2)<br \/>  @Runlevel(1) include embox.driver.serial.stm_ttyS0(baud_rate=115200, usartx=6)<\/code>  <\/div>\n<\/div>\n<p>  <\/p>\n<h3>\u0422\u0430\u0439\u043c\u0435\u0440\u044b \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0439<\/h3>\n<p>  \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0448\u0430\u0433\u043e\u043c \u043f\u0440\u0438 \u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u043e\u0431\u044b\u0447\u043d\u043e \u0438\u0434\u0451\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0442\u0430\u0439\u043c\u0435\u0440\u0430 \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0439. \u0414\u043b\u044f \u044d\u0442\u0438\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u044b \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 \u2014 <a href=\"https:\/\/www.arm.com\/products\/processors\/cortex-m\/cortex-microcontroller-software-interface-standard.php\">CMSIS<\/a> (Cortex Microcontroller Software Interface Standard). \u0423 \u043d\u0430\u0441 \u043e\u043d\u0438 \u0443\u0436\u0435 \u0431\u044b\u043b\u0438 \u0438 \u043f\u0435\u0440\u0435\u0434\u0435\u043b\u044b\u0432\u0430\u0442\u044c \u0438\u0445 \u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c. \u0417\u0430\u0431\u0435\u0433\u0430\u044f \u0432\u043f\u0435\u0440\u0451\u0434, \u0443\u0442\u043e\u0447\u043d\u044e, \u0447\u0442\u043e \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>uint32_t HAL_GetTick(void)<\/code> \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b STM32FCube \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e, \u043d\u0443 \u0438 \u0432 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0435\u0449\u0451 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043f\u043e\u0445\u0438\u043c\u0438\u0447\u0438\u0442\u044c.<\/p>\n<p>  \u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u0445\u043e\u0436\u0430. \u041f\u043e \u0441\u0443\u0442\u0438, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c <code>SystemInit()<\/code> \u0438 <code>HAL_Init()<\/code> \u0438\u0437 stm32cube \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043a\u043b\u043e\u043a\u0438 \u043f\u043e\u0434 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0443\u044e \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0414\u043b\u044f stm32f4<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">static void SystemClock_Config(void) {   RCC_ClkInitTypeDef RCC_ClkInitStruct;   RCC_OscInitTypeDef RCC_OscInitStruct;    \/* Enable Power Control clock *\/   __HAL_RCC_PWR_CLK_ENABLE();    \/* The voltage scaling allows optimizing the power consumption when the device is      clocked below the maximum system frequency, to update the voltage scaling value      regarding system frequency refer to product datasheet.  *\/   __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);    \/* Enable HSE Oscillator and activate PLL with HSE as source *\/   RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;   RCC_OscInitStruct.HSEState = RCC_HSE_ON;   RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;   RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;   RCC_OscInitStruct.PLL.PLLM = 8;   RCC_OscInitStruct.PLL.PLLN = 336;   RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2;   RCC_OscInitStruct.PLL.PLLQ = 7;   HAL_RCC_OscConfig(&RCC_OscInitStruct);    \/* Select PLL as system clock source and configure the HCLK, PCLK1 and PCLK2      clocks dividers *\/   RCC_ClkInitStruct.ClockType = (RCC_CLOCKTYPE_SYSCLK | RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2);   RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;   RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;   RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV4;   RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV2;   HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_5);    \/* STM32F405x\/407x\/415x\/417x Revision Z devices: prefetch is supported  *\/   if (HAL_GetREVID() == 0x1001)   {     \/* Enable the Flash prefetch *\/     __HAL_FLASH_PREFETCH_BUFFER_ENABLE();   } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0414\u043b\u044f stm32f7<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">static void SystemClock_Config(void) {   RCC_ClkInitTypeDef RCC_ClkInitStruct;   RCC_OscInitTypeDef RCC_OscInitStruct;    \/* Enable HSE Oscillator and activate PLL with HSE as source *\/   RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;   RCC_OscInitStruct.HSEState = RCC_HSE_ON;   RCC_OscInitStruct.HSIState = RCC_HSI_OFF;   RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;   RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;   RCC_OscInitStruct.PLL.PLLM = 25;   RCC_OscInitStruct.PLL.PLLN = 432;   RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2;   RCC_OscInitStruct.PLL.PLLQ = 9;   if(HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)   {     printf(&quot;&gt;&gt;&gt; SystemClock_Config failed\\n&quot;);   }    \/* activate the OverDrive to reach the 216 Mhz Frequency *\/   if(HAL_PWREx_EnableOverDrive() != HAL_OK)   {     printf(&quot;&gt;&gt;&gt; SystemClock_Config failed\\n&quot;);   }    \/* Select PLL as system clock source and configure the HCLK, PCLK1 and PCLK2      clocks dividers *\/   RCC_ClkInitStruct.ClockType = (RCC_CLOCKTYPE_SYSCLK | RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2);   RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;   RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;   RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV4;   RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV2;   if(HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_7) != HAL_OK)   {     printf(&quot;&gt;&gt;&gt; SystemClock_Config failed\\n&quot;);    } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0414\u043b\u044f stm32f3<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">static void SystemClock_Config(void) {   RCC_ClkInitTypeDef RCC_ClkInitStruct;   RCC_OscInitTypeDef RCC_OscInitStruct;    \/* Enable HSE Oscillator and activate PLL with HSE as source *\/   RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;   RCC_OscInitStruct.HSEState = RCC_HSE_ON;   RCC_OscInitStruct.HSEPredivValue = RCC_HSE_PREDIV_DIV1;   RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;   RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;   RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL9;   if (HAL_RCC_OscConfig(&RCC_OscInitStruct)!= HAL_OK)   {    \/\/ Error_Handler();   }    \/* Select PLL as system clock source and configure the HCLK, PCLK1 and PCLK2      clocks dividers *\/   RCC_ClkInitStruct.ClockType = (RCC_CLOCKTYPE_SYSCLK | RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2);   RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;   RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;   RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV2;   RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1;   if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2)!= HAL_OK)   {    \/\/ Error_Handler();   } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f \u0438 \u0442\u0430\u0439\u043c\u0435\u0440\u044b, \u0430 \u044d\u0442\u043e\u0433\u043e \u0432\u043f\u043e\u043b\u043d\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0434\u043b\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u044b\u0442\u0435\u0441\u043d\u044f\u044e\u0449\u0435\u0439 \u043c\u043d\u043e\u0433\u043e\u0437\u0430\u0434\u0430\u0447\u043d\u043e\u0441\u0442\u0438. \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0447\u0443\u0432\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0449\u044c \u043c\u043d\u043e\u0433\u043e\u0437\u0430\u0434\u0430\u0447\u043d\u043e\u0441\u0442\u0438 \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430\u0445, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043d\u0430 \u043d\u0438\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u044b http \u0438 telnet, \u043d\u043e \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0440\u0430\u0439\u0432\u0435\u0440 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u043a\u0430\u0440\u0442\u044b. \u0422\u0443\u0442 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u043f\u043e\u0445\u043e\u0436\u0430 \u043d\u0430 UART \u0432 \u0442\u043e\u043c \u0441\u043c\u044b\u0441\u043b\u0435, \u0447\u0442\u043e \u0435\u0441\u0442\u044c \u043e\u0431\u0449\u0438\u0439 \u0434\u0440\u0430\u0439\u0432\u0435\u0440 \u0438 \u0435\u0441\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0430\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0434\u043b\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442 \u043d\u043e\u0433\u0438 \u0438 \u0442\u043e\u043c\u0443 \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0435.<\/p>\n<h3>Ethernet<\/h3>\n<p>  \u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438. \u0423 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f stm32f4 \u0438 stm32f7, \u0442\u0430\u043a \u043a\u0430\u043a \u0443 stm32f3 \u043d\u0435\u0442 ethernet-\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0414\u043b\u044f stm32f4<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">void HAL_ETH_MspInit(ETH_HandleTypeDef *heth) {     \/*(##) Enable the Ethernet interface clock using      (+++) __HAL_RCC_ETHMAC_CLK_ENABLE();      (+++) __HAL_RCC_ETHMACTX_CLK_ENABLE();      (+++) __HAL_RCC_ETHMACRX_CLK_ENABLE();       (##) Initialize the related GPIO clocks      (##) Configure Ethernet pin-out      (##) Configure Ethernet NVIC interrupt (IT mode)      *\/     GPIO_InitTypeDef GPIO_InitStructure;      \/* Enable ETHERNET clock     __HAL_RCC_ETHMAC_CLK_ENABLE();     __HAL_RCC_ETHMACTX_CLK_ENABLE();     __HAL_RCC_ETHMACRX_CLK_ENABLE();     *\/     __HAL_RCC_ETH_CLK_ENABLE();      \/* Enable GPIOs clocks *\/     __HAL_RCC_GPIOA_CLK_ENABLE();     __HAL_RCC_GPIOB_CLK_ENABLE();     __HAL_RCC_GPIOC_CLK_ENABLE();     __HAL_RCC_GPIOE_CLK_ENABLE();      \/* Ethernet pins configuration ************************************************\/     \/*      ETH_MDIO --------------&gt; PA2      ETH_MDC ---------------&gt; PC1       ETH_RMII_REF_CLK-------&gt; PA1       ETH_RMII_CRS_DV -------&gt; PA7      ETH_MII_RX_ER   -------&gt; PB10      ETH_RMII_RXD0   -------&gt; PC4      ETH_RMII_RXD1   -------&gt; PC5      ETH_RMII_TX_EN  -------&gt; PB11      ETH_RMII_TXD0   -------&gt; PB12      ETH_RMII_TXD1   -------&gt; PB13       ETH_RST_PIN     -------&gt; PE2      *\/      \/* Configure PA1,PA2 and PA7 *\/     GPIO_InitStructure.Pin = GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_7;     GPIO_InitStructure.Speed = GPIO_SPEED_HIGH;     GPIO_InitStructure.Mode = GPIO_MODE_AF_PP;     GPIO_InitStructure.Pull = GPIO_NOPULL;     GPIO_InitStructure.Alternate = GPIO_AF11_ETH;     HAL_GPIO_Init(GPIOA, &GPIO_InitStructure);      \/* Configure PB10,PB11,PB12 and PB13 *\/     GPIO_InitStructure.Pin =             GPIO_PIN_10 | GPIO_PIN_11 | GPIO_PIN_12    | GPIO_PIN_13;     \/* GPIO_InitStructure.Alternate = GPIO_AF11_ETH; *\/     HAL_GPIO_Init(GPIOB, &GPIO_InitStructure);      \/* Configure PC1, PC4 and PC5 *\/     GPIO_InitStructure.Pin = GPIO_PIN_1 | GPIO_PIN_4 | GPIO_PIN_5;     \/* GPIO_InitStructure.Alternate = GPIO_AF11_ETH; *\/     HAL_GPIO_Init(GPIOC, &GPIO_InitStructure);      if (heth-&gt;Init.MediaInterface == ETH_MEDIA_INTERFACE_MII) {         \/* Output HSE clock (25MHz) on MCO pin (PA8) to clock the PHY *\/         HAL_RCC_MCOConfig(RCC_MCO1, RCC_MCO1SOURCE_HSE, RCC_MCODIV_1);     }      \/* Configure the PHY RST  pin *\/     GPIO_InitStructure.Pin = GPIO_PIN_2;     GPIO_InitStructure.Mode = GPIO_MODE_OUTPUT_PP;     GPIO_InitStructure.Pull = GPIO_PULLUP;     GPIO_InitStructure.Speed = GPIO_SPEED_FAST;     HAL_GPIO_Init(GPIOE, &GPIO_InitStructure);      HAL_GPIO_WritePin(GPIOE, GPIO_PIN_2, GPIO_PIN_RESET);     HAL_Delay(1);     HAL_GPIO_WritePin(GPIOE, GPIO_PIN_2, GPIO_PIN_SET);     HAL_Delay(1); } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0414\u043b\u044f stm32f7<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">void HAL_ETH_MspInit(ETH_HandleTypeDef *heth) {     GPIO_InitTypeDef GPIO_InitStructure;      \/* Enable GPIOs clocks *\/     __HAL_RCC_GPIOA_CLK_ENABLE()     ;     __HAL_RCC_GPIOC_CLK_ENABLE()     ;     __HAL_RCC_GPIOG_CLK_ENABLE();      \/* Ethernet pins configuration *****************************************\/     \/*      RMII_REF_CLK ----------------------&gt; PA1      RMII_MDIO -------------------------&gt; PA2      RMII_MDC --------------------------&gt; PC1      RMII_MII_CRS_DV -------------------&gt; PA7      RMII_MII_RXD0 ---------------------&gt; PC4      RMII_MII_RXD1 ---------------------&gt; PC5      RMII_MII_RXER ---------------------&gt; PG2      RMII_MII_TX_EN --------------------&gt; PG11      RMII_MII_TXD0 ---------------------&gt; PG13      RMII_MII_TXD1 ---------------------&gt; PG14      *\/      \/* Configure PA1, PA2 and PA7 *\/     GPIO_InitStructure.Speed = GPIO_SPEED_HIGH;     GPIO_InitStructure.Mode = GPIO_MODE_AF_PP;     GPIO_InitStructure.Pull = GPIO_NOPULL;     GPIO_InitStructure.Alternate = GPIO_AF11_ETH;     GPIO_InitStructure.Pin = GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_7;     HAL_GPIO_Init(GPIOA, &GPIO_InitStructure);      \/* Configure PC1, PC4 and PC5 *\/     GPIO_InitStructure.Pin = GPIO_PIN_1 | GPIO_PIN_4 | GPIO_PIN_5;     HAL_GPIO_Init(GPIOC, &GPIO_InitStructure);      \/* Configure PG2, PG11, PG13 and PG14 *\/     GPIO_InitStructure.Pin =             GPIO_PIN_2 | GPIO_PIN_11 | GPIO_PIN_13 | GPIO_PIN_14;     HAL_GPIO_Init(GPIOG, &GPIO_InitStructure);      \/* Enable the Ethernet global Interrupt *\/     HAL_NVIC_SetPriority(ETH_IRQn, 0x7, 0);     HAL_NVIC_EnableIRQ(ETH_IRQn);      \/* Enable ETHERNET clock  *\/     __HAL_RCC_ETH_CLK_ENABLE(); } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u043d\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u043a\u043e\u0434\u0430 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 ethernet-\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430, \u043d\u043e \u043f\u043e\u043a\u0430 \u0440\u0443\u043a\u0438 \u0434\u043e \u043d\u0435\u0433\u043e \u043d\u0435 \u0434\u043e\u0445\u043e\u0434\u044f\u0442.<\/p>\n<p>  \u0414\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0432 Embox \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u0435\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b struct net_driver:  <\/p>\n<pre><code class=\"cpp\">static const struct net_driver stm32eth_ops = {         .xmit = stm32eth_xmit,         .start = stm32eth_open,         .set_macaddr = stm32eth_set_mac, };<\/code><\/pre>\n<p>  \u041d\u0430\u0448\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u043e\u0432 \u043f\u043e\u0445\u043e\u0436\u0430 \u043d\u0430 \u043b\u0438\u043d\u0443\u043a\u0441\u043e\u0432\u0443\u044e, \u0438\u043d\u043e\u0433\u0434\u0430 \u0432\u043e\u043e\u0431\u0449\u0435 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441 \u043d\u0435\u0439 \u043f\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0443. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435 \u0443\u0434\u0438\u0432\u043b\u044f\u0439\u0442\u0435\u0441\u044c, \u0435\u0441\u043b\u0438 \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u043a\u043e\u0434, \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u0445\u043e\u0436\u0438\u0439 \u043d\u0430 \u043b\u0438\u043d\u0443\u043a\u0441, \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0441\u043e\u0437\u043d\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u043e\u0432.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">static int stm32eth_init(void) {     int res;     struct net_device *nic;      nic = (struct net_device *) etherdev_alloc(0);     if (nic == NULL) {         return -ENOMEM;     }      nic-&gt;drv_ops = &stm32eth_ops;     nic-&gt;irq = STM32ETH_IRQ;     nic-&gt;base_addr = ETH_BASE;     nic_priv = netdev_priv(nic, struct stm32eth_priv);      stm32eth_netdev = nic;      res = irq_attach(nic-&gt;irq, stm32eth_interrupt, 0, stm32eth_netdev, &quot;&quot;);     if (res &lt; 0) {         return res;     }      return inetdev_register_dev(nic); }<\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u0440\u043e\u043c\u0435 \u044d\u0442\u043e\u0433\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0430 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u0430\u043c\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">static void low_level_init(unsigned char mac[6]) {     \/\/uint32_t regvalue;     int err;      memset(&stm32_eth_handler, 0, sizeof(stm32_eth_handler));      stm32_eth_handler.Instance = (ETH_TypeDef *) ETH_BASE;     \/* Fill ETH_InitStructure parametrs *\/     stm32_eth_handler.Init.MACAddr = mac;     stm32_eth_handler.Init.AutoNegotiation = ETH_AUTONEGOTIATION_DISABLE;     \/\/stm32_eth_handler.Init.AutoNegotiation = ETH_AUTONEGOTIATION_ENABLE;     stm32_eth_handler.Init.Speed = ETH_SPEED_100M;     stm32_eth_handler.Init.DuplexMode = ETH_MODE_FULLDUPLEX;     stm32_eth_handler.Init.MediaInterface = ETH_MEDIA_INTERFACE_RMII;     stm32_eth_handler.Init.ChecksumMode = ETH_CHECKSUM_BY_SOFTWARE;\/\/ETH_CHECKSUM_BY_HARDWARE;     stm32_eth_handler.Init.PhyAddress = PHY_ADDRESS;     stm32_eth_handler.Init.RxMode = ETH_RXINTERRUPT_MODE;      if (HAL_OK != (err = HAL_ETH_Init(&stm32_eth_handler))) {         log_error(&quot;HAL_ETH_Init err %d\\n&quot;, err);     }     if (stm32_eth_handler.State == HAL_ETH_STATE_READY) {         log_error(&quot;STATE_READY sp %d duplex %d\\n&quot;, stm32_eth_handler.Init.Speed, stm32_eth_handler.Init.DuplexMode);     }      \/*(#)Initialize Ethernet DMA Descriptors in chain mode and point to allocated buffers:*\/     HAL_ETH_DMATxDescListInit(&stm32_eth_handler, DMATxDscrTab, &Tx_Buff[0][0],             ETH_TXBUFNB); \/*for Transmission process*\/     if (HAL_OK != (err = HAL_ETH_DMARxDescListInit(&stm32_eth_handler, DMARxDscrTab, &Rx_Buff[0][0],             ETH_RXBUFNB))) { \/*for Reception process*\/         log_error(&quot;HAL_ETH_DMARxDescListInit %d\\n&quot;, err);     }      \/* (#)Enable MAC and DMA transmission and reception: *\/     HAL_ETH_Start(&stm32_eth_handler); } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0430<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">static int stm32eth_xmit(struct net_device *dev, struct sk_buff *skb) {     __IO ETH_DMADescTypeDef *dma_tx_desc;      dma_tx_desc = stm32_eth_handler.TxDesc;     memcpy((void *)dma_tx_desc-&gt;Buffer1Addr, skb-&gt;mac.raw, skb-&gt;len);      \/* Prepare transmit descriptors to give to DMA *\/     HAL_ETH_TransmitFrame(&stm32_eth_handler, skb-&gt;len);      skb_free(skb);      return 0; }<\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0414\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u043c\u044b \u0432\u044b\u0434\u0435\u043b\u044f\u0435\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0431\u0443\u0444\u0435\u0440\u043e\u0432 \u0434\u043b\u044f \u043f\u0430\u043a\u0435\u0442\u043e\u0432, \u0438 \u043a\u043e\u0433\u0434\u0430 \u043d\u0430\u043c \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u043f\u0430\u043a\u0435\u0442 \u043d\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0443, \u043c\u044b \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0443\u0436\u0435 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u0443\u044e \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0438 \u0443\u0436\u0435 \u043f\u043e\u0442\u043e\u043c \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0438\u0437 STM32CUBE<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u0440\u0438\u0451\u043c \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u043e \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044e:<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">static irq_return_t stm32eth_interrupt(unsigned int irq_num, void *dev_id) {     struct net_device *nic_p = dev_id;     struct sk_buff *skb;     ETH_HandleTypeDef *heth = &stm32_eth_handler;      if (!nic_p) {         return IRQ_NONE;     }      \/* Frame received *\/     if (__HAL_ETH_DMA_GET_FLAG(heth, ETH_DMA_FLAG_R)) {         \/* Receive complete callback *\/         while (NULL != (skb = low_level_input())) {             skb-&gt;dev = nic_p;              show_packet(skb-&gt;mac.raw, skb-&gt;len, &quot;rx&quot;);             netif_rx(skb);         }         \/* Clear the Eth DMA Rx IT pending bits *\/         __HAL_ETH_DMA_CLEAR_IT(heth, ETH_DMA_IT_R);     }      __HAL_ETH_DMA_CLEAR_IT(heth, ETH_DMA_IT_NIS);     return IRQ_HANDLED; }<\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u0440\u0438\u0435\u043c\u0430<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">static struct sk_buff *low_level_input(void) {     struct sk_buff *skb;     int len;     uint8_t *buffer;     uint32_t i=0;     __IO ETH_DMADescTypeDef *dmarxdesc;      skb = NULL;      \/* get received frame *\/     if (HAL_ETH_GetReceivedFrame_IT(&stm32_eth_handler) != HAL_OK)         return NULL;      \/* Obtain the size of the packet and put it into the &quot;len&quot; variable. *\/     len = stm32_eth_handler.RxFrameInfos.length;     buffer = (uint8_t *) stm32_eth_handler.RxFrameInfos.buffer;      \/* We allocate a pbuf chain of pbufs from the Lwip buffer pool *\/     skb = skb_alloc(len);      \/* copy received frame to pbuf chain *\/     if (skb != NULL) {         memcpy(skb-&gt;mac.raw, buffer, len);     }        \/* Release descriptors to DMA *\/       dmarxdesc = stm32_eth_handler.RxFrameInfos.FSRxDesc;        \/* Set Own bit in Rx descriptors: gives the buffers back to DMA *\/       for (i=0; i&lt; stm32_eth_handler.RxFrameInfos.SegCount; i++)       {         dmarxdesc-&gt;Status |= ETH_DMARXDESC_OWN;         dmarxdesc = (ETH_DMADescTypeDef *)(dmarxdesc-&gt;Buffer2NextDescAddr);       }        \/* Clear Segment_Count *\/       stm32_eth_handler.RxFrameInfos.SegCount =0;         \/* When Rx Buffer unavailable flag is set: clear it and resume reception *\/       if ((stm32_eth_handler.Instance-&gt;DMASR & ETH_DMASR_RBUS) != (uint32_t)RESET)       {         \/* Clear RBUS ETHERNET DMA flag *\/           stm32_eth_handler.Instance-&gt;DMASR = ETH_DMASR_RBUS;         \/* Resume DMA reception *\/           stm32_eth_handler.Instance-&gt;DMARPDR = 0;       }     return skb; }<\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u044d\u0442\u043e \u0438 \u0435\u0441\u0442\u044c \u0432\u0435\u0441\u044c \u0434\u0440\u0430\u0439\u0432\u0435\u0440. \u041f\u043e\u0441\u043b\u0435 \u0435\u0433\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0432\u0441\u0435 \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u0443\u0442\u0438\u043b\u0438\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0435\u0441\u0442\u044c \u0443 \u043d\u0430\u0441 \u0432 <a href=\"https:\/\/github.com\/embox\/embox\">Embox<\/a>. \u041e \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432 \u043d\u0430\u0448\u0438\u0445 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0441\u0442\u0430\u0442\u044c\u044f\u0445 (<a href=\"https:\/\/habrahabr.ru\/company\/embox\/blog\/259721\/\">pjsip<\/a> \u0438 <a href=\"https:\/\/habrahabr.ru\/company\/embox\/blog\/249789\/\">httpd<\/a>)<\/p>\n<p>  \u041a\u0440\u043e\u043c\u0435 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u043e\u0432 \u043d\u0430 \u0431\u0430\u0437\u0435 stm32cube \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u0442\u0430\u043a\u0436\u0435 spi, i2c, lcd, accelerator, gyroscope \u0438 \u043f\u0440\u043e\u0447\u0438\u0435. <\/p>\n<p>  P.S. \u041d\u0430\u0448 \u0434\u043e\u043a\u043b\u0430\u0434 \u043f\u0440\u0438\u043d\u044f\u043b\u0438 \u043d\u0430 <a href=\"http:\/\/osday.ru\/\">OSDAY<\/a> (23-24 \u043c\u0430\u044f \u0432 \u041c\u043e\u0441\u043a\u0432\u0435), \u0435\u0441\u043b\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043f\u043e\u0441\u043b\u0443\u0448\u0430\u0442\u044c \u0432\u0436\u0438\u0432\u0443\u044e \u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0435, \u043c\u0438\u043b\u043e\u0441\u0442\u0438 \u043f\u0440\u043e\u0441\u0438\u043c.<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:\/\/habrahabr.ru\/post\/328866\/\"> https:\/\/habrahabr.ru\/post\/328866\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p><img decoding=\"async\" width=\"400\" src=\"https:\/\/habrastorage.org\/web\/400\/16b\/466\/40016b4660824f82b24531aab0e5f56f.png\" align=\"right\"\/><br \/>  \u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442!<br \/>  \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0431\u044b \u0445\u043e\u0442\u0435\u043b \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u043e\u043f\u044b\u0442\u043e\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u043e\u0432 \u0434\u043b\u044f \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c \u0441\u0435\u0440\u0438\u0438 stm32. \u0418\u0434\u0435\u044f \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0432 <a href=\"https:\/\/github.com\/embox\/embox\">\u041e\u0421 Embox<\/a>, \u043d\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0435\u0440\u0438\u0438 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c STM32F3, STM32F4 \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435. \u0412\u0435\u0434\u044c \u043a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u044d\u0442\u043e \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u0432\u0440\u0435\u043c\u044f, \u043d\u043e\u0432\u044b\u0439 \u043a\u043e\u0434 \u043d\u0435\u0438\u0437\u0431\u0435\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438.  <\/p>\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-286479","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/286479","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=286479"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/286479\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=286479"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=286479"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=286479"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}