Banana Pi + Enc28j60 (SPI Interface)

35 15592
Edited by remote.syst3m at Dec 30, 2015 22:05

So I noticed, If I load enc28j60, I can no longer set the edge. But I can set it before loading the module.

But if I set the edge, load the module, no device is in ifconfig.

Without loading the module I can export both GPIO24 and GPIO25 and set the edge.

This is With CS1 pin on Physical pin 26. And Interrupt pin set on Physical Pin 18 (GPIO24)

I use the CS0 for a MCP3002 which is disconnected currently.

Edited by remote.syst3m at Dec 30, 2015 22:15

Here is what I have in my fex:

modalias "spidev"
max_speed_hz = 12000000
bus_num = 0
chip_select = 0
mode = 0
full_duplex = 0
manual_cs = 0

modalias = "enc28j60"
max_speed_hz = 10000000
bus_num = 0
chip_select = 1
mode = 1
full_duplex = 0
manual_cs = 0
irq_gpio = 24

If I set in /etc/modules   :


The Interface appears as eth1 in ifconfig, I can set Ip, etc.. But no communication. And the Resource is busy when trying to echo "24" > /sys/class/gpio/export

When I for example try:

echo "25" > /sys/class/gpio/export      

I can set the edge by:

echo "falling" > /sys/class/gpio/gpio25/edge

But this is only because I've assigned 24 to the Interrupt in the .fex, trying GPIO 24 or defining GPIO25 in fex file instead results in resource busy,

Edited by remote.syst3m at Dec 31, 2015 16:13

I'm still not sure why I can't get communication. Is there something I'm missing with gpio-para config possibly?

I've spent a solid week on this. I'm convinced it just doesn't work. I'm also convinced theres nobody on this forum.

Edited by sashijoseph at Jan 01, 2016 14:20

please attach relevant sections of "cat /proc/interrupts"  and  "dmesg"

without loading the enc28j60 module,set up the edge triggering for GPIO24,then unexport the pin
  1. "echo "24" > /sys/class/gpio/unexport"
Copy the Code
before loading the enc module.
does it help?

I think I tried that already. I'll try again soon.

You have to log in before you can reply Login | Sign Up

Points Rules