Fixes exceptions resulting from using SPI0Command
Resolves exceptions occurring when using experimental::SPI0Command for flash write operations such as: Write Status Register-1, Sector Eraser, etc.
- https://github.com/esp8266/Arduino/issues/9139#issue-2299471911
Moved PRECACHE_END to ensure Wait_SPI_Idlep and xt_wsr_ps are included in the iCache.
Added SPIUCSSETUP to give more settling time for #CS.
Let's put this on hold. I need to look closer at the sequence of calls used when doing write enabled by other examples. Some examples poll the status register until bit WEL is set before continuing.
Let's put this on hold. I need to look closer at the sequence of calls used when doing write enabled by other examples. Some examples poll the status register until bit WEL is set before continuing.
Still on hold?
Is this related to a specific flash chip? Or does this happen at random (or not so forced random) on any hardware?
It looks ready. I haven't found any more issues.
Is this related to a specific flash chip? Or does this happen at random (or not so forced random) on any hardware?
This may be me overanalyzing and being over-cautious. The BootROM's SPI_write_enable() is consistently used to enable WEL. This appears to be the case in NONOS SDK and RTOS examples. And, that function likes to spin until the WEL bit is set. This kind of coding reminds me of some of the anomalies workarounds I have seen.