cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G070CB v1.2 bootloader issues with some commands

sgordon777
Associate III

Hello, I'm trying to communicate with a STM32G070CBT6 bootloader, with mixed success. I've forced the chip into bootloader mode by writing a 0xDBFFE1AA to the FLASH option register (by default it was DFFFE1AA). I've verified that this value "stuck", and that the chip is booting up into bootloader mode.

Using AN4221 as a guide, and using the I2C interface, I am able to sucessfully execute the "get version" command, which returns 0x12 (bootload version 1.2).

 

However, all longer commands are failing. Here is a capture and protocol decode (with my annotations) of the "GET" command (command 0), The first 2 bytes of response is corect, however everything following that is 0x1F

 

sgordon777_0-1736617801172.png

Here's a zoom-on of the first 0x1F response:

sgordon777_1-1736618016555.png

 

 

2 REPLIES 2
butterfly
Associate III

Hi,

I understand your question, but I don't really understand what are you looking trough the bootloader mode.

Because the bootloader allow to exchange informations with the MCU, all commands work under a formatted protocol, and different interfaces.

I2C is a state protocol interface initially design to exchange datas with small peripherals, it works very well and allow to communicate with a two wires interface. The protocol used is based on state machine mechanism, the overflow of the datas address space routing to the start address.

In case of uploading executable binary, this ask more records of datas, and others interfaces should be better, I know spi and usart which re more currently used in this case.

But the question is, if you want to work with the bootloader, which enables in fact to read configuration datas and upload firmware; you need a software to do that. This software can exists may be with software packages from the ST Partners first, or by an application you have to write. The usual way to boot in bootloader mode being by hardware by a hard reset, and the correct configuration as described in AN2606, taking of the level of bootpin (usually boot 0).

Regards

Butterfly

sgordon777
Associate III

Hello butterfly and thanks for the quick answer.

 

I am using i2c because i2c is the interface on the PCB I'm trying to write the DFU update code for :), so I don't really have a choice over the inerface. That being said though, I don't see why I2c wouldn't work for this application. 

Per my message, I am already booting the chip into bootloader mode (via setting the Flash OPTION byte), and can sucessfully use the simplest bootloader command (getversion)

 

Here's an overview of the PCB

  

|imx8 SOM|<------------(i2c bus)------------->|STM32G0 micro|