GPIO issue

StereoPi hardware discussion
Post Reply
Karivian
Posts: 2
Joined: Fri Sep 27, 2019 8:10 pm

GPIO issue

Post by Karivian » Fri Sep 27, 2019 8:17 pm

I was trying to get a Pimoroni EnviroPHAT to work with the StereoPi board. It doesn't seem to recognize that anything is connected. I swapped the SD to a pi zero and everything tests out fine, the EnviroPHAT fully works. Put everything back on the StereoPi and attempting to access the EnviroPHAT results in IO Errors. I've made sure to verify that my connections have flipped the 180 required from the StereoPi layout.

I am running Debian Buster lite from the raspberrypi.org download page. Is there a specific package that I need to make sure is installed to access the GPIO on the StereoPi?

stereomaton
Posts: 83
Joined: Tue May 21, 2019 12:33 pm
Location: France

Re: GPIO issue

Post by stereomaton » Sat Sep 28, 2019 5:04 am

I did not know this extension before, but it likely not use bare GPIO, but rather the peripherals such as I2C bus which are also available on the GPIO extension connector.
There might be peripherals and drivers to enable, which is generally done through the device-tree or device-tree overlay mechanism, unless it uses userland programs with generic drivers, but it would be quite stupid for the kind of sensors on this board (however there are some strange montages sometimes in the raspberry-pi world due to lack of knowledge)
But these device-tree things are located in the BOOT partition of the SD, so if it works on the normal raspberry-pi with the same SD, it should work on the stereopi too, as far as I understand, because the hardware is extremely close and identical for this part.
I would have think of the 180 uturn of the connector, but you checked it too.

Perhaps you can elaborate about how you see it does not work (the commands you type and errors you get) so that we can help to find ways to investigate.
Stereophotographer and hacker
StereoPi Standard Edition + CM3Lite module

User avatar
Realizator
Site Admin
Posts: 260
Joined: Tue Apr 16, 2019 9:23 am
Contact:

Re: GPIO issue

Post by Realizator » Mon Sep 30, 2019 7:31 am

Stereomaton, thank you for your answer.
You are right, the issue is in device tree.
Actually, StereoPi is 100% compatible with the Raspberry Pi. But when you connect second camera, it uses one more I2C.
1. According to EnviroPHAT pinout, it uses I2C for connection.
2. StereoPi has a special file 'dt-blob.bin' in /BOOT partition. It explains to system, that we have 2 cameras, and second camera uses I2C.
3. This 'dt-blob.bin' is loaded ONLY when Compute Module is detected. So in Pi Zero this file will not be loaded, and I2C is free.

Karivian, could you please do a simple experiment.
Insert your micro SD card in to cardreader and connect to the computer. Rename 'dt-blob.bin' to 'dt-blob1.bin', save and eject card correctly.
After that try to check, if your hat is working on StereoPi.

If it is Ok, we'll try to find a way to do I2C available for you (as mentioned in this thread on Raspberry Pi forum). I have no I2C hats right now to test it, but will do my best to find one.
Eugene a.k.a. Realizator

Karivian
Posts: 2
Joined: Fri Sep 27, 2019 8:10 pm

Re: GPIO issue

Post by Karivian » Thu Oct 10, 2019 8:44 pm

Sorry for the long delay in my response.

I tested renaming the dt-blob.bin and the EnviroPHAT worked.

However, after re-analyzing my project and requirements, I realized that the inclusion of the EnviroPHAT was being wasteful as I wasn't using it to it's full extent. I am now using individual DHT11 and BMP180 sensors and both cameras with no problems whatsoever.

Thanks for your assistance.

Post Reply