-
he CLK and SI lines are shared with the LCD (also SPI) and the accelerometer (I2C). However, I have not initialized either of those.
Maybe you could initialize it. For display at least making CS pin high may help to make sure it is not picking up the data. However the i2c device may be more probable to break stuff if SDA is shared with MISO or MOSI and clock is shared between spi and i2c too. I guess i2c device could pick up some data as i2c transfer and try to respond over SDA(?) messing up data bits randomly. just a guess.
Hey all, I've put Espruino on a smartwatch (SN80-Y from Yfit) and have figured out most of the pins and components (lcd, accel, touch) but am having trouble getting the XTX XT25F32B (4MB flash) chip to be reliable. Verified the following pins using multimeter: CS=D19, SO=D18, SI=D17, CLK=D20. Doing a wakeup, followed by getting vendor ID and capacity seems fine:
That seems fine:22 at the end should mean 2^22 bits, or 4MB. So i've included it in my board file. In the devices section I have:
And when flashed I see:
I then use this test script just to read the first few blocks of 256 bytes:
The timeout was added because I was running into issues without it. This seems to work if I save it to RAM, as I get data (remnants from previous attempts to write):
In the first line you can see the ASCII for "TEST" which was the name of the file I attempted to write in the IDE.
So the problem is when I try to save the test code to Storage (or Flash):
The other notable thing is that the CLK and SI lines are shared with the LCD (also SPI) and the accelerometer (I2C). However, I have not initialized either of those. In other tests, LCD works fine as does the accel, but I'm trying to leave out any issues with line sharing.
Any pointers greatly appreciated!