Here's a workaround for the elusive "Error 6" (ERR__I2C_WRITE_TIMEOUT) when saving patches.
Change line 121 of COYOTE1_I2C_Driver.spin from:
- Code: Select all
if cnt - start_time > clkfreq / 10
To:
- Code: Select all
if (cnt - start_time) > (80_000_000 / 10) ' Note: longest expected delay is 10msec. This will wait 100msec before timing out.
I'm still chasing down why the change from "clkfreq" to "80_000_000" makes a difference; the values should be equivalent (the parenthization doesn't matter; I just added it to be clear). Something about executing the tube distortion patch appears to modify the value of clkfreq (which should not happen). I'll get to the bottom of it, but in the meantime the patch above will correct the problem until I can solve it properly.
NOTE: Both lines of code are equivalent, but the former is more portable. There's very little downside to adopting the latter permanently, but the fix masks the underlying problem which is that clkfreq should be 80000000 at boot and never change, so I need to go figure out how and why it is being altered.
steve_b said:
I thought you hadn't turned on the I2C yet.
There is no release code which talks to external devices on the expansion port yet, but the EEPROMs both sit on I2C. The Propeller uses I2C to boot from the primary EEPROM on reset/cold boot, and the Coyote-1 uses the upper regions of the primary EEPROM to store Dynamic Modules, Patches, and configuration data.