Xinyuan-LilyGO / T-Display-S3

MIT License
733 stars 174 forks source link

Micropython giving OSError: 261 #142

Closed codiak6335 closed 1 month ago

codiak6335 commented 1 year ago

using the example code and running from Thonny, the first run the background light will ignite. Putting that aside for the moment, you can run the code repeatedly without issue. However, if you uncomment line 32, the text never appears on the first run after a reset, but ever subsequent run fails as well with

Traceback (most recent call last): File "", line 13, in OSError: 261(esp_lcd_new_i80_bus)

`import lcd from machine import Pin import logo import gc import time

gc.enable()

i8080 = lcd.I8080(data=(Pin(39), Pin(40), Pin(41), Pin(42), Pin(45), Pin(46), Pin(47), Pin(48)), command=Pin(7), write=Pin(8), read=Pin(9), cs=Pin(6),

backlight=Pin(38),

                 pclk=2 * 1000 * 1000,
                 width=320,
                 height=170,
                 swap_color_bytes=False,
                 cmd_bits=8,
                 param_bits=8)

st = lcd.ST7789(i8080, reset=Pin(5), backlight=Pin(38))

st.reset() st.init() st.invert_color(True) st.swap_xy(True) st.mirror(False, True) st.set_gap(0, 35) st.backlight_on()

st.text("Hello World", 1, 2, st.color565(0, 255, 0))

time.sleep(0.1) del st i8080.deinit() gc.collect() `

codiak6335 commented 1 year ago

This is reproducible with the default boot.py showing the logo simply by trying to execute the code multiple times without a hardware reset.

github-actions[bot] commented 2 months ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 1 month ago

This issue was closed because it has been inactive for 14 days since being marked as stale.