2025-07-06 1:18 AM - edited 2025-07-06 1:28 AM
I created read/write/sector erase/bulk erase functions related to quadspi and verified their functionality in general firmware.
I also wrote Loader_Src.c and Dev_inf.c files and used STM32CubeProgrammer to check the operation of read/write/sector erase.
However, only chip erase does not work. When I backtracked this part, I got a fail message even if I wrote only "int MassErase(void) { return LOADER_OK;}" and tried to operate it.
It is the same as version 2.19 and 2.18. When I used the normal code in version 2.17, the message "success" was displayed, but the 0x90000000 area was still not erased.
int MassErase(void) {
__set_PRIMASK(0); //enable interrupts
if (HAL_QSPI_Abort(&hqspi) != HAL_OK) {
__set_PRIMASK(1); //disable interrupts
return LOADER_FAIL;
}
if (CSP_QSPI_Erase_Chip() != HAL_OK) { //Functions verified in normal firmware mode
__set_PRIMASK(1); //disable interrupts
return LOADER_FAIL;
}
__set_PRIMASK(1); //disable interrupts
return LOADER_OK;
}
STM32CUBEIDE 1.17
STM32H747ZIT
MT25QL512ABB8ESF