Skip to main content
Visitor II
October 13, 2023
Solved

Can SPI-Flash be programmed by USB via CubeProgrammer ?

  • October 13, 2023
  • 2 replies
  • 1432 views

If I use CubeProgrammer to connect the internal boot loader of STM32H750XBH6 via USB (pull Boot-0 high), can I program the external SPI Flash through CubeProgrammer? I know it's possible to do this using ST-Link (ps. by stldr) directly, but I can't do it using USB by similiar way.

rogerhuang_0-1697185399937.png

 

This topic has been closed for replies.
Best answer by Aziz BRIGUI

Hello @rogerhuang,

 

This use case is not supported with the STM32 internal bootloader, so I suggest developing your custom USB bootloader to support the SPI flash. You can refer to AN3156 and the open bootloader middleware for guidance.

 

Aziz

2 replies

Aziz BRIGUI
Aziz BRIGUIBest answer
Technical Moderator
October 13, 2023

Hello @rogerhuang,

 

This use case is not supported with the STM32 internal bootloader, so I suggest developing your custom USB bootloader to support the SPI flash. You can refer to AN3156 and the open bootloader middleware for guidance.

 

Aziz

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
Tesla DeLorean
Guru
October 13, 2023

No

But in lieu of an external loader you could implement a USB-DFU device capable of describing all the memories in the system and facilitating the use of STM32 Cube Programmer. 

The alternative on say a H750 with limited internal Flash is to be a USB-MSC and allow for drag-n-drop, there should be code from Microsoft and Arduino implementing such methods as UF2 or whatever. I've build things where QSPI, or a portion, is used as a direct MSC volume, the loader can then recover files by name to perform updates into the active / code portion of the QSPI

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