2008-11-19 10:40:08 Simple GPIO problem with BF537 and uCLinux2008R1.5
Patrick Hotz (GERMANY)
Message: 65552
Hi,
i have problems to get the GPIO running on uCLinux2008R1.5.
My board is a CM-BF537E.
My have turned on "Simple GPIO char interface" and the "simple-gpio-test"....
the problem is that i can´t see a gpio in /dev/....
The second problem is that i want to wake up the blackfin with a GPIO (for example PF4).
In config i must set the "wakeup gpio number" and i have no idea which number belongs to which pin.
Is there any list or readme?
what can I do ?
Thanks for help
Patrick
TranslateQuoteReplyEditDelete
2008-11-19 15:49:33 Re: Simple GPIO problem with BF537 and uCLinux2008R1.5
Frank Van Hooft (CANADA)
Message: 65556
There's a table towards the bottom of this page:
http://docs.blackfin.uclinux.org/doku.php?id=linux-kernel:interrupts
QuoteReplyEditDelete
2008-11-19 18:41:01 Re: Simple GPIO problem with BF537 and uCLinux2008R1.5
Michael McTernan (UNITED KINGDOM)
Message: 65560
> My have turned on "Simple GPIO char interface" and the "simple-gpio-test"....
> the problem is that i can´t see a gpio in /dev/....
Do you mean that the device nodes have not been created? There should be lots of nodes like /dev/gpio0, gpio1 etc...
Ensure the module is loaded, try "lsmod". Then try running "mdev -s" at a shell to see if that creates the nodes.
QuoteReplyEditDelete
2008-11-19 18:54:45 Re: Simple GPIO problem with BF537 and uCLinux2008R1.5
Frank Van Hooft (CANADA)
Message: 65562
Take a look at this thread:
QuoteReplyEditDelete
2008-11-20 02:28:07 Re: Simple GPIO problem with BF537 and uCLinux2008R1.5
Patrick Hotz (GERMANY)
Message: 65573
Hi Michael,
this is exactly my problem, there´s no device node in /dev....
lsmod and mdev -s don´t work.
root:/dev> lsmod
Module Size Used by
root:/dev> mdev -s
root:/dev> ls
console mtd1 null ram12 ram5 rtc0 urandom
full mtd1ro ptmx ram13 ram6 spi_mmc watchdog
kmem mtd2 pts ram14 ram7 sport0 zero
kmsg mtd2ro ram0 ram15 ram8 sport1
mem mtdblock0 ram1 ram2 ram9 tty
mtd0 mtdblock1 ram10 ram3 random ttyBF0
mtd0ro mtdblock2 ram11 ram4 root ttyBF1
root:/dev>
In my cm_bf637.c file theres no structure like this which i have found on the other tread "http://blackfin.uclinux.org/gf/project/uclinux-dist/forum/?action=ForumBrowse&forum_id=39&_forum_thread_total=100&_forum_thread_page=2&_forum_action=ForumMessageBrowse&thread_id=30423":
static struct resource bfin_gpios_resources = {
.start = 0,
.end = MAX_BLACKFIN_GPIOS - 1,
.flags = IORESOURCE_IRQ,
};
what i must exactly do?
If I copy the struct in my cm_bf537.c theres no change in my /dev....
might someone can post the right file here?
Thanks a lot,
Patrick
TranslateQuoteReplyEditDelete
2008-11-20 08:27:24 Re: Simple GPIO problem with BF537 and uCLinux2008R1.5
Mike Frysinger (UNITED STATES)
Message: 65601
exactly as stated in the other thread, adding the struct isnt enough. you need to actually add it to the resources list so it'll get used.
QuoteReplyEditDelete
2008-11-20 09:04:32 Re: Simple GPIO problem with BF537 and uCLinux2008R1.5
Patrick Hotz (GERMANY)
Message: 65607
My problem is that i have no idea how i can do this,
i´m new with uClinux and don´t know very much on this system...
I need a step by step guide.....
Patrick
TranslateQuoteReplyEditDelete
2008-11-20 19:12:50 Re: Simple GPIO problem with BF537 and uCLinux2008R1.5
Mike Frysinger (UNITED STATES)
Message: 65636
use this patch then:
QuoteReplyEditDelete
2008-11-21 03:46:15 Re: Simple GPIO problem with BF537 and uCLinux2008R1.5
Patrick Hotz (GERMANY)
Message: 65649
Mike, you are a hero....
Thank you very much,
the gpios work
Patrick