-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
[RP2] machine.soft_reset() hangs when i2s is not deinitialized #14339
Comments
Solved in mentioned PR. Waiting for feedback on the issue. |
Thanks for the detailed report and reproduction. I can confirm the issue on a Pico. And the same issue exists on the stm32 port (tested with a PYBv1.0), and I assume it also exists on the mimxrt port. The fix would be to enable finalisers on I2S objects for all the ports, following how esp32 does it. That would also fix other cases of I2S instances being GC'd without |
The mimxrt port de-inits I2S on soft reset. But as for enabling finalizers: during soft reset |
The i2s object contains usually pointers to buffers, allocated with m_new(). Assuming that |
Ah, so it does! It could instead use finalisers, that would have the same effect.
Yes,
That's a very good point. If you call So this needs some more thought... maybe we need a |
Checks
I agree to follow the MicroPython Code of Conduct to ensure a safe and respectful space for everyone.
I've searched for existing issues matching this bug, and didn't find any.
Port, board and/or hardware
RPI_PICO
MicroPython version
MicroPython v1.22.2 on 2024-02-22; Raspberry Pi Pico with RP2040
Reproduction
machine.soft_reset()
audio_out.deinit()
and no. 2 againExpected behaviour
machine.soft_reset() resets machine
Observed behaviour
device hangs, requiring hardware reset or reconnecting USB
Additional Information
Verified on latest git commit and official release 1.22.2. This issue is pin-independent.
The text was updated successfully, but these errors were encountered: