adafruit / circuitpython

CircuitPython - a Python implementation for teaching coding with microcontrollers
https://circuitpython.org
Other
4.02k stars 1.19k forks source link

TFT (Display) not working in Hallowing M4 CircuitPython 9.1 #9437

Closed dlandfried closed 1 month ago

dlandfried commented 1 month ago

CircuitPython version

Adafruit CircuitPython 8.2.7 on 2023-10-19; Adafruit Hallowing M4 Express with samd51j19

Code/REPL

# SPDX-FileCopyrightText: 2019 Carter Nelson for Adafruit Industries
#
# SPDX-License-Identifier: MIT

import board
import displayio

display = board.DISPLAY

# Setup the file as the bitmap data source
bitmap = displayio.OnDiskBitmap("/purple.bmp")

# Create a TileGrid to hold the bitmap
tile_grid = displayio.TileGrid(bitmap, pixel_shader=bitmap.pixel_shader)

# Create a Group to hold the TileGrid
group = displayio.Group()

# Add the TileGrid to the Group
group.append(tile_grid)

# Add the Group to the Display
display.root_group = group

# Loop forever so you can enjoy your image
while True:
    pass

Behavior

Even with an adjusted bitmap this code does not display anything on the display. I also tried the 'text' version at https://learn.adafruit.com/circuitpython-display-support-using-displayio/text. However, switching to CircuitPython 8.2.7 as suggested at Discord.

Description

I think board.DISPLAY on the Hallowing M4 got remapped to CLK and MOSI in 9.1. This is conjecture based on documentation I have seen. This conflicts with the schematic which uses TFT_CLK and TFT_MOSI.

Additional information

This code works with CircuitPython 8.2.7 and 8x libraries.

dhalbert commented 1 month ago

There was a backlight problem on SAMD51 boards in 9.1.0. It is the likely cause of this bug: see #9443. This has been fixed in 9.1.1 in #9447.

I'll close based on that. If it's still not working for you with 9.1.1, please reopen.