ST STM32F7

From SEGGER Knowledge Base
(Redirected from STM32F7)
Jump to navigation Jump to search

The ST STM32F7 are are Cortex-M7 based MCUs with low-power functionality.

Supported devices

Refer to the supported device list for a full list of all supported STM32F7 family devices, their corresponding names and connection diagrams.

Target interfaces

Interface J-Link support Flasher support
SWD
SWD

Flash banks

Internal flash

Flash bank Base address J-Link support Flasher support Loader
Name Bank size
Program flash 0x08000000 Default Up to 2 MB
Option bytes 0x1FFF0000 Default 32 bytees

Flash Dual Bank Mode

The ST STM32F7 series devices come with a dual-bank flash memory. The layout of the dual-bank flash memory can be configured by the user through the option byte nDBANK. By default, the value of this option byte is nDBANK == 1, which means that the flash is configured as single bank memory, while nDBANK == 0 means that the flash is configured as dual bank memory flash. The total flash size is exactly the same for both modes.

Problem description
  • The sector layout is different depending on the nDBANK bit
  • The flash algorithm has to behave different (pass different sector indices to erase sector)

By default, the J-Link flash loader assumes that the flash controller is configured for the single bank flash layout (nDBANK == 1) because it is the default configuration. In case of the flash controller is configured for the dual bank flash layout (nDBANK == 0), the default flash algorithm / sector layout won't work.

Solution

When operating the flash in dual bank flash mode (nDBANK == 0), the flash algorithm as well as the sector layout used by the J-Link DLL needs to be overwritten. This can be done using the SEGGER Flashloader. Please find below two precompiled flash algorithms, one for the 1MB and one for the 2MB variant of the STM32F7 device series. The algorithms assume that the flash is configured in dual bank mode. Detailed information how to use the precompiled flashloaders can be found in this article.

Dual Bank enabled (1 MB device)
<Database>
  <Device>
    <ChipInfo Vendor="ST" Name="STM32F767ZI" Core="JLINK_CORE_CORTEX_M7" />
    <FlashBankInfo Name="Flash Bank0" BaseAddr="0x08000000" AlwaysPresent="1">
      <LoaderInfo Name="DualBank" Loader="ST_STM32F7xxxx_DualBank_512KB_Bank0.elf" MaxSize="0x00080000" LoaderType="FLASH_ALGO_TYPE_OPEN" />
    </FlashBankInfo>
    <FlashBankInfo Name="Flash Bank1" BaseAddr="0x08080000" AlwaysPresent="1">
      <LoaderInfo Name="DualBank" Loader="ST_STM32F7xxxx_DualBank_512KB_Bank1.elf" MaxSize="0x00080000" LoaderType="FLASH_ALGO_TYPE_OPEN" />
    </FlashBankInfo>
  </Device>
</Database>
Dual Bank enabled (2 MB device)
<Database>
  <Device>
    <ChipInfo Vendor="ST" Name="STM32F779NI" Core="JLINK_CORE_CORTEX_M7" />
    <FlashBankInfo Name="Flash Bank" BaseAddr="0x08000000" AlwaysPresent="1">
      <LoaderInfo Name="DualBank" Loader="ST_STM32F7xxxx_DualBank_2MB.elf" MaxSize="0x00200000" LoaderType="FLASH_ALGO_TYPE_OPEN" />
    </FlashBankInfo>
  </Device>
</Database>

Option byte programming

ST STM32F7 family has an integrated option byte flash, that allows the user to set certain options depending on the application requirements. For more details please refer to the corresponding manual from ST. The flash can be memory mapped accessed / programmed as usual flash memory.

Note:

When programming the option bytes, the following conditions must be met:

  • Per bank: All option bytes must be written in one go. It is not possible to only write - for example - one word.
  • Reserved bits must be written with "1" otherwise writing the option bytes will not work as expected and the verify of the written area will fail.

QSPI flash

QSPI flash programming requires special handling compared to internal flash. For more information about this, please see the QSPI Flash Programming Support article.
J-Link supports multiple pin configurations for this device. The default loader is marked in bold. For details on how to select a specific flash loader, please see here.


Flash bank Base address J-Link support Flasher support Loader
Name Bank size
External QSPI flash 0x90000000 CLK@PB2_nCS@PB6_D0@PC9_D1@PC10_D2@PE2_D3@PD13[1] Up to 256 MB
CLK@PB2_nCS@PB6_D0@PC9_D1@PD12_D2@PE2_D3@PA1 Up to 256 MB
CLK@PB2_nCS@PB6_D0@PC9_D1@PD12_D2@PE2_D3@PD13 Up to 256 MB
CLK@PB2_nCS@PB6_D0@PD11_D1@PD12_D2@PE2_D3@PD13[2] Up to 256 MB
CLK@PB2_nCS@PB6_D0@PF8_D1@PD12_D2@PF7_D3@PD13 Up to 256 MB
CLK@PB2_nCS@PB6_D0@PF8_D1@PF9_D2@PF7_D3@PF6[3] Up to 256 MB
CLK@PF10_nCS@PB10_D0@PF8_D1@PF9_D2@PF7_D3@PF6 Up to 256 MB
  1. ↑ Default loader for STM32F72x, STM32F73x, STM32F76x, STM32F77x devices
  2. ↑ Default loader for STM32F74x and STM32F75x devices
  3. ↑ Default loader for STM32F779NI devices

For further information regarding supported pin configurations on official evaluation boards, please refer to the following pages:

For pin configurations, different from the ones mentioned above, please get in touch with SEGGER directly via our support system: https://www.segger.com/ticket/.

Device specific handling

Reset

  • The device uses normal Cortex-M reset, no special handling necessary, like described here.

Debug specific

Securing/unsecuring the device