cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G474 FW update through SPI DFU mode using STM32H753

AShel.1
Associate III

I'm using STM32G474RE board as a slave and STM32H573 eval board as a host. I want to update FW of STM32G474 through SPI DFU mode from STM32H753.

I've compiled the repository code for IO toggle in STM32CubeIDE

STM32CubeG4-master\Projects\NUCLEO-G474RE\Examples\GPIO\GPIO_IOToggle\

If I check generated hex file, I see there is data missing @address 01D0, If I create DFU file using this hex file, I see DFU file has 2 elements, one with ~504 bytes and 2nd is with ~ 5000bytes. I can read data and addresses correctly in STM32H753.

my question:

:0801D000690200086902000841

  1. as 01D0 address has only 8 bytes of data shall I fill rest 8 bytes with 0xFF value OR 0 value?
  2. is there any issue in this hex file as data is missing at particular address?
  3. is there any setting in STM32CubeIDE with which I can generate continuous hex file without any data missing in between because I think because of this data break in between the file, DFU File Manager looks at it as a 2 separate images and creates 2 target elements.

thanks,

0693W000006FmFwQAK.png

1 REPLY 1
Hopeful Programmer
Associate II

My guess is that if the data isn't in the hex file then the values can be written as anything since they are not used.

Is this the SPI comms you send to your device to enter the SPI DFU mode? I am still waiting on ST to help me use the DFU mode with SPI but to no success.

MOSI MISO

0x5A  0xAA

200ms Delay

0x00  0xAA <------ to be sent to the MCU followed by a message of it being XOR against 0xFF

200ms Delay

0x5A  0xAA

0xAA  0xAA <------ Parroting MCU message back

0x55  0xAA <------ Parroting MCU message XOR against 0xFF back

0x00  0xAA <------ No NACK or ACK...