Skip to main content
laurent2399
Visitor II
January 15, 2016
Question

bootloader protected by password

  • January 15, 2016
  • 1 reply
  • 699 views
Posted on January 15, 2016 at 16:18

Hi,

I would like to udpdate the microcontroller STM32F42xxx SW without having access to Boot pins ( hardwired to boot0 = 0 boot 1 = 0) and by using USART port.

code is stored in internal flash memory containing SW code ( code run fom flash) through the USART bus by using existing bootloader. I would like this update be protected by password.

first operation :  during 5 first seconds after start, CPU waits for password through UART. if not received it jump to operational application, otherwise it jumps to bootloader adress in System memory.

second operation : terminal sends commands to change flash content to bootloader firmware

third operation : exit with go command or HW reset.

my question's :

-Do you see any difficulties to develop this ?

- in case of wrong flash write , power off during flash donwloading,... there is a risk that SW code is corrupted and thus never be able to access flash memory without opening box . Am I right ? or Is a protection mechanism exists that detect invalid I-code ( as soon as one is met) and jump to bootloader ?

maybe other alternative to my problem ?

Thanks for the Help.

Laurent.
    This topic has been closed for replies.

    1 reply

    Tesla DeLorean
    Guru
    January 15, 2016
    Posted on January 15, 2016 at 16:50

    No the processor will just crash if your firmware is broken. It will try to vector off into the Hard Fault Handler.

    Suggest you have a small bootloader, that you don't erase/replace, and that it checksums or integrity checks the application image before jumping to it.

    There aren't that many strong drivers for using the ROM based loader via the serial port, code your own.

    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..