You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
experimental::SPI0Command causes an Exception on return to ICACHE address space. The issue was seen with flash non-volatile write operations like Write Status Register, Erase Sector, etc.
In _SPICommand, Adding a call to Wait_SPI_Idlep before restoring interrupts resolves the problem. I'll follow up with a PR.
PRECACHE_END();
if (!spiIfNum) {
// w/o a call to Wait_SPI_Idlep, 'Exception 0' or other exceptions (saw// 28) may occur later after returning to iCache code. This issue was// observed with non-volatile status register writes.//// My guess: Returning too soon to uncached iCache executable space. An// iCache read may not complete properly because the Flash or SPI// interface is still busy with the last write operation. In such a case,// I expect new ICACHE "code or literals" Reads result in zeros. This// would explain an Exception 0 for code, and Exception 20, 28, and 29// where a literal was misread as 0 and then used as a pointer.Wait_SPI_Idlep((SpiFlashChip *)fchip);
xt_wsr_ps(saved_ps);
}
return (timeout>0 ? SPI_RESULT_OK : SPI_RESULT_TIMEOUT);
}
Basic Infos
Platform
Settings in IDE
Problem Description
experimental::SPI0Command
causes an Exception on return to ICACHE address space. The issue was seen with flash non-volatile write operations like Write Status Register, Erase Sector, etc.In
_SPICommand
, Adding a call toWait_SPI_Idlep
before restoring interrupts resolves the problem. I'll follow up with a PR.MCVE Sketch
Debug Messages
The text was updated successfully, but these errors were encountered: