I have already performed such tests for various config functions, but I don't remember the exact conclusions.. But its result is misleading. Commenting it out (and recompiling the code) does not cause CLK to stop working. However, the program with the commented-out fragment stops working after power is turned off. I assume there is some setting in RP1 that can only be turned on. After enabling it, changing the program no longer makes a difference, because the pin will already be enabled by the previous program. I'm not sure if this is definitely the case, and this is why I am asking.1. Comment out the set_out_pins for the clk.
I repeated these tests now.
After one hour of RPi being power off, I tested the code with the commented lines:
Code:
sm_config_set_out_pins(&c, 6, 1);pio_gpio_init(pio, 6);pio_sm_set_consecutive_pindirs(pio, sm, 6, 1, true);So it looks like sm_config_set_out_pins for sideset pin is not necessary (and harmful), but I cannot be sure.
The GPIO2 and GPIO3 lines didn't work if there are sm_config_set_out_pins line for CLK sideset pin.
My conclusion is therefore as follows:
The function sm_config_set_out_pins can only be called only once.
When configuring multiple pins, the pins must be sequential and configured with a single call to this function.
The sideset pin can be elsewhere, and it does not have to be, nor can it be, configured by this function.
Do you think these conclusion are correct?
Statistics: Posted by uc_man — Sat Dec 13, 2025 3:52 pm