100%
msign 5vreg view
Description

Imported from GitHub: mincrmatt12/MSign · commit 06b3955 · license MIT

Description

internet-connected led sign control system

README

stmboot

This is the STM bootloader.

It is responsible for updating the stm with new code, as well as booting said new code.

Flash Layout

0x0800 0000        										
|                                    
|     0x0800 4000    0x0808 0000     0x080F C000
|     |              |               |    end of flash
|     |  496 KiB     |  496 KiB      |    |
+-----+--------------+---------------+----+
|     |  APPLICATION |  UPDATE PKG   |    |
+-----+--------------+---------------+----+
|                                    |  
|                                    --- unused; might contain recovery firmware at some point
-- bootloader                        

Protocol

Talks to the application code using the RTC backup registers; which are preserved across resets. The layout is as follows:

Register numberDescription
0x00Bootloader command, either 0 for run application or 1 for update.
0x01Update status flag, 0 if booting normally, anything else indicates booting from an update
0x02Update size, i.e. number of bytes to copy from 0x0808 0000 to 0x0800 4000 for an update
0x03Bootloader revision (if null, assume original bootloader) stored as 4byte string (e.g. "2a\x00\x00" or "beta")

The application should clear the update status flag, as if either

  • the bootloader starts with the update status flag enabled
  • the program returns control to the bootloader
  • any of the interrupt handlers fire from the bootloader (i.e. the app didn't change VTOR in the SCB)

the bootloader will enter recovery mode (showing a pattern of dots on the matrix) and waiting for an update mode from the ESP. (todo)

Comments
Sign in to comment

No comments yet. Be the first to ask about this board.