forked from micropython/micropython
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Description
Adafruit CircuitPython 10.0.0-alpha.2-36-g53a856b67a on 2025-04-23; Adafruit Fruit Jam with rp2350b
reinit_display.py:
from displayio import release_displays
import picodvi
import board
import framebufferio
SIZE = (640, 480)
# initialize display
release_displays()
fb = picodvi.Framebuffer(
SIZE[0],
SIZE[1],
clk_dp=board.CKP,
clk_dn=board.CKN,
red_dp=board.D0P,
red_dn=board.D0N,
green_dp=board.D1P,
green_dn=board.D1N,
blue_dp=board.D2P,
blue_dn=board.D2N,
color_depth=8,
)
display = framebufferio.FramebufferDisplay(fb)
# display.auto_refresh = False
# print("after set auto refresh")
set_auto_refresh.py:
import supervisor
display = supervisor.runtime.display
display.auto_refresh = False
If I run these two scripts back to back in the REPL they raise an exception about not being able to set auto_refresh on the display.
>>> import reinit_display
>>> import set_auto_refresh
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "set_auto_refresh.py", line 3, in <module>
AttributeError: can't set attribute 'auto_refresh'
If I un-comment the line setting auto_refresh in the reinit_display.py that one does seem to succeed and does not raise the exception. Only when trying to set the auto_refresh from another file it raises this exception.