-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
raspberrypi: support PIO on high pins #9901
Conversation
ping @ladyada |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i believe you! but maybe @dhalbert can do a more 👁️ review
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for doing all this work! The macros to manipulate bitmasks are a nice addition. At first I thought they were pre-existing, but I saw that you added them.
- I merged the Pico-PIO-USB update. Could you update to the merge commit? Thanks.
- I tested I2SOut on Feather RP2040. I happened to have a test program that played a tone. No sound comes out with this build. Feather RP2040 PropMaker would also be an easy test board.
test program: this was adapted from a test program someone else had supplied for testing something else entirely
import array
import audiocore
import audiobusio
import board
import math
import time
# I2S audio out
audio = audiobusio.I2SOut(board.D9, board.D10, board.D11)
# Generate one period of sine wave.
length = 8000 // 440
sine_wave = array.array("H", [0] * length)
for i in range(length):
val = int(math.sin(math.pi * 2 * i / length) * (2 ** 15 - 1) + 2 ** 15)
sine_wave[i] = val
sine_wave = audiocore.RawSample(sine_wave, sample_rate=8000)
while True:
audio.play(sine_wave, loop=True)
time.sleep(2)
audio.stop()
these were inverted but didn't notice before since the macro was too
OK I think this is right now. There were a variety of problems but all caused by just a couple of bits of wrong thinking. testing performed:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the thorough testing. I retested I2SOut on an RP2040 and and RP2040 Prop-Maker.
I'm skeptical about this, but I just put this artifact on a Solder Party 2350 Stamp XL in the RP2xxx carrier board and it's resulting in a boot straight to safe mode. |
@RetiredWizard I tried artifacts from https://github.com/adafruit/circuitpython/actions/runs/12678008250 on my proto Metro RP2350 (RP2350B). The board UF2 works with no safe mode, and so does the Solder Party 2350 Stamp XL UF2. There is no interesting code.py. |
Okay, well I'm getting the safe mode boot with stable as well so I'll do some more digging to see if it's just my board. I deleted code.py/main.py just to be sure 😁 |
Definitely something on my end, I just had good boots from 9.2.0, then 9.2.1 and now the firmware you linked is working fine. Sorry for the false alarm.... |
@RetiredWizard np - thank you for testing! |
Testing performed: on a Metro RP2350 prototype, used
neopixel_write
on pin A0 (GPIO41) & scoped it.Also, the built in neopixel still works.
Note that this does not enable USB Host on the 4-pin header, see sekigon-gonnoc/Pico-PIO-USB#133This also fixes USB Host, though it depends on an additional pull request: adafruit/Pico-PIO-USB#1 (us) or sekigon-gonnoc/Pico-PIO-USB#157 (upstream)
Closes: #9897