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
I was having trouble localizing a problem before with the SPIFlash library and finally pinned it down to its interaction with the SleepyDog library. I created a minimal example which basically causes SPIFlash writes to corrupt the file system (see attached). This example works when you comment out the Watchdog.sleep(1000); ... to reproduce the error, follow these steps, first with that line commented out:
format the M4 Express using the SdFat_Format example
run the minimal example attached
run the SdFat_OpenNext example to see what was written
Then repeat that with the Watchdog.sleep(1000); line and watch the file system become corrupted. Any ideas what in the SleepyDog library is causing this?
after sleeping seems to fix the problem. Basically, some of the configuration done in startup.c is apparently lost when the SAMD51 goes to standby. The only reason I thought to look at this is because I noticed that sleeping also changed the pitch of a physical oscillator (a change of about 230 cents) I have connected to the device ... so I assumed it was changing the timers' configuration. Looking at wiring.c and startup.c, I localized an area of code that appeared to re-configure it properly after sleep. In all honesty, I have no idea what it does, but it seems to fix both problems. Any clues as to why this works?
I was having trouble localizing a problem before with the SPIFlash library and finally pinned it down to its interaction with the SleepyDog library. I created a minimal example which basically causes SPIFlash writes to corrupt the file system (see attached). This example works when you comment out the Watchdog.sleep(1000); ... to reproduce the error, follow these steps, first with that line commented out:
Then repeat that with the Watchdog.sleep(1000); line and watch the file system become corrupted. Any ideas what in the SleepyDog library is causing this?
Flash_Memory_Problem_Minimal_Example.txt
Update: this same crash happens when using CircuitPython to create the file system and see what is written.
The text was updated successfully, but these errors were encountered: