FunGuy
Posts: 2
Joined: Sat Jan 06, 2018 10:11 am

Move ili9341 TFT display to SPI1

Sun Jan 07, 2018 11:51 pm

I was hoping somebody could help me. I am quite a new user to RPI and experimenting a lot. I have a sensor which communicates using SPI to the Pi 3 Model B+ and it works great. I also have TFT screen running an ili9341 driver display also using SPI. Here is my problem: The sensor can only operate on SPI mode 3 and consumes a lot of bandwidth. The TFT screen operates in SPI mode 0 and consume reasonable amount of bandwidth on the bus. I decided to use 2 SPI buses, namely /dev/spi0 and /dev/spi1. I have read on some blogs that the primary SPI (/dev/spi0) support all modes of SPI. I have confirmed this as both devices operate correctly on SPI0. I have also read that the aux SPI (/dev/spi1) does not support all modes of SPI. I have confirmed this that the sensor operating on SPI0 does not work on SPI1 unless I change the mode (but then I receive garbage data which was expected). So the sensor which consumes a lot of bandwidth is stuck on the primary SPI bus. I see there a lot of pre-made images for the TFT displays, but they all use SPI0 to drive the screen. I have tried to hack the code (with very little success) to move the TFT to aux SPI (/dev/spi1). Is there an easy way to do it?

Thanks in advance for any assistance.

HermannSW
Posts: 442
Joined: Fri Jul 22, 2016 9:09 pm

Re: Move ili9341 TFT display to SPI1

Wed Jan 10, 2018 2:31 pm

Yes, please follow the link in this posting:
viewtopic.php?t=193722#p1217930
Image
--> Raspberry camera / gstreamer / raspivid / raspiraw (bookmark list):
https://stamm-wilbrandt.de/en/Raspberry_camera.html

https://github.com/Hermann-SW/raspiraw      https://github.com/Hermann-SW/userland      https://twitter.com/HermannSW

FunGuy
Posts: 2
Joined: Sat Jan 06, 2018 10:11 am

Re: Move ili9341 TFT display to SPI1

Thu Jan 25, 2018 11:51 am

Thank you! This really did the trick! You saved me a lot of effort

Return to “Interfacing (DSI, CSI, I2C, etc.)”

Who is online

Users browsing this forum: No registered users and 13 guests