forked from micropython/micropython
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
Description
I didn't report this properly so far, because I wasn't able to pin point exactly what makes it crash. This is what I know:
- When imported and created from the REPL, everything works perfectly fine and there are no problems or crashes.
- When imported and created from a frozen mpy module, it crashes as soon as it tries to read the pin states inside the tick. The crash completely disables USB communication, so the disk becomes unresponsive too.
- The crash happens in the tick function when it tries to read the digital pin state. Commenting out that line makes it not crash (but of course it doesn't read the keys then).
- Creating an empty gamepad with no pins to check also makes it not crash.
- Various combinations of mpy-compiling, freezing, just importing, importing from repl, importing from main.py, etc. make it crash or not — I didn't test it enough to put my finger on when it works exactly and when it doesn't.
- Sometimes it doesn't crash, but I get a "pin in use" error.