{"id":16173167,"url":"https://github.com/joeferner/pi-stm32-uart-bootloader","last_synced_at":"2025-10-25T00:41:14.569Z","repository":{"id":57323362,"uuid":"59942656","full_name":"joeferner/pi-stm32-uart-bootloader","owner":"joeferner","description":"Raspberry PI STM32 USART Bootloader","archived":false,"fork":false,"pushed_at":"2018-07-10T23:21:17.000Z","size":44,"stargazers_count":28,"open_issues_count":1,"forks_count":9,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-21T18:30:46.162Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joeferner.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-05-29T12:46:17.000Z","updated_at":"2024-08-06T05:43:34.000Z","dependencies_parsed_at":"2022-08-25T22:41:09.632Z","dependency_job_id":null,"html_url":"https://github.com/joeferner/pi-stm32-uart-bootloader","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/joeferner/pi-stm32-uart-bootloader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeferner%2Fpi-stm32-uart-bootloader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeferner%2Fpi-stm32-uart-bootloader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeferner%2Fpi-stm32-uart-bootloader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeferner%2Fpi-stm32-uart-bootloader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joeferner","download_url":"https://codeload.github.com/joeferner/pi-stm32-uart-bootloader/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeferner%2Fpi-stm32-uart-bootloader/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271248240,"owners_count":24726065,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-19T02:00:09.176Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T04:06:58.066Z","updated_at":"2025-10-25T00:41:14.476Z","avatar_url":"https://github.com/joeferner.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n**Raspberry PI STM32 UART Bootloader**\n\nThis node module facilitates flashing an STM32 over the built in UART bootloader.\n\nThe STM32 has a built in bootloader which can be accessed by setting the following\nBOOT1 and BOOT0 pins. \"Main Flash Memory\" is where your program typically resides.\n\"System Memory\" is where STM32's built in bootloaders reside.\n\n| BOOT1 | BOOT0 | Boot Mode         |\n|:-----:|:-----:|-------------------|\n|   x   |   0   | Main Flash Memory |\n|   0   |   1   | System Memory     |\n|   1   |   1   | Embedded SRAM     |\n\nThis module will toggle these pins (BOOT0 and BOOT1) along with the reset pin and UART\nto flash the STM32.\n\n### Raspberry Pi 3\n\nOn the Raspberry Pi 3 yo get better baud rate results you will probably want to remap the\nphysical UART away from the bluetooth and back to the UART pins. To do this add the following\nline to your `/boot/config.txt` file.\n\n```\ndtoverlay=pi3-miniuart-bt\n```\n\n### Usage\n\nThe following example has been tested to flash the STM32F103RBT6 on the STM32F103 Nucleo board.\nYou'll need to make the following connections.\n\n|  Pi  | STM32            |\n|-----:|------------------|\n|  8   | UART RX PA10     |\n|  10  | UART TX PA9      |\n|  11  | RESET            |\n|  13  | BOOT0            |\n|      | BOOT1/PB2 -\u003e GND |\n\nYou will also need to disable the built in Nucleo reset by removing the jumper on `SB12` or\nreplacing it with a weak pull up resistor (10K should work).\n\n```javascript\nvar wpi = require('wiring-pi');\nvar STM32UARTBootloader = require('pi-stm32-uart-bootloader');\nvar fs = require('fs');\nvar path = require('path');\n\nasync function flash() {\n    wpi.wiringPiSetupPhys();\n\n    const bootloader = new STM32UARTBootloader({\n        resetPin: 11,\n        boot0Pin: 13,\n        serialPortPath: '/dev/serial0'\n    });\n    await bootloader.init();\n\n    const data = fs.readFileSync(path.join(__dirname, 'blink.bin'));\n    await bootloader.flash(0x08000000, data);\n    console.log('done');\n}\n\nflash();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoeferner%2Fpi-stm32-uart-bootloader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoeferner%2Fpi-stm32-uart-bootloader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoeferner%2Fpi-stm32-uart-bootloader/lists"}