8000 rp2 PIO: Allow merging Tx/Rx FIFOs together · Issue #6854 · micropython/micropython · GitHub
[go: up one dir, main page]

Skip to content

rp2 PIO: Allow merging Tx/Rx FIFOs together #6854

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tjvr opened this issue Feb 6, 2021 · 1 comment
Closed

rp2 PIO: Allow merging Tx/Rx FIFOs together #6854

tjvr opened this issue Feb 6, 2021 · 1 comment
Labels

Comments

@tjvr
Copy link
Contributor
tjvr commented Feb 6, 2021

The PIO state machines on the RP2040 have 4 word deep TX and RX FIFOs. If you only need one direction, you can "merge" them into either a single 8 word deep TX or RX FIFO. The uart_rx example does this for example.

This merging is controlled using sm_config_set_fifo_join:

    sm_config_set_fifo_join(&c, PIO_FIFO_JOIN_RX);

I can't see a way to set this from MicroPython; it looks like sm_config_set_fifo_join is never called. Is this intentional?

Happy to try writing another PR if you agree we should add this. I'm not sure what the API would look like!

@dpgeorge
Copy link
Member
dpgeorge commented Feb 6, 2021

I can't see a way to set this from MicroPython; it looks like sm_config_set_fifo_join is never called. Is this intentional?

It's simply not implemented at the moment.

Happy to try writing another PR if you agree we should add this. I'm not sure what the API would look like!

Feel free to. I think it can just set the relevant bits in shiftctrl in PIOASMEmit.__init__, so it needs some new keyword args to that constructor. Maybe fifo_join=PIO.JOIN_TX?

tjvr added a commit to tjvr/micropython that referenced this issue Apr 2, 2021
The PIO state machines on the RP2040 have 4 word deep TX and RX FIFOs. If you only need one direction, you can "merge" them into either a single 8 word deep TX or RX FIFO.

We simply add constants to the PIO object, and set the appropriate bits in `shiftctrl`.

Resolves micropython#6854.
tjvr added a commit to tjvr/micropython that referenced this issue Apr 2, 2021
The PIO state machines on the RP2040 have 4 word deep TX and RX FIFOs.
If you only need one direction, you can "merge" them into either a
single 8 word deep TX or RX FIFO.

We simply add constants to the PIO object, and set the appropriate bits
in `shiftctrl`.

Resolves micropython#6854.
tjvr added a commit to tjvr/micropython that referenced this issue Apr 16, 2021
The PIO state machines on the RP2040 have 4 word deep TX and RX FIFOs.
If you only need one direction, you can "merge" them into either a
single 8 word deep TX or RX FIFO.

We simply add constants to the PIO object, and set the appropriate bits
in `shiftctrl`.

Resolves micropython#6854.

Signed-off-by: Tim Radvan <tim@tjvr.org>
alphaFred pushed a commit to alphaFred/micropython that referenced this issue Apr 17, 2021
The PIO state machines on the RP2040 have 4 word deep TX and RX FIFOs.  If
you only need one direction, you can "merge" them into either a single 8
word deep TX or RX FIFO.

We simply add constants to the PIO object, and set the appropriate bits in
`shiftctrl`.

Resolves micropython#6854.

Signed-off-by: Tim Radvan <tim@tjvr.org>
ksekimoto pushed a commit to ksekimoto/micropython that referenced this issue Jul 16, 2021
The PIO state machines on the RP2040 have 4 word deep TX and RX FIFOs.  If
you only need one direction, you can "merge" them into either a single 8
word deep TX or RX FIFO.

We simply add constants to the PIO object, and set the appropriate bits in
`shiftctrl`.

Resolves micropython#6854.

Signed-off-by: Tim Radvan <tim@tjvr.org>
Wind-stormger pushed a commit to BPI-STEAM/micropython that referenced this issue Sep 8, 2022
Add info and link for Web Workflow /code/ page
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants
0