cancel
Showing results for 
Search instead for 
Did you mean: 

New STM32_ExtMem_Manager driver for STM32H7S7 won't erase/write sectors

nico23
Senior III

I'm using an STM32H7S78-DK board and I have a part of the firmware that, from the boot, updates the FLASH from a .bin inside an SD card

The code is pretty simple as I loop the FLASH comparing every sector with the one in the SD card and, if different I erase the internal flash sector and write the new one.

Everything was working correctly until a update the code via CubeMX

The read seems to still working

if (EXTMEM_Read(0, fw_offset, flash_buf, br) != 0)

but as soon as I do the

if (EXTMEM_EraseSector(0, fw_offset, FLASH_SECTOR_SIZE) != 0)

I got an error

The crash happens in

          if (EXTMEM_DRIVER_NOR_SFDP_OK != EXTMEM_DRIVER_NOR_SFDP_SectorErase(&extmem_list_config[MemId].NorSfdpObject,
                                                                              local_address, sector_type))
          {
            retr = EXTMEM_ERROR_DRIVER;
          }

I've rolled back just the driver in the STM32_ExtMem_Manager, and everything started working again

I've noticed that quite a few files have been changed, including the addition of #define EXTMEM_DRIVER_CUSTOM     0

In the conf_template, it could be helpful to understand what's changed. Everything else has stayed the same. Where should I look?

 
Another thing that has changed, if it is useful to understand the changes, is that in stm32_sfdp_driver.c the 
#define ERASE_COMMAND 0x60 has been deleted
 
What could be the issue?
 
I've just found out that I've updated from SLA0044 Rev5/February 2018 to SLA0044 Rev6/October 2025
0 REPLIES 0