Hopefully not too much of a silly question.
I’m talking to SD cards over SPI just using a breakout plank.
Documentation seems to suggest you initialise in 100-400khz and after that bump it up.
There doesn’t seem to be a way I can see to edit spi speed in session and exiting shuts off voltage. This means you can’t initiate in 400 and then move up later on.
Am I missing something or just not understanding something?
You can just “reinitialize” the SPI mode (just type m spi) to change the configuration. This will however disable the power supplies. I do not think there is a way to change the speed without disabling the power supplies.
However i do not think this is necessary anyways, as this is not a “typical” SPI requirement. I read the “initialise in 100-400khz and after that bump it up” as: “ensure that your wiring and commands work at a lower speed and afterwards test it at higher speeds”. Lower speeds are not as error prone from an hardware point of view. If you have long wires, high speeds might not be possible.
I think you could comment the line 175 in the file ui_mode.c and test if this works for you:
modes[HIZ].protocol_setup_exc(); // disables power supply etc.
This should stop the disabling of of the power supplies when running the “m” command. However, this could create some unforeseen issues. I tested this quickly and i could change the speed by running the “m” command a second time, without turning the power supplies off. (I just measured the clk as a test)