Code Monkey home page Code Monkey logo

tumanako-inverter-fw-bootloader's Introduction

--------------------------------------------
-- STM32 Bootloader
--
-- Johannes Hübner <[email protected]>
--------------------------------------------

This boot loader does not interact with the built-in STM32 boot loader. It 
uses an interface of your choice, right now this is USART3. The 
interface flexibility and the independence from the BOOT pins are the 
main reasons for implementing this boot loader.

The protocol is like this:
- 115200-8-N-2 (2 stop bits necessary when using a ZigBee module)
1 Send an 'S' indicating that it is awaiting an update size in pages
2 If no reply within about 500ms go to step 5
2.1 otherwise send a 'P' indicating that it is awaiting the actual page 
as a binary image
3 When page received send a 'C' indicating that it is awaiting the pages 
checksum
4 When checksum is correct and more pages need to be received, go to 
step 2.1
4.1 if all pages have been received go to step 5
4.2 When checksum isn't correct print an 'E' then go to step 2.1
5 When done print a 'D' and start main firmware (known bug: the D tends 
to be erroneous maybe because the usart is shut down right after sending it)


Notes:
- By CRC I mean the one calculated by the STMs integrated CRC32 unit.
- The actual firmware has a reset command the cycle through the bootloader
- The main firmware must be linked to start at address 0x08001000
- The bootloader starts at address 0x08000000 and can be 4k in size 
(right now its around 1.5k)

tumanako-inverter-fw-bootloader's People

Contributors

evbuilder avatar jsphuebner avatar

Watchers

James Cloos avatar  avatar

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.