forked from micropython/micropython
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Milestone
Description
CircuitPython version
Adafruit CircuitPython 8.0.0-beta.4 on 2022-10-30; Raspberry Pi Pico with rp2040(It also crashes 7.)
Code/REPL
import board
import pwmio
class PWMOutExtend(pwmio.PWMOut):
def __init__(self, pin, frequency=1000, slew_rate=1000):
super().__init__(pin, frequency=frequency)
self.foo_bar_baz = 0
self.duty_cycle = 0
led = PWMOutExtend(board.GP25, frequency=1000)
print('before')
led.foo_bar_baz = 0
print('after')Behavior
You see "before" on the REPL and then the device freezes. If you put it in code.py you now have to enter safe mode to access CIRCUITPY.
Description
Every line of the example is necessary except for the prints. In particular all three assignments are necessary.
I can't reproduce it when extending a class I defined myself.
Additional information
No response