Solved
OSPI skipping bytes
We have been using an STM32 U585 with additional external FLASH connected to OSPI1 and external PSRAM connected to OSPI2. This is not on a dev kit, it is our own hardware. The PSRAM is memory-mapped and is using the HyperBus protocol. We have noticed that every once in awhile the PSRAM will skip two bytes while reading from the memory. As this is a memory mapped peripheral, we are reading it via memcpy, and we don't see HAL_OSPI_ErrorCallback or HAL_OSPI_AbortCpltCallback hit. It appears to always skip 2 bytes after the first 8 bytes of the memcpy, and it still transfers the full number of bytes, walking 2 bytes past the end of the desired read. Even stranger, if we immediately issue the same memcpy after detecting this issue, it works correctly on the second attempt.
I have walked through the errata and the datasheets and cannot find a rhyme or reason as to why we would be deterministically dropping bytes like this. It is always the same 2 bytes from the same 20 byte memcpy. It is always corrected on a second read, and there is no indication from the HAL or the hardware that anything has gone wrong.
Does anyone have any insight into what could cause something like that? Any ideas on debugging efforts I could try to further test this, or OSPI settings that might be worth manipulating?
