-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ST7735 color depth LUTs not defaulted after a SWRESET #16
Comments
I beleive that this is not the full story. I am working with Automation HAT Mini and the display always gets corrupted after a while of using it. First only colors, later it shows total garbage and stops working entirely. The examples write To test if it helps I made a bash loop while :; do python3 ./kotelnik.py & sleep 10; killall python3; done and the display crashes almost immediately. I guess that To fix that, it is necessary to properly close the SPI. tempspi = spidev.SpiDev(0, ST7735.BG_SPI_CS_FRONT)
tempspi.close()
disp = ST7735.ST7735(
port=0,
cs=ST7735.BG_SPI_CS_FRONT,
dc=9,
backlight=25,
rotation=270,
spi_speed_hz=4500000
) With that, I have run the kill loop for a while and it worked. I have also tried to add another reset command before the init. The reasoning is that SPI is killed mid transaction. The first reset merges with previous command, configures some garbage, but it will end the SPI transaction correctly and set CS. The second reset then properly resets the display. I didn't study the datasheet, so I don't know if there is a garbage configuration that might be more risky, like destroy the display or corrupt the color lut as in your case. Plus, this cannot be done easily without modification in the library, only to rerun the Either way, this is a second Pimoroni product I have and a second problem caused by bad design and bad firmware. Nobody reacted to this issue for almost a year. I can understand bug in a code, but the negligence screams "Never buy again!". |
I'm able to get the ST7735 display to be corrupted by doing simultaneous writes from multiple threads (I know this is bad).
What occurs is the color depth lookup tables are getting corrupted. According to the Sitronix datasheet, the LUTs are not defaulted on a SWRESET, only on power up or HWRESET. So app restart or even "sudo reboot" is not enough to correct it.
I was able to account for this by adding code to default the LUTs to the ST7735 module's _init() function.
The text was updated successfully, but these errors were encountered: