Exporting GPIO's

rcpaul
 
Posts: 39
Joined: Sun Nov 09, 2014 4:20 am

Exporting GPIO's

Fri Dec 30, 2016 6:02 am

I'm having trouble exporting GPIO's on Vocore2. I'm able to export GPIO's 37-43 just fine but when I do the same for the rest of the GPIO's I do not see the 3.4v when I set the value to 1. How do I export the rest of the GPIO's? My project requires as many GPIO's as possible in order to control motor drivers.

Thanks!
Paul

rcpaul
 
Posts: 39
Joined: Sun Nov 09, 2014 4:20 am

Re: Exporting GPIO's

Mon Jan 02, 2017 3:09 am

Any help would be greatly appreciated! I've been looking at the data sheets and I'm thinking I need to pull up or pull down to make some of the GPIO's active??

noblepepper
 
Posts: 240
Joined: Sat Nov 29, 2014 3:22 pm

Re: Exporting GPIO's

Mon Jan 02, 2017 10:36 am

Only gpios 19-21 & 37-43 are free to use as gpios. The rest are used for other functions (see section 2.3 of the Data Sheet).

If you need more than those you'll need to decide what functions you can do without and set up the dts(i) files before you compile your own image.

You need pull ups(downs) on any gpio's you want to use as inputs unless they are already in the VoCore2 schematic to avoid noise. You don't need them on outputs they will just be extra load.

rcpaul
 
Posts: 39
Joined: Sun Nov 09, 2014 4:20 am

Re: Exporting GPIO's

Mon Jan 02, 2017 6:23 pm

Noblepepper thank you very much for all your help!

For my project I need at least 20 open GPIO's

The only functions I need from Vocore2 are USB for a camera and I2C for an Analog to Digital Converter.

I'm sorry Im not familiar with setting up dts(i) files or writing my own images. Is it possible to release the remaining GPIO's I need in the dts(i) files?

Is there a good source that explains how to setup the dts(i) files and write my own image?

Thanks again for all your help!!

noblepepper
 
Posts: 240
Joined: Sat Nov 29, 2014 3:22 pm

Re: Exporting GPIO's

Mon Jan 02, 2017 9:19 pm

Start with building an image, then move on to modifying it. There are some instructions here on how to build your own image. Googling "building openwrt" should give some good info too. Don't even think about using Windows, if you are on Windows set up a virtual machine to install Ubuntu on. The gurus won't try to build on Windows and won't help you either.

The files I am talking about are in the target/linux/ramips/dts directory. Take a look at them, no lessons I know except the school of hard knocks. Consider using a multiplexer to get more I/O, a 16 channel is only one chip. The sdcard and the i2s are my first thoughts but that won't get you to 20. The largest groups would be ethernet but I'm not sure what side effects you would hit since OpenWrt is designed to be a router system.

rcpaul
 
Posts: 39
Joined: Sun Nov 09, 2014 4:20 am

Re: Exporting GPIO's

Tue Jan 03, 2017 12:23 am

Can I use the terminal on my MacBook to build the image?

noblepepper
 
Posts: 240
Joined: Sat Nov 29, 2014 3:22 pm

Re: Exporting GPIO's

Tue Jan 03, 2017 3:18 am

I believe I have seen things on the internet indicating this is possible. I have no knowledge on this but you are throwing an extra suspect into the mix when things go awry.

Here is an old blog post from Vonger on setting up a VM.

rcpaul
 
Posts: 39
Joined: Sun Nov 09, 2014 4:20 am

Re: Exporting GPIO's

Sun Jan 08, 2017 2:30 am

Hoping someone can help with this since I need at least 20 open GPIO's and I can only get 8 right now.

I've tested all the pins on the Vocore2 that I could. Unfortunately I was only able to change the value on 8 of them, GPIO's 18, 19, 37, 39, 40, 41, 42, and 43. This is exporting them under /sys/class/gpio using echo * > export then echo out > direction and finally echo 1 > value. I didn't test the bottom pins (and pins 49 and 50 on right) of Vocore2 because I don't know what number GPIO's they are, here are all my results in order according to data sheet:

Top
GPIO 10 NO
GPIO 7 NO
GPIO 9 NO
GPIO 8 NO
GPIO 6 NO
GPIO 5 NO
GPIO 4 NO
GPIO 3 NO
GPIO 2 NO
GPIO 0 NO
GPIO 1 NO

Right
GPIO 41 YES
GPIO 40 YES
GPIO 39 YES
GPIO 43 YES
GPIO 42 YES
GPIO 38 NO
GPIO 37 YES

Left
GPIO 12 NO
GPIO 13 NO
GPIO 11 NO
GPIO 15 NO
GPIO 14 NO
GPIO 17 NO
GPIO 16 NO
GPIO 18 YES
GPIO 19 YES
GPIO 20 NO
GPIO 21 NO

Yes - 18, 19, 37, 39, 40, 41, 42, 43

Does anyone know how to export any other GPIO's?

I'm getting some help with building a firmware but in the mean time I'd like to use the app my developer made and it needs at least 20 open GPIO's. I've asked for direct help with exporting the GPIO's but was told to "look at the data sheet". This helps me in no way.

Thanks
Paul

Return to VoCore2/Lite/Ultimate

Who is online

Users browsing this forum: No registered users and 6 guests