raspberrypi / pico-micropython-examples

Examples to accompany the "Raspberry Pi Pico Python SDK" book.
BSD 3-Clause "New" or "Revised" License
1.01k stars 228 forks source link

Need FIFO joining example #27

Closed IndustrialMuffin closed 3 years ago

IndustrialMuffin commented 3 years ago

While going through the RP2040 Datasheet https://datasheets.raspberrypi.org/rp2040/rp2040-datasheet.pdf Chapter 3 PIO, section 3.5 Functional Details, then looking for documentation and examples of FIFO joining in micropython, the only thing I've found is https://forum.micropython.org/viewtopic.php?t=9814&p=54996

It'd be convenient to have an example of FIFO joining here with all these other wonderful examples.

lurch commented 3 years ago

That forum thread you linked to says "MicroPython doesn't provide an API for this (yet)."

AFAIK the examples in this repo only illustrate using MicroPython APIs; so without MicroPython API support for joining PIO FIFOs, there won't be any pico-micropython-examples showing how to join PIO FIFOs.

IndustrialMuffin commented 3 years ago

Seems like a fairly valid point lurch. Now it looks like fifo_join support has recently been added to MicroPython. Gotta figure out how to use it and test it out. fifo_join support added here

lurch commented 3 years ago

If you do figure it out, Pull Requests are always welcome :slightly_smiling_face:

kevindawson commented 3 years ago

@lurch @IndustrialMuffin

from MicroPython GitHub

issue:

pull:

lurch commented 3 years ago

@kevindawson Yes, that's related to @IndustrialMuffin 's "it looks like fifo_join support has recently been added to MicroPython" comment.

My "Pull Requests are always welcome" comment was WRT to adding an example of using FIFO joining to this pico-micropython-examples repo. Unfortunately all the RPi engineers are too busy with other stuff to have time to add new example code.

kevindawson commented 3 years ago

@lurch from MicroPython GitHub

example: pio_uart_rx.py

lurch commented 3 years ago

I'm not sure if there's value in duplicating example-code between multiple repos? :shrug: (it can often lead to the situation where fixes made in one version don't appear in the other version)

Sounds like a decision for @aallan to make :smiley:

kevindawson commented 3 years ago

@lurch with all my reading around - example I had seen ;) Please do not duplicate I think it would be better just to have links

lurch commented 3 years ago

I think it would be better just to have links

Good idea, see #34 :slightly_smiling_face:

kevindawson commented 3 years ago

@lurch Cool ;) @IndustrialMuffin if your a happy bunny now, please close.