Implement S_CMD_S_PIN_STATE command - #4
Conversation
|
@dan-corneanu Sorry, just noticed your mention 😅 I just read through the serprog docs as well as the implementation in flashrom, and your code looks correct to me. |
|
@kazigk why did you use a PIO implementation of SPI instead of using one of the hardware SPI peripherals? |
|
Coming back to this, after a long break, I am not able to reproduce the issue anymore. Most probably it was related to some electrical fault. I can confirm that I have done a bit of refactoring to move the I am not sure if |
|
I am looking for a SPI flash programmer that can enable/disable output and allow the device to boot. I believe rp2040+this patch does what I am looking for. What is the plan for this PR. Does it look good to be merged? |
@anatol this PR is probably quite specific to my board that also has a reset pin that needs to be driven down during programming. |
I have an FPGA dev board that has a flash SPI chip. Besides MISO, MOSI, SCK and CS pins it also has a CREST pin that needs to be driven low when you access the flash chip. Currently I have to manually ground CRESET every time I upload a new image to the flash chip.
I thought, I could take advantage of the S_CMD_S_PIN_STATE cmd and drive the CREST pin low on Output drivers enabled and high on Output drivers disabled.
I've implemented some code to handle the S_CMD_S_PIN_STATE cmd. However, the CREST pin (connected to GP5) does not toggle as expected. Could someone please have a look and tell me if I have missed something?