{"id":25,"date":"2021-12-20T15:54:20","date_gmt":"2021-12-20T14:54:20","guid":{"rendered":"http:\/\/fabienm.eu\/raconteur\/?p=25"},"modified":"2021-12-21T21:35:42","modified_gmt":"2021-12-21T20:35:42","slug":"prise-en-main-du-module-esp32-wrover-e","status":"publish","type":"post","link":"http:\/\/fabienm.eu\/raconteur\/2021\/12\/20\/prise-en-main-du-module-esp32-wrover-e\/","title":{"rendered":"Prise en main du module ESP32-WROVER-E"},"content":{"rendered":"\n<p>Le module <a href=\"https:\/\/www.espressif.com\/sites\/default\/files\/documentation\/esp32-wrover-e_esp32-wrover-ie_datasheet_en.pdf\">ESP32-WROVER-E<\/a> est un module Wifi de chez <a href=\"https:\/\/www.espressif.com\/\">Espressif<\/a> \u00e0 base de microcontr\u00f4leur <a href=\"https:\/\/www.cadence.com\/en_US\/home\/tools\/ip\/tensilica-ip\/tensilica-xtensa-controllers-and-extensible-processors.html\">Xtensa \u00ae 32-bit LX6<\/a>. On le trouve au tarif tr\u00e8s comp\u00e9titif d&rsquo;environ 3.5\u20ac chez les distributeurs habituels.<\/p>\n\n\n\n<p>On trouve un kit de d\u00e9veloppement pour une grosse dizaine d&rsquo;euros sur <a href=\"https:\/\/fr.aliexpress.com\/item\/1005003166375744.html?spm=a2g0o.productlist.0.0.7782462f4GSH4y&amp;algo_pvid=7d78eee9-e477-464d-93ec-7e5a61b70591&amp;algo_exp_id=7d78eee9-e477-464d-93ec-7e5a61b70591-0&amp;pdp_ext_f=%7B%22sku_id%22%3A%2212000024453517244%22%7D\">aliexpress<\/a>: Le <a href=\"https:\/\/docs.espressif.com\/projects\/esp-idf\/en\/latest\/esp32\/hw-reference\/esp32\/get-started-devkitc.html\">ESP32_DevKitc_V4<\/a>. Et c&rsquo;est le module que je viens de recevoir ce matin dans ma boite aux lettres.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"458\" src=\"http:\/\/fabienm.eu\/raconteur\/wp-content\/uploads\/2021\/12\/esp32_wrover_e.png\" alt=\"\" class=\"wp-image-26\" srcset=\"http:\/\/fabienm.eu\/raconteur\/wp-content\/uploads\/2021\/12\/esp32_wrover_e.png 600w, http:\/\/fabienm.eu\/raconteur\/wp-content\/uploads\/2021\/12\/esp32_wrover_e-300x229.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><figcaption>Le module ESP32_WROVER_E et sa carte de d\u00e9veloppement ESP32_DevKitc_V4<\/figcaption><\/figure><\/div>\n\n\n\n<p>La commande de ce kit n&rsquo;est pas due au hasard, l&rsquo;ESP32-WROVER-E est le module utilis\u00e9 au c\u0153ur de la boite \u00e0 histoires de France-inter\/Bayard-Press : <a href=\"https:\/\/www.hello-merlin.com\/\">Merlin<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Branchement<\/h2>\n\n\n\n<p>Espressif fourni un tutoriel sur son wiki pour la prise en main du <a href=\"https:\/\/docs.espressif.com\/projects\/esp-idf\/en\/latest\/esp32\/hw-reference\/esp32\/get-started-devkitc.html\">ESP32-DevKitC V4<\/a>.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"960\" height=\"540\" src=\"http:\/\/fabienm.eu\/raconteur\/wp-content\/uploads\/2021\/12\/esp32-devkitc-functional-overview.jpg\" alt=\"\" class=\"wp-image-37\" srcset=\"http:\/\/fabienm.eu\/raconteur\/wp-content\/uploads\/2021\/12\/esp32-devkitc-functional-overview.jpg 960w, http:\/\/fabienm.eu\/raconteur\/wp-content\/uploads\/2021\/12\/esp32-devkitc-functional-overview-300x169.jpg 300w, http:\/\/fabienm.eu\/raconteur\/wp-content\/uploads\/2021\/12\/esp32-devkitc-functional-overview-768x432.jpg 768w\" sizes=\"auto, (max-width: 960px) 100vw, 960px\" \/><figcaption>La photo officiel du kit de d\u00e9veloppement sur le wiki d&rsquo;espressif<\/figcaption><\/figure><\/div>\n\n\n\n<p>Au branchement de l&rsquo;USB, un convertisseur USB-UART (<a href=\"https:\/\/www.silabs.com\/developers\/usb-to-uart-bridge-vcp-drivers\">cp210x<\/a>) est d\u00e9tect\u00e9 :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ dmesg\n&#91;1174313.734558] usb 1-1.1.2: new full-speed USB device number 118 using xhci_hcd\n&#91;1174313.836871] usb 1-1.1.2: New USB device found, idVendor=10c4, idProduct=ea60, bcdDevice= 1.00\n&#91;1174313.836876] usb 1-1.1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3\n&#91;1174313.836878] usb 1-1.1.2: Product: CP2102N USB to UART Bridge Controller\n&#91;1174313.836880] usb 1-1.1.2: Manufacturer: Silicon Labs\n&#91;1174313.836882] usb 1-1.1.2: SerialNumber: 0ae36f4e9dfbeb11b9dfaef7c6d924ec\n&#91;1174313.843495] cp210x 1-1.1.2:1.0: cp210x converter detected\n&#91;1174313.846185] usb 1-1.1.2: cp210x converter now attached to ttyUSB0\n<\/code><\/pre>\n\n\n\n<p>Si on connecte un terminal au port s\u00e9rie ttyUSB0 en 115200 bauds on obtient une suite de message qui se d\u00e9roule ind\u00e9finiment :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)\nconfigsip: 0, SPIWP:0xee\nclk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00\nmode:DIO, clock div:2\nload:0x3fffeba4,len:4\nload:0x4009f000,len:3248\nentry 0x4009f574\n\ufffdOHAI\ufffdets Jul 29 2019 12:21:46\n\nrst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)\nconfigsip: 0, SPIWP:0xee\nclk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00\nmode:DIO, clock div:2\nload:0x3fffeba4,len:4\nload:0x4009f000,len:3248\nentry 0x4009f574\n\ufffdOHAI\ufffdets Jul 29 2019 12:21:46<\/code><\/pre>\n\n\n\n<p>Un appui sur le bouton \u00abboot\u00bb provoque l&rsquo;arr\u00eat du d\u00e9filement des message, sans doute dans l&rsquo;attente du firmware qui doit passer par l&rsquo;uart :<\/p>\n\n\n\n<pre id=\"block-53c85480-3c70-4f35-ac17-134cc26fe41e\" class=\"wp-block-code\"><code>rst:0x10 (RTCWDT_RTC_RESET),boot:0x3 (DOWNLOAD_BOOT(UART0\/UART1\/SDIO_REI_REO_V2))<br>waiting for download<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">L&rsquo;environnement de d\u00e9veloppement<\/h2>\n\n\n\n<p>Espressif <a href=\"https:\/\/github.com\/espressif\/esp-idf\">propose un environnement de d\u00e9veloppement open source<\/a> nomm\u00e9 ESP-IDF.  Le <a href=\"https:\/\/docs.espressif.com\/projects\/esp-idf\/en\/latest\/esp32\/get-started\/index.html\">guide d&rsquo;installation officiel <\/a>est suffisamment complet pour ne pas avoir \u00e0 le d\u00e9crire ici. Une fois que c&rsquo;est install\u00e9, compil\u00e9 et export\u00e9 on peut se focaliser sur le projet d&rsquo;exemple. <\/p>\n\n\n\n<p>Une fois le programme \u00abhello world\u00bb d&rsquo;exemple compil\u00e9, il suffit de lancer le flashage avec :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ idf.py -p \/dev\/ttyUSB0 flash\nExecuting action: flash\nRunning ninja in directory \/opt\/esp\/hello_world\/build\nExecuting \"ninja flash\"...\n&#91;1\/5] cd \/opt\/esp\/hello_world\/build\/esp-idf\/esptool_py &amp;&amp; \/home\/fabien\/.espressif\/python_env\/idf5.0_py3....opt\/esp\/hello_world\/build\/partition_table\/partition-table.bin \/opt\/esp\/hello_world\/build\/hello_world.bin\nhello_world.bin binary size 0x298e0 bytes. Smallest app partition is 0x100000 bytes. 0xd6720 bytes (84%) free.\n&#91;2\/5] Performing build step for 'bootloader'\n&#91;1\/1] cd \/opt\/esp\/hello_world\/build\/bootloader\/esp-idf\/esptool_py &amp;&amp; \/home\/fabien\/.espressif\/python_env\/idf5.0_py3.7_env\/bin\/python \/opt\/esp\/esp-idf\/components\/partition_table\/check_sizes.py --offset 0x8000 bootloader 0x1000 \/opt\/esp\/hello_world\/build\/bootloader\/bootloader.bin\nBootloader binary size 0x6350 bytes. 0xcb0 bytes (11%) free.\n&#91;2\/3] cd \/opt\/esp\/esp-idf\/components\/esptool_py &amp;&amp; \/usr\/local\/bin\/cmake -D IDF_PATH=\/opt\/esp\/esp-idf -D ...ING_DIRECTORY=\/opt\/esp\/hello_world\/build -P \/opt\/esp\/esp-idf\/components\/esptool_py\/run_serial_tool.cmake\nesptool.py esp32 -p \/dev\/ttyUSB0 -b 460800 --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 40m --flash_size 2MB 0x1000 bootloader\/bootloader.bin 0x10000 hello_world.bin 0x8000 partition_table\/partition-table.bin\nesptool.py v3.3-dev\nSerial port \/dev\/ttyUSB0\nConnecting.....\nChip is ESP32-D0WD-V3 (revision 3)\nFeatures: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None\nCrystal is 40MHz\nMAC: 34:94:54:b7:31:e0\nUploading stub...\nRunning stub...\nStub running...\nChanging baud rate to 460800\nChanged.\nConfiguring flash size...\nFlash will be erased from 0x00001000 to 0x00007fff...\nFlash will be erased from 0x00010000 to 0x00039fff...\nFlash will be erased from 0x00008000 to 0x00008fff...\nCompressed 25424 bytes to 15896...\nWriting at 0x00001000... (100 %)\nWrote 25424 bytes (15896 compressed) at 0x00001000 in 0.7 seconds (effective 282.8 kbit\/s)...\nHash of data verified.\nCompressed 170208 bytes to 89791...\nWriting at 0x00010000... (16 %)\nWriting at 0x0001b0a3... (33 %)\nWriting at 0x00020836... (50 %)\nWriting at 0x00026023... (66 %)\nWriting at 0x0002e652... (83 %)\nWriting at 0x00036a08... (100 %)\nWrote 170208 bytes (89791 compressed) at 0x00010000 in 2.3 seconds (effective 581.7 kbit\/s)...\nHash of data verified.\nCompressed 3072 bytes to 103...\nWriting at 0x00008000... (100 %)\nWrote 3072 bytes (103 compressed) at 0x00008000 in 0.1 seconds (effective 479.6 kbit\/s)...\nHash of data verified.\n\nLeaving...\nHard resetting via RTS pin...\nDone\n<\/code><\/pre>\n\n\n\n<p>Puis de se connecter au terminal uart avec screen pour obtenir la sortie fonctionnelle du programme :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ screen \/dev\/ttyUSB0 115200\n...\nRestarting now.\nets Jul 29 2019 12:21:46\n\nrst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)\nconfigsip: 0, SPIWP:0xee\nclk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00\nmode:DIO, clock div:2\nload:0x3fff0030,len:6736\nload:0x40078000,len:14808\nload:0x40080400,len:3792\nentry 0x40080694\nI (27) boot: ESP-IDF v5.0-dev-810-gb886dc6998 2nd stage bootloader\nI (27) boot: compile time 21:20:00\nI (27) boot: chip revision: 3\nI (32) boot_comm: chip revision: 3, min. bootloader chip revision: 0\nI (39) boot.esp32: SPI Speed      : 40MHz\nI (43) boot.esp32: SPI Mode       : DIO\nI (48) boot.esp32: SPI Flash Size : 2MB\nI (52) boot: Enabling RNG early entropy source...\nI (58) boot: Partition Table:\nI (61) boot: ## Label            Usage          Type ST Offset   Length\nI (69) boot:  0 nvs              WiFi data        01 02 00009000 00006000\nI (76) boot:  1 phy_init         RF data          01 01 0000f000 00001000\nI (84) boot:  2 factory          factory app      00 00 00010000 00100000\nI (91) boot: End of partition table\nI (95) boot_comm: chip revision: 3, min. application chip revision: 0\nI (102) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=07824h ( 30756) map\nI (122) esp_image: segment 1: paddr=0001784c vaddr=3ffb0000 size=023b0h (  9136) load\nI (126) esp_image: segment 2: paddr=00019c04 vaddr=40080000 size=06414h ( 25620) load\nI (141) esp_image: segment 3: paddr=00020020 vaddr=400d0020 size=14a4ch ( 84556) map\nI (171) esp_image: segment 4: paddr=00034a74 vaddr=40086414 size=04e2ch ( 20012) load\nI (180) esp_image: segment 5: paddr=000398a8 vaddr=50000000 size=00010h (    16) load\nI (186) boot: Loaded app from partition at offset 0x10000\nI (186) boot: Disabling RNG early entropy source...\nI (200) cpu_start: Pro cpu up.\nI (200) cpu_start: Starting app cpu, entry point is 0x40081004\nI (187) cpu_start: App cpu up.\nI (214) cpu_start: Pro cpu start user code\nI (215) cpu_start: cpu freq: 160000000 Hz\nI (215) cpu_start: Application information:\nI (219) cpu_start: Project name:     hello_world\nI (225) cpu_start: App version:      1\nI (229) cpu_start: Compile time:     Dec 21 2021 21:19:52\nI (235) cpu_start: ELF file SHA256:  81272dfce4dde882...\nI (241) cpu_start: ESP-IDF:          v5.0-dev-810-gb886dc6998\nI (248) heap_init: Initializing. RAM available for dynamic allocation:\nI (255) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM\nI (261) heap_init: At 3FFB2CA0 len 0002D360 (180 KiB): DRAM\nI (267) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D\/IRAM\nI (273) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D\/IRAM\nI (280) heap_init: At 4008B240 len 00014DC0 (83 KiB): IRAM\nI (287) spi_flash: detected chip: generic\nI (291) spi_flash: flash io: dio\nW (295) spi_flash: Detected size(8192k) larger than the size in the binary image header(2048k). Using the size in the binary image header.\nI (309) cpu_start: Starting scheduler on PRO CPU.\nI (0) cpu_start: Starting scheduler on APP CPU.\nHello world!\nThis is esp32 chip with 2 CPU core(s), WiFi\/BT\/BLE, silicon revision 3, 2MB external flash\nMinimum free heap size: 294172 bytes\nRestarting in 10 seconds...\nRestarting in 9 seconds...\nRestarting in 8 seconds...\n<\/code><\/pre>\n\n\n\n<p>L&rsquo;installation des outils et le flashage d&rsquo;une premi\u00e8re application \u00abhello world\u00bb est incroyablement facile \u00e0 mettre en \u0153uvre. Il faudra voir \u00e0 l&rsquo;usage comment on peut d\u00e9coder des MP3 et afficher des images provenant d&rsquo;une carte SD.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Le module ESP32-WROVER-E est un module Wifi de chez Espressif \u00e0 base de microcontr\u00f4leur Xtensa \u00ae 32-bit LX6. On le trouve au tarif tr\u00e8s comp\u00e9titif d&rsquo;environ 3.5\u20ac chez les distributeurs habituels. On trouve un kit de d\u00e9veloppement pour une grosse dizaine d&rsquo;euros sur aliexpress: Le ESP32_DevKitc_V4. Et c&rsquo;est le module que je viens de recevoir &hellip; <a href=\"http:\/\/fabienm.eu\/raconteur\/2021\/12\/20\/prise-en-main-du-module-esp32-wrover-e\/\" class=\"more-link\">Continuer la lecture de <span class=\"screen-reader-text\">Prise en main du module ESP32-WROVER-E<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[2,6,5,3],"class_list":["post-25","post","type-post","status-publish","format-standard","hentry","category-non-classe","tag-esp32","tag-merlin","tag-programmation","tag-wrover"],"_links":{"self":[{"href":"http:\/\/fabienm.eu\/raconteur\/wp-json\/wp\/v2\/posts\/25","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/fabienm.eu\/raconteur\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/fabienm.eu\/raconteur\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/fabienm.eu\/raconteur\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/fabienm.eu\/raconteur\/wp-json\/wp\/v2\/comments?post=25"}],"version-history":[{"count":11,"href":"http:\/\/fabienm.eu\/raconteur\/wp-json\/wp\/v2\/posts\/25\/revisions"}],"predecessor-version":[{"id":53,"href":"http:\/\/fabienm.eu\/raconteur\/wp-json\/wp\/v2\/posts\/25\/revisions\/53"}],"wp:attachment":[{"href":"http:\/\/fabienm.eu\/raconteur\/wp-json\/wp\/v2\/media?parent=25"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/fabienm.eu\/raconteur\/wp-json\/wp\/v2\/categories?post=25"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/fabienm.eu\/raconteur\/wp-json\/wp\/v2\/tags?post=25"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}