{"id":83,"date":"2017-02-24T22:37:09","date_gmt":"2017-02-24T22:37:09","guid":{"rendered":"http:\/\/marcjuneau.ca\/?p=83"},"modified":"2019-04-08T16:23:49","modified_gmt":"2019-04-08T16:23:49","slug":"stm32-nucleo-f446re-blink-de-base","status":"publish","type":"post","link":"https:\/\/marcjuneau.ca\/?p=83","title":{"rendered":"STM32 Nucleo F446RE : Blink de base"},"content":{"rendered":"<p>Comme premier code, nous allons commuter la LED2 du Nucleo afin de mesurer la performance des librairies.<\/p>\n<p>Lors des tests, l&rsquo;onde carr\u00e9 observ\u00e9e \u00e9tait d&rsquo;environ 2.4MHz. Ce n&rsquo;est pas la m\u00e9thode la plus rapide, car les fonctions utilis\u00e9es pour le changement d&rsquo;\u00e9tat de la LED2 pr\u00e9sentent une surcharge notable.<\/p>\n<pre>#include \"stm32f4xx.h\"\n#include \"system_stm32f4xx.h\"\n#include \"stm32f4xx_hal_gpio.h\"\n#include \"stm32f4xx_hal_rcc.h\"\n\nGPIO_InitTypeDef GPIO_InitStructure;\n\nvoid main(void)\n{\n  HAL_Init();\n  __GPIOA_CLK_ENABLE();\n  GPIO_InitStructure.Pin = GPIO_PIN_5;\n  GPIO_InitStructure.Mode = GPIO_MODE_OUTPUT_PP;\n  GPIO_InitStructure.Pull = GPIO_PULLUP;\n  GPIO_InitStructure.Speed = GPIO_SPEED_HIGH;\n  HAL_GPIO_Init(GPIOA, &amp;GPIO_InitStructure);\n\n  while (1)\n  {\n     HAL_GPIO_WritePin(GPIOA, GPIO_PIN_5, GPIO_PIN_RESET);\n     HAL_GPIO_WritePin(GPIOA, GPIO_PIN_5, GPIO_PIN_SET);\n  }\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>STM32 Nucleo F446RE : Blink de base<span class=\"more-link\"><a href=\"https:\/\/marcjuneau.ca\/?p=83\">Continue Reading<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10,13],"tags":[],"class_list":["entry","author-mjuneau","has-excerpt","post-83","post","type-post","status-publish","format-standard","category-stm32","category-stm32-nucleo"],"_links":{"self":[{"href":"https:\/\/marcjuneau.ca\/index.php?rest_route=\/wp\/v2\/posts\/83","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/marcjuneau.ca\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/marcjuneau.ca\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/marcjuneau.ca\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/marcjuneau.ca\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=83"}],"version-history":[{"count":3,"href":"https:\/\/marcjuneau.ca\/index.php?rest_route=\/wp\/v2\/posts\/83\/revisions"}],"predecessor-version":[{"id":223,"href":"https:\/\/marcjuneau.ca\/index.php?rest_route=\/wp\/v2\/posts\/83\/revisions\/223"}],"wp:attachment":[{"href":"https:\/\/marcjuneau.ca\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=83"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/marcjuneau.ca\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=83"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/marcjuneau.ca\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=83"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}