Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 5041

General • Re: Receive then send data in the same pin using PIO

$
0
0
I though I only need sm_config_set_set_pins to set pindirs but it turns out I need sm_config_set_sideset_pins as well.
Not necessarily, you need to configure SIDESET only if you use it.
Side-set also makes GPIO mapping much more flexible, as its mapping is independent from SET.
Like this:
.side_set 1
out pins, 1 side 0
I see. I removed sm_config_set_sideset_pins and it I was still able to send data. I guess it was just stupid of me to wait for the data pin to go low instead of setting it low to start transmitting. Master already released the data pin as soon as the 2nd pin is set low (pin that determines who's turn it is to send data).

Thanks!

Statistics: Posted by Jerahya — Fri Nov 08, 2024 4:26 pm



Viewing all articles
Browse latest Browse all 5041

Trending Articles