Yatharth Agarwal
06/20/2023, 8:23 AMTim Edwards
06/20/2023, 12:57 PMYatharth Agarwal
06/25/2023, 6:24 PMgpio_test
would result in IO0 and IO1 not blinking?
I had a another doubt whether would it be possible to implement the same for caravel_hkflash.py
? if yes it would be grateful if you could provide your inputs on how to do that.Tim Edwards
06/25/2023, 6:44 PMcaravel_hkflash.py
needs to be concerned about is that it needs to get feedback from the flash chip on when writing has completed, and the flash chip JEDEC values, which it would normally get from the SPI SDO (GPIO[1]), and it should not exit when it gets nothing back from the query for vendor and project ID from caravel's housekeeping SPI.
For analog projects, the nucleo board version of the flash programming script (nucleo/flash.py
) has a setup which assigns the flash MISO pin to SDO, so the flash programming script will see the output from the flash chip even though it can't see the output from the housekeeping SPI.
The problem with doing this outside of the nucleo board (i.e., in caravel_hkflash.py
) is that you can't automatically swap pins, so you'll need to cut the line between GPIO[1] and the FTDI, and instead connect that pin of the FTDI to "SO" on the bottom line of pins. I haven't tried that and I won't recommend doing that without knowing if the FTDI will end up interfering with the flash. Since GPIO[1] output is effectively floating, it may be sufficient just to jumper between SO and GPIO[1] for the duration of flash programming (with the caveat that I haven't tried it so I don't know if it works).Yatharth Agarwal
06/25/2023, 7:57 PMYatharth Agarwal
06/25/2023, 8:11 PMcaravel_hkflash.py
and that seems to be a quick and successful work around to flashing the firmware😅Tim Edwards
06/26/2023, 1:50 PMcaravel_hkflash.py
, but you need more than just commenting out the line which checks the manufacturer ID, because each programming block needs to query the SPI flash and wait for the "done" signal to tell it that programming has been done, as well as read back the memory to validate. So you do need to bypass the GPIO[1] pin and go straight from the flash SO line to the FTDI.