Weston Braun
11/18/2021, 1:29 AMTim Edwards
11/19/2021, 4:45 PMtest/caravel_hkflash.py
in the caravel
repository is the easiest way to program the flash. All you need to do to use pass-through mode is to access the housekeeping SPI and send the single-byte command 03
, after which all SPI data goes straight to the flash chip until CSB is raised. The script uses the Python pyftdi
library, so it's pretty universally compatible (although I have had difficulty with Windows WSL due to accessing low-level device drivers).tnt
01/28/2022, 9:40 AMjeffdi
Weston Braun
02/02/2022, 6:37 AMWeston Braun
02/02/2022, 6:38 AMpython3 ../util/caravel_hkflash.py blink.hex
Success: Found one matching FTDI device at <ftdi://ftdi:232>h:1:9/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 = 1024
status reg_1 = 0xff
status reg_2 = 0xff
************************************
verifying...
************************************
^Z
[1]+ Stopped sudo make flash
Now:Weston Braun
02/02/2022, 6:38 AMpython3 ../util/caravel_hkflash.py blink.hex
Success: Found one matching FTDI device at <ftdi://ftdi:232>h:1:c/1
Caravel data:
mfg = ffff
product = ff
project ID = ffffffff
make: *** [Makefile:27: flash] Error 2
Weston Braun
02/02/2022, 6:42 AMWeston Braun
02/02/2022, 6:57 AMWeston Braun
02/02/2022, 7:01 AMWeston Braun
02/02/2022, 7:52 AMWeston Braun
02/02/2022, 7:53 AMWeston Braun
02/02/2022, 7:54 AMWeston Braun
02/02/2022, 7:54 AMWeston Braun
02/02/2022, 8:52 AMWeston Braun
02/02/2022, 8:54 AMTim Edwards
02/02/2022, 2:41 PMTim Edwards
02/02/2022, 2:44 PMWeston Braun
02/02/2022, 6:35 PMTim Edwards
02/02/2022, 7:40 PMWeston Braun
02/03/2022, 9:08 AMWeston Braun
02/03/2022, 9:08 AMTim Edwards
02/03/2022, 1:59 PMWeston Braun
02/03/2022, 5:40 PMWeston Braun
02/03/2022, 7:41 PMWeston Braun
02/03/2022, 7:42 PMWeston Braun
02/03/2022, 7:43 PMWeston Braun
02/03/2022, 7:43 PMWeston Braun
02/03/2022, 7:45 PMWeston Braun
02/03/2022, 7:51 PM