Ok. it does not seem to be actually writing to the...
# caravel-board
w
Ok. it does not seem to be actually writing to the flash. The old blink LED program is running and it fails on the read compare. Im gonna dump the log from this in a comment on this message to avoid dumping any more blocks of text into the main channel
Copy code
python3 ../util/caravel_hkflash.py blink.hex
Success: Found one matching FTDI device at <ftdi://ftdi:232>h:1:e/1
 
Caravel data:
   mfg        = 0456
   product    = 10
   project ID = 00000000
 
Resetting Flash...
status = 0x00
 
JEDEC = b'ef4016'
Erasing chip...
done
status = 0x0
setting address to 0x0
addr 0x0: flash page write successful
addr 0x100: flash page write successful
addr 0x200: flash page write successful
addr 0x300: flash page write successful

total_bytes = 988
status reg_1 = 0x0
status reg_2 = 0x2
************************************
verifying...
************************************
status reg_1 = 0x0
status reg_2 = 0x2
setting address to 0x0
addr 0x0: *** read compare FAILED ***
b'930000009301000013020000930200001303000093030000130400009304000013050000930500001306000093060000130700009307000013080000930800001309000093090000130a0000930a0000130b0000930b0000130c0000930c0000130d0000930d0000130e0000930e0000130f0000930f00001705000013054536970500f1938505f8170600f1130686f763dcc5008326050023a0d5001305450093854500e3c8c5fe170500f1130585f5970500f1938505f56358b5002320050013054500e34cb5feef00400b6f000000b70200281303001223906200a381020063080602130f80009373f60f93de73002380d20193ee0e012380d20193931300'
<----->
b'930000009301000013020000930200001303000093030000130400009304000013050000930500001306000093060000130700009307000013080000930800001309000093090000130a0000930a0000130b0000930b0000130c0000930c0000130d0000930d0000130e0000930e0000130f0000930f00001705000013058538970500f1938505f8170600f1130686f763dcc5008326050023a0d5001305450093854500e3c8c5fe170500f1130585f5970500f1938505f56358b5002320050013054500e34cb5feef00400b6f000000b70200281303001223906200a381020063080602130f80009373f60f93de73002380d20193ee0e012380d20193931300'
addr 0x100: read compare successful
addr 0x200: read compare successful
addr 0x300: *** read compare FAILED ***
b'372700001307878023a0e700b70700269387c70023a00700b70700261307100023a0e70013000000b707002603a7070093071000e30af7feb70700219387470023a00700b70700219387870023a00700b70700219387c70023a00700b70700211307100023a0e700b707002123a00700b70700269387c70023a00700b70700269387070123a00700b70700211307100023a0e700b70700269387c7003707ffff23a0e700b7070026938707011307f0ff23a0e700232604fe6f0000018327c4fe938717002326f4fe0327c4feb77700009387f752e3d4e7fe6ff01ff9'
<----->
b'372700001307878023a0e700b70700269387c70023a00700b70700261307100023a0e70013000000b707002603a7070093071000e30af7feb70700219387470023a00700b70700219387870023a00700b70700219387c70023a00700b70700211307100023a0e700b707002123a00700b70700269387c70023a00700b70700269387070123a00700232604fe6f0000018327c4fe938717002326f4fe0327c4feb7170000938777bbe3d4e7feb70700211307100023a0e700b70700269387c7003707ffff23a0e700b7070026938707011307f0ff23a0e700232604fe'

total_bytes = 988
pll_trim = b'00'
If I restore the flash led program to the original state it passes the read compare. So I can confirm it is not writing to the flash any more.
I am unsure what to make of my first issue that now requires the button to be held during reset
It looks like the flash led program I loaded strobes a number of pins.
is there something weird where the first flash LED program was trying to flash one of the SPI pins, so I had to hold it in reset? But holding the chip in reset interferes with the ability to program the flash?