Hello,
I am new to the Olimex project and starting to learn how it all works, however I want to start using some GPIO pins connected to some relay expansion boards. But I am struggling to find GPIO information for the STMP157-OLinuXino-LIME2.
I have looked around the forum and fond this guide (https://www.olimex.com/wiki/A20-OLinuXino-MICRO#GPIO_under_Linux) but it is for the A20 version. I am looking for something like this for the STMP157 board.
I want to know how to ID the 40 pin headers and map that to GPIO ports list in the OS. Then use a break out cable to attach my relay triggers to the relevant pin on the header.
Following the guide (for the A20) I was able to export gpiochip64 and then toggle it, but how do I know what gpiochip64 is on the multiple headers on the board.
olimex@stm32mp1-olinuxino-lime:~$ ls /sys/class/gpio/
export gpiochip128 gpiochip160 gpiochip413 gpiochip80
gpiochip0 gpiochip144 gpiochip32 gpiochip48 gpiochip96
gpiochip112 gpiochip16 gpiochip400 gpiochip64 unexport
I have checked schematics and cannot see anything that would match the above GPIO pins. If someone can point me to the correct place to look or how to work this out.
Something like this image would be awesome, with a map to the OS gpio name it is listed under.
https://www.olimex.com/wiki/images/a/a9/Example.jpg
Thanks in advanced for any replies.
Use the Olimage guide it explains the GPIO numbering in chapter "8.6. How to toggle a GPIO pin via sysfs":
https://github.com/OLIMEX/OLINUXINO/blob/master/DOCUMENTS/OLIMAGE/Olimage-guide.pdf
Notice that for STMP bit-width-max is 16.
Thanks for the fast reply, I will have a good review of this doc.