I have two ILI9341-based, SPI-connected LCD displays. I also have both an Odroid C4 and a Raspberry Pi 3 (Model B v1.2). The setup for both is as follows:
RPi: Linux raspberrypi 5.4.51-v7+ #1333 SMP Mon Aug 10 16:45:19 BST 2020 armv7l GNU/Linux
C4: Linux C4 4.9.113 #1 SMP PREEMPT Fri Aug 14 20:30:41 UTC 2020 aarch64 GNU/Linux (CoreELEC)
luma.core: 1.17.1 on both
luma.lcd: 2.5.0 on both
luma.examples: commit ceb01960 on both (from Wed Oct 21 16:53:13)
spidev: 3.4 on both
Pillow: 7.2.0 on both
RPi.GPIO: 0.7.0 on RPi, 0.6.3post1 (the RPi.GPIO-Odroid version) on C4
Using demonstration programs from luma.example, one can invoke something like:
Code: Select all
python bounce.py \ --interface spi --display ili9341 \ --width 320 --height 240 \ --backlight-active high \ --gpio-reset-hold-time 0.2 --gpio-reset-release-time 0.2 \ --spi-bus-speed 48000000
Attached are two photos showing the results. The photo with the RPi is getting ~19 fps with a spi-bus-speed of 50 MHz.
The C4, however, doesn't seem to show any speed improvements past 8 MHz. The photo is taken when attempt 48 MHz on the command line.
The command-line option is definitely getting parsed. Specifying frequencies less-than 8 MHz definitely results in it running slower!
The Python spidev module does appear to perform an error check after invoking SPI_IOC_WR_MAX_SPEED_HZ, per these lines of code:
https://github.com/doceme/py-spidev/blo ... 1273-L1277
No error is thus occurring when trying >8 MHz, but no speed improvement seems to happen either.
So, does anyone have suggestions regarding how to debug this further? The C4 is supposed to support very high SPI bus frequencies, but I can't convince myself that I'm setting high speeds successfully.