GregDMeyer / IT8951

Driver for the IT8951 e-paper controller on Raspberry Pi
MIT License
155 stars 55 forks source link

EPD Initialization hanging #34

Closed sam-watts closed 3 years ago

sam-watts commented 3 years ago

Hi @GregDMeyer, firstly thanks for this great codebase!

I'm having an issue with the 7.8in screen that uses the IT8951, connected to a rasbpi zero W. When running tests/integration/test.py, the initialization of the EPD display hangs foverever. When I CTRL+C out of it, this is the traceback I get:

Traceback (most recent call last):
  File "test/integration/test.py", line 56, in <module>
    main()
  File "test/integration/test.py", line 32, in main
    display = AutoEPDDisplay(vcom=-1.38, rotate=args.rotate, spi_hz=100000)
  File "/home/pi/.local/lib/python3.7/site-packages/IT8951/display.py", line 219, in __init__
    epd = EPD(vcom=vcom, bus=bus, device=device, data_hz=spi_hz)
  File "/home/pi/.local/lib/python3.7/site-packages/IT8951/interface.py", line 33, in __init__
    self.update_system_info()
  File "/home/pi/.local/lib/python3.7/site-packages/IT8951/interface.py", line 99, in update_system_info
    self.spi.write_cmd(Commands.GET_DEV_INFO)
  File "IT8951/spi.pyx", line 224, in IT8951.spi.SPI.write_cmd
    self.write(0x6000, [cmd])  # 0x6000 is preamble
  File "IT8951/spi.pyx", line 171, in IT8951.spi.SPI.write
    self.transfer(buflen, speed=self.cmd_hz)
  File "IT8951/spi.pyx", line 111, in IT8951.spi.SPI.transfer
    self.wait_ready()
  File "IT8951/spi.pyx", line 103, in IT8951.spi.SPI.wait_ready
    sleep(0.001)

I read some of your other posts about changing spi_hz to account for the slower rasbpi zero clock speed, but this hasn't helped. I get the feeling this might be a hardware issue? Not really sure what else to try, none of the other waveshare provided code for IT8951 has worked either. Any thoughts you have would be great :pray:

GregDMeyer commented 3 years ago

Hi! Unfortunately, if the waveshare code isn't working either, I think there is something wrong with the hardware :-( if you double check all the connections etc. and things still aren't working, I would contact Waveshare support and see if you can get a new unit.

Good luck!