Ili9341 screen not working

Having trouble with your GBZ build? Ask your questions here!
Post Reply
AstroPete
Posts: 7
Joined: Thu Oct 10, 2019 1:55 am
Has thanked: 1 time

Ili9341 screen not working

Post by AstroPete » Thu Oct 10, 2019 2:29 am

Hello all
I have a pocket adventure screen that I have wired up to a pi 3a+, and following the pocket adventure guide I have disabled overscan, enabled spi and entered the sudo modprobe text, all is well so far. However once I type the next line of text to move the display to the spi screen I get an error message saying ioctl fbiout_con2fbmap invalid argument.

The screen lights up as soon as I power the pi, the screen is wired up to the pi rather than using pins, I have had to use different ground pins on the gpio.

Any help on this issue will be greatly appreciated

User avatar
infinitLoop
Posts: 376
Joined: Mon Dec 24, 2018 11:46 am
Has thanked: 159 times
Been thanked: 127 times
Contact:

Re: Ili9341 screen not working

Post by infinitLoop » Thu Oct 10, 2019 6:45 am

AstroPete wrote:
Thu Oct 10, 2019 2:29 am
Hello all
I have a pocket adventure screen that I have wired up to a pi 3a+, and following the pocket adventure guide I have disabled overscan, enabled spi and entered the sudo modprobe text, all is well so far. However once I type the next line of text to move the display to the spi screen I get an error message saying ioctl fbiout_con2fbmap invalid argument.

The screen lights up as soon as I power the pi, the screen is wired up to the pi rather than using pins, I have had to use different ground pins on the gpio.

Any help on this issue will be greatly appreciated
those instructions are for the zero and i think you'd need to adjust them to work with the 3. for the pi3 though, you'd be better off using the ili9341 driver: https://github.com/juj/fbcp-ili9341 - you will get much better results...

first disable SPI in raspi-config (this driver doesn't use it). overscan can be disabled, but you can run it with it enabled too and just manually adjust the offsets in the config.txt. whatever looks right on yours.

here's the steps for install:

Code: Select all

#pre-req libraries
sudo apt-get update
sudo apt-get install cmake -y

#driver install
cd ~
git clone https://github.com/juj/fbcp-ili9341.git
mkdir /home/pi/fbcp-ili9341/build
cd /home/pi/fbcp-ili9341/build

# set up config
# for pi Zero
cmake -DARMV6Z=ON -DILI9341=ON -DSPI_BUS_CLOCK_DIVISOR=6 -DGPIO_TFT_DATA_CONTROL=24 -DGPIO_TFT_RESET_PIN=25 -DSTATISTICS=0 -DDISPLAY_ROTATE_180_DEGREES=ON ..
## OR  ##
# for pi 3
cmake -DARMV8A=ON -DILI9341=ON -DSPI_BUS_CLOCK_DIVISOR=6 -DGPIO_TFT_DATA_CONTROL=24 -DGPIO_TFT_RESET_PIN=25 -DSTATISTICS=0 -DDISPLAY_ROTATE_180_DEGREES=ON ..

#compile it
make -j

# set it to start automatically at boot
sudo sed -i '/\"exit 0\"/!s/exit 0/\/home\/pi\/fbcp-ili9341\/build\/fbcp-ili9341 \&\nexit 0/g' /etc/rc.local

# run this to test / immediately switch the display without having to reboot
sudo /home/pi/fbcp-ili9341/build/fbcp-ili9341 &


AstroPete
Posts: 7
Joined: Thu Oct 10, 2019 1:55 am
Has thanked: 1 time

Re: Ili9341 screen not working

Post by AstroPete » Thu Oct 10, 2019 3:22 pm

Thanks. I'll give it a go.

AstroPete
Posts: 7
Joined: Thu Oct 10, 2019 1:55 am
Has thanked: 1 time

Re: Ili9341 screen not working

Post by AstroPete » Wed Oct 16, 2019 3:56 pm

I've followed the instructions above but I'm getting a cmake error stating the source directory "/home/pi/fbcp-ili9341/build" does not appear to contain cmakelists.txt
I've done something wrong but not sure what. Any advice anybody?

User avatar
infinitLoop
Posts: 376
Joined: Mon Dec 24, 2018 11:46 am
Has thanked: 159 times
Been thanked: 127 times
Contact:

Re: Ili9341 screen not working

Post by infinitLoop » Wed Oct 16, 2019 6:48 pm

AstroPete wrote:
Wed Oct 16, 2019 3:56 pm
I've followed the instructions above but I'm getting a cmake error stating the source directory "/home/pi/fbcp-ili9341/build" does not appear to contain cmakelists.txt
I've done something wrong but not sure what. Any advice anybody?
i haven't seen that before... did you run the full command, including the last two periods, from inside the build dir?

Code: Select all


cmake -DARMV8A=ON -DILI9341=ON -DSPI_BUS_CLOCK_DIVISOR=6 -DGPIO_TFT_DATA_CONTROL=24 -DGPIO_TFT_RESET_PIN=25 -DSTATISTICS=0 -DDISPLAY_ROTATE_180_DEGREES=ON ..


.

AstroPete
Posts: 7
Joined: Thu Oct 10, 2019 1:55 am
Has thanked: 1 time

Re: Ili9341 screen not working

Post by AstroPete » Thu Oct 17, 2019 12:16 am

Ah not sure if I did put two dots on the end. I will try again and see what happens.

AstroPete
Posts: 7
Joined: Thu Oct 10, 2019 1:55 am
Has thanked: 1 time

Re: Ili9341 screen not working

Post by AstroPete » Thu Oct 17, 2019 3:09 pm

OK I have gotten further lots of text, build files have been written to home/pi/fbcp-ili9341/build.
Type in make -J and more text 100% built target fbcp-ili9341, but the screen is just lit up white. Nothing else on it. Am I missing something?
Any help will be greatly appreciated.

User avatar
infinitLoop
Posts: 376
Joined: Mon Dec 24, 2018 11:46 am
Has thanked: 159 times
Been thanked: 127 times
Contact:

Re: Ili9341 screen not working

Post by infinitLoop » Thu Oct 17, 2019 5:32 pm

AstroPete wrote:
Thu Oct 17, 2019 3:09 pm
OK I have gotten further lots of text, build files have been written to home/pi/fbcp-ili9341/build.
Type in make -J and more text 100% built target fbcp-ili9341, but the screen is just lit up white. Nothing else on it. Am I missing something?
Any help will be greatly appreciated.
did you run the final command to start it?

Code: Select all


sudo /home/pi/fbcp-ili9341/build/fbcp-ili9341 &

if that doesn't work then you may have a loose connection. in order to start it automatically, you need to run that at boot by doing something like adding it to the rc.local file, before the exit command (what the "sed" command above does)

.

AstroPete
Posts: 7
Joined: Thu Oct 10, 2019 1:55 am
Has thanked: 1 time

Re: Ili9341 screen not working

Post by AstroPete » Sat Oct 19, 2019 2:14 am

Thanks. Looks like I'll have to check all my wiring!

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests