pico-sdk icon indicating copy to clipboard operation
pico-sdk copied to clipboard

pio_sm_set_pindirs_with_mask misbehaves if OUT_STICKY is set

Open jannic opened this issue 3 years ago • 1 comments

We fixed an issue in the rust rp2040 support which is also present in the C SDK: https://github.com/rp-rs/rp-hal/pull/432

If the OUT_STICKY bit is set, pio_sm_set_pindirs_with_mask and similar functions will change the out or outdir values of unrelated pins. The values written using the injected SET instruction will be sticky, ie. they will be applied again each PIO cycle. This still happens after resetting pinctrl with pio->sm[sm].pinctrl = pinctrl_saved. At this point, depending on the previous value of pinctrl, the values will be written to some other unintended pin.

jannic avatar Aug 25 '22 17:08 jannic

assign to @Wren6991 to think about

kilograham avatar Aug 25 '22 17:08 kilograham

was fixed in 1.5.0

kilograham avatar May 26 '23 15:05 kilograham