8000 GitHub - hornang/stm32-opts: Tool to change dual bank mode on STM32F7xx
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

hornang/stm32-opts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

stm32-opts

This tool allows you to read or write the nDBANK bit on STM32F76x/F77x microcontrollers using a debug probe. It is based on the probe-rs library.

Usage

To read the current state:

stm32-opts --chip STM32F767ZI ndbank

To set new value:

stm32-opts --chip STM32F767ZI ndbank false

Motivation

While exploring the STM32F767ZI, I discovered that its flash memory can operate in one of two modes: a 2 MB single-bank mode or a dual-bank mode with 1 MB per bank. The factory setting for this particular chip is the single-bank mode.

In dual-bank mode, the firmware can execute from one bank while data is written to the other bank without stalling the CPU (read-while-write or RWW for short).

This capability is particularly important for real-time applications that need to perform the following tasks while the firmware is executing:

  • Download firmware upgrades (swapped by the bootloader at the next boot)
  • Update configuration data
  • Log data to flash

Changing the flash mode alters the flash memory addressing scheme, which invalidates any firmware written for the previous mode. Therefore, the most practical approach is to configure the desired mode before flashing software to the device.

Alternative solutions exist, primarily ST's own STM32CubeProgrammer. However, incorporating a closed-source tool into the development process can be cumbersome. For example, STM32CubeProgrammer requires more than 1 GB of disk space.

What's next?

Using the Rust embedded ecosystem for your newly configured dual-bank chip has additional challenges:

About

Tool to change dual bank mode on STM32F7xx

Resources

Stars

Watchers

Forks

Languages

0