Skip to content

Latest commit

 

History

19 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

STM32 chip firmware update using NodeJs

stm32 firmupdate step

  1. BOOT0 to 1
  2. RESET to 1
  3. RESET to 0

boot mode enter

  1. TX 0x7F
  2. RX 0x79

flash erase

  1. TX 0x43
  2. TX 0xBC
  3. RX 0x79 // erasing flash
  4. TX 0xFF
  5. TX 0x00
  6. RX 0x79 // flash Erase success

---------------- loop start ---------------

  1. TX 0x31
  2. TX 0xCE
  3. RX 0x79

send address starting 0x08000000

0x12345678
|31-----------24|23-----------16|15------------8|7---------bit 0|
+---------------+---------------+---------------+---------------+
|0 0 0 1 0 0 1 0|0 0 1 1 0 1 0 0|0 1 0 1 0 1 1 0|0 1 1 1 1 0 0 0|
+---------------+---------------+---------------+---------------+

  1. TX -
    1byte - 0 0 0 1 0 0 1 0
    2byte - 0 0 1 1 0 1 0 0
    3byte - 0 1 0 1 0 1 1 0
    4byte - 0 1 1 1 1 0 0 0
    5byte - XOR (|0 0 0 1 0 0 1 0|0 0 1 1 0 1 0 0|0 1 0 1 0 1 1 0|0 1 1 1 1 0 0 0|)

  2. RX 0x79 // address send

  3. TX number of bytes --- (128 -1)

  4. Tx 128 byte send

checksunm TX -- XOR(send byte)

  1. RX 0x79 // packet send done .........................

------------ loop end ------------------------

boot mode exit

  1. BOOT0 to 0
  2. RESET to 1
  3. RESET to 0

Referecnce

  1. https://nodejs.org/docs/latest-v12.x/api/
  2. https://medium.com/hackernoon/arduino-serial-data-796c4f7d27ce
  3. https://serialport.io/docs/next/api-serialport
  4. https://theiotlearninginitiative.gitbook.io/embedded-linux/subsystems/general-purpose-input-output
  5. http://doc.industio.com/docs/ssd20x_manual/ssd20x_manual-1cradq5hh4qn2
  6. https://github.com/florisla/stm32loader/tree/master

About

In this project NodeJS script was developed to flash the STM32 chip. Using the STM flashing protocol STM32 chip was flashed by linux-amd64

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages