cancel
Showing results for 
Search instead for 
Did you mean: 

Is QSPI-Flash program/read/erase possible via UART bootloader

KWoll.2
Associate II

Hi,

is it generally possible to program/read/erase an external connected Flash-Memory (e.g. Quad-SPI-Flash) with STM32CubeProgrammer via USART bootloader?

 

  • I'm using the STM32L496-DISCO board for test.
  • External loader MX25R6435F_STM32L496-DISCO selected
  • BOOT0 connected to Vdd
  • COM1-RX/TX/GND (3.3 V level) connected to MCU USART3 bootloader pins PC10/PC11/GND

 

With upper configuration MCU-Flash program/read/erase is possible, but no access to Quad-SPI-Flash (address = 0x90000000), see picture.

 

With selected ST-LINK probe access to Quad-SPI-Flash is possible.

 

Thanks in advance,

Karsten

 

1 ACCEPTED SOLUTION

Accepted Solutions
InsignificantBit
ST Employee

Currently, CubeProgrammer does not support programming via external loaders when connected via Bootloaders (eg. UART or USB-DFU). The External Loaders are only supported by CubeProgrammer when connected via ST-Link. This functionality is being considered, but at this time, it isn't certain.

Outside of using the CubeProgrammer, this is definitely possible. Actually, a solution for programming external flash memory via UART bootloader (X-CUBE-EXTBOOT) already exists and is described in AN4852 - "Programming an external Flash memory using the UART bootloader built-in STM32 microcontrollers", but it uses the STM32 Flash loader demonstrator which is no longer maintained.

Nevertheless, this package and application note should provide enough resources for you to be able to develop custom solution if needed.

View solution in original post

4 REPLIES 4
InsignificantBit
ST Employee

Currently, CubeProgrammer does not support programming via external loaders when connected via Bootloaders (eg. UART or USB-DFU). The External Loaders are only supported by CubeProgrammer when connected via ST-Link. This functionality is being considered, but at this time, it isn't certain.

Outside of using the CubeProgrammer, this is definitely possible. Actually, a solution for programming external flash memory via UART bootloader (X-CUBE-EXTBOOT) already exists and is described in AN4852 - "Programming an external Flash memory using the UART bootloader built-in STM32 microcontrollers", but it uses the STM32 Flash loader demonstrator which is no longer maintained.

Nevertheless, this package and application note should provide enough resources for you to be able to develop custom solution if needed.

KWoll.2
Associate II

Thank you for your quick support.

Regards,

Karsten

If you code your own mini loader you could certainly write external memories using X-MODEM from a suitable Terminal application.

The STM32 System Loader could likely facilitate a staged-loader, where you push a more complex and board specific loader into RAM, and transfer control to that

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

Hi Karsten,
did you accomplish a working solution to this issue?
I just ran into the same use case that I need to use some kind of external Loader via the UART-Bootloader and still looking for the best way to tackle this issue.
Thanks and best regards
Alex