sysfs GPIO out on pin 23, hangs network

Post Reply
mlinuxguy
Posts: 793
Joined: Thu Feb 28, 2013 10:28 am
languages_spoken: english
ODROIDs: X, X2, XU, XU3, XU4, C1, C1+, C2, N1, USB-IO
Contact:

sysfs GPIO out on pin 23, hangs network

Unread post by mlinuxguy » Mon Jan 05, 2015 2:14 pm

I've been creating a FPGA SPI loader program and need to toggle the following pins as GPIO to tell the Xilinx FPGA to accept the bitstream.
#define SCLK 11
#define MOSI 10
#define INIT 23
#define PROG 24
#define DONE 25

INIT, PROG, and DONE are the GPIO pins used... however when my loader program tries to do the sysfs (using a SSH session to the box), the network dies.
I then tried it with the HK ported wiringPI code and that also hangs the network. I have to reboot to get it working again.

root@odroidci-1:~/wiringPi/gpio# ./gpio export 23 out
Write failed: Connection reset by peer

What am I missing about setting up the GPIO pins 23, 24, and 25 via the sysfs interface?

User avatar
odroid
Site Admin
Posts: 29398
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Contact:

Re: sysfs GPIO out on pin 23, hangs network

Unread post by odroid » Mon Jan 05, 2015 2:54 pm

It seems to be our wiringPi porting problem.
Try to access 108 via sysfs directly without wiringPi.
We will fix it later.

Another big concern...
The GPIO25 is ADC input and its maximum input voltage is 1.8Volt. You may fry C1 board.
http://www.hardkernel.com/main/products ... &tab_idx=2
I hope the "DONE" pin should be output low or input pin.

mlinuxguy
Posts: 793
Joined: Thu Feb 28, 2013 10:28 am
languages_spoken: english
ODROIDs: X, X2, XU, XU3, XU4, C1, C1+, C2, N1, USB-IO
Contact:

Re: sysfs GPIO out on pin 23, hangs network

Unread post by mlinuxguy » Mon Jan 05, 2015 3:01 pm

Thanks for the info, I will shift the DONE header wire

mlinuxguy
Posts: 793
Joined: Thu Feb 28, 2013 10:28 am
languages_spoken: english
ODROIDs: X, X2, XU, XU3, XU4, C1, C1+, C2, N1, USB-IO
Contact:

Re: sysfs GPIO out on pin 23, hangs network

Unread post by mlinuxguy » Mon Jan 05, 2015 4:13 pm

I got my FPGA loader working. Its a total hack job as I had to go thru the SPIDEV module to load the big FPGA bitstream.

To transfer the FPGA bitstream of the following size:
340701 Jan 2 13:51 logipi_blink.bit

I had to edit /etc/modprobe.d/local.conf to add the following:
options spidev bufsiz=400000

This got me past the small default buffer size for the transmit buffer in SPI.
=======
The other bit of info is the map the GPIO pins I changed the RPI code example I was using to the following pins:
#define eINIT 104 // was gpio 23
#define ePROG 102 // was gpio 24
#define eDONE 98 // was gpio 25

This lets me use SYSFS to map the RPI pins to the proper pins for the LOGI PI FPGA daughter card.
I now have blinking LED pins on the FPGA daughter card:

# logi_loader ./logipi_blink.bit
(this loads the FPGA configuration file to setup the FPGA to blink LED's)

So you can mark LOGI PI card working with Odroid-CI as long as someone hacks out a loader program like I did.

User avatar
odroid
Site Admin
Posts: 29398
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Contact:

Re: sysfs GPIO out on pin 23, hangs network

Unread post by odroid » Mon Jan 05, 2015 4:59 pm

Good to hear we have another compatible add on board.
Thank you for the confimation.

Did you try this board?
http://valentfx.com/logi-pi/

We are considering to make a list of compatible boards.
http://forum.odroid.com/viewtopic.php?f ... =20#p61926
http://forum.odroid.com/viewtopic.php?f ... 894#p61617

mlinuxguy
Posts: 793
Joined: Thu Feb 28, 2013 10:28 am
languages_spoken: english
ODROIDs: X, X2, XU, XU3, XU4, C1, C1+, C2, N1, USB-IO
Contact:

Re: sysfs GPIO out on pin 23, hangs network

Unread post by mlinuxguy » Tue Jan 06, 2015 1:02 am

I have a lot of RPI boards I can test
It would be worth making a table of expansion boards that work, those that need software changes, and those that electrically don't work

That is the logi-pi board I got working, with my SPI loader
Did you try this board?
http://valentfx.com/logi-pi/

User avatar
odroid
Site Admin
Posts: 29398
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Contact:

Re: sysfs GPIO out on pin 23, hangs network

Unread post by odroid » Tue Jan 06, 2015 1:11 am

Okay. I will make a sticky thread in the C1 Hardware forum to post the list in this week.

i_reede@amerisys.com
Posts: 102
Joined: Sat Jan 10, 2015 3:45 pm
languages_spoken: english, french
ODROIDs: C1
Location: Montreal, Canada
Contact:

Re: sysfs GPIO out on pin 23, hangs network

Unread post by i_reede@amerisys.com » Thu Sep 10, 2015 9:29 pm

Report this postReply with quoteRe: sysfs GPIO out on pin 23, hangs network
by mlinuxguy » Mon Jan 05, 2015 3:13 am

I got my FPGA loader working. Its a total hack job as I had to go thru the SPIDEV module to load the big FPGA bitstream.

To transfer the FPGA bitstream of the following size:
340701 Jan 2 13:51 logipi_blink.bit

I had to edit /etc/modprobe.d/local.conf to add the following:
options spidev bufsiz=400000

I have no such file local.conf in this directory. What am I mising here?

mlinuxguy
Posts: 793
Joined: Thu Feb 28, 2013 10:28 am
languages_spoken: english
ODROIDs: X, X2, XU, XU3, XU4, C1, C1+, C2, N1, USB-IO
Contact:

Re: sysfs GPIO out on pin 23, hangs network

Unread post by mlinuxguy » Fri Sep 11, 2015 1:12 am

YOU create the local.conf file
it contains options to various modules the kernel loads
local.conf is a user-maintained settings file. It contains a section that replaces the historical localrc file.

Post Reply

Return to “Hardware and peripherals”

Who is online

Users browsing this forum: No registered users and 4 guests