Issue using STM32H7S7xx with external RAM/FLASH over XSPI1
We are developing a STiROT/OEMuROT bootloader for a customer using the above chip. This is based on the STM32H7S78-DK sample. The customer has developed the main application and have added support to download a new firmware image over Ethernet. This image is stored in external RAM and once downloaded an md5 checksum of the image is stored and a flag is set to indicate that new firmware is available. At this point the device is restarted to switch to the bootloader.
We've added code to the bootloader that checks if a new firmware image is available in external RAM. If a new image is available the bootloader validates that the image is OK by recalculating the md5 checksum. The validation passes and at this point a section in external FLASH is erased. After the erase completes, the image in external RAM is copied into the external FLASH and the copied image is validated via md5 checksum - which fails.
On further investigation it is the data being read from external RAM that is incorrect (we downloaded an image with known data to test this). So it appears that erasing external FLASH causes some corruption of either the data in external RAM or reading the data. This error is repeatable: the error occurs at the same address in external RAM, and reads the same (incorrect) value. We have a number of devices available to us and all exhibit this behaviour, though while the errors are repeatable for each devices they can differ between devices in terms of location and values. We've also tried with the STM32H7S78-DK development board and have the same behaviour.
Other information: XSPI1 and 2 are swapped, MCE is disabled.
We've also applied the latest changes to Src/stm32h7rsxx_hal_xspi.c, commit 0838ced without success.
Has anyone encountered anything similar to this?
Any suggestions on likely causes or configuration changes that we could try will be greatly appreciated!
