Giter Club home page Giter Club logo

stm32-usb-bootloader's Introduction

USB bootloader for STM32F1 microcontrollers

This repository contains bootloader for STM32F1xx microcontrollers. It was tested only for STM32F103RET6, but you may easily adopt it to other MCUs from F1 series supporting STM32 HAL library.

What do you need?

To use this bootloader you should have:

  • SD or MicroSD card connected to your MCU via 4-wire SDIO interface (do not forget 47kOhm resistors!). MicroSD card should works properly! File system should be Fat32.

  • Optionally, USB 2.0 port (type B, slave device), connected to your MCU. Do not forget 1.5kOhm resistor between D+ and 3.3V, otherwise your device will not be discovered by a computer.

How to use bootloader

You can put file flash.bin to SD-card with your flash image. There is no restrictions to image except it's size: it should be a bit smaller then MCU flash size to leave some place for bootloader. No image modifications (such as moving IRQ table or other) needed! You have two possibilities to put this file:

  • Enject microSD card and put flash.bin directly

  • Connect you MCU over USB to computer and run device. No drivers needed, your chip will run in cardreader mode. Copy flash.bin to MicroSD over this connection.

Than disconnect your device from PC (if connected), reboot it and after tens seconds your image will be flashed to MCU and run. Bootloader checks hash sum on start, so there is no reflashing every boot.

Note: when your MCU starts with bootloader, it takes control for 1 second to wait connection from PC and than boot your program. In this time all pins are pulled to zero if possible. You may change this behaviour.

Contacts

You are free to communicate with me by email: [email protected]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.