We're seeing a problem with flash load on boot. This is a custom board with MPFS250T and MT25Q flash. On most boards, we were seeing about 5-10% boot failure. The HSS is done, but application crashes on start. One board, once it warmed up, failed 90% of the time. We could see the HSS thought it was done (final debug msg), but the flash was still reading (scope probe on SPI bus). So when the application starts, it see uninitialized ram. Was able to trace the problem to the MSS_SYS_spi_copy returning before the flash copy was done. We are setting MSS_SYS_SERVICE_POLLING_MODE, so it should be blocking.
Added a check in getBootImageFromSpiFlash_, if the copy doesn't take as long as it should, add appropriate HSS_SpinDelay_MilliSecs
This has reduced the failures about 90%. The remaining failures can't read the header info (magic number is zero).
Anyone seen this or have any suggestions?
Thanks
We're seeing a problem with flash load on boot. This is a custom board with MPFS250T and MT25Q flash. On most boards, we were seeing about 5-10% boot failure. The HSS is done, but application crashes on start. One board, once it warmed up, failed 90% of the time. We could see the HSS thought it was done (final debug msg), but the flash was still reading (scope probe on SPI bus). So when the application starts, it see uninitialized ram. Was able to trace the problem to the MSS_SYS_spi_copy returning before the flash copy was done. We are setting MSS_SYS_SERVICE_POLLING_MODE, so it should be blocking.
Added a check in getBootImageFromSpiFlash_, if the copy doesn't take as long as it should, add appropriate HSS_SpinDelay_MilliSecs
This has reduced the failures about 90%. The remaining failures can't read the header info (magic number is zero).
Anyone seen this or have any suggestions?
Thanks