-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Description
A bug was reported for the MRAA library that the SPI frequency cannot be set higher than 500kHz:
eclipse/mraa#255
It turns out that this boils down to a potential problem with the Raspberry Pi's SPI driver. In response to the SPI_IOC_RD_MAX_SPEED_HZ ioctl, the kernel driver reports some frequency slightly above 500kHz. MRAA then rounds down any requested frequency to the reported maximum speed.
It is known that the Raspberry Pi support speeds of up to 125MHz. So the value reported by the driver should be incorrect. I suggest that the driver is fixed to report the actual maximum speed obtained when the divisor is equal to 2.
Meanwhile, MRAA has been patched to ignore the maximum speed reported by the Raspberry Pi driver. Yet, I though that I should report the bug here so that the kernel driver is actually fixed.
While I did not test it, the bug may also affect other branches such as rpi-4.10.y, rpi-4.11.y, rpi-4.12.y, and rpi-4.13.y.