Re: Thanks a lot

Dieter Kiermaier <[email protected]>
Newsgroups gmane.linux.ports.arm.general
Message-ID <[email protected]>
Hello Prashant,

> Hello Dieter, 
> 
> Thanks a lot for the way you suggested. I sas the file. 
> It seems to be useful.Due to problems in my mail account, I cudn't reply
> you earlier. Kindly excuse me for that. 
> 
> Before reading your mail, I wrote a code to test external interrupt.
> the code is expected to print "I am in main", till a switch, connected
> to IRQ1, is not pressed. As soon as it is pressed, it should print
> "Hello from Interrupt". 

Some snippets how your code works where helpful :)

         
> when i run this code, it shows "I m in main" untill i press IRQ1 switch.
> As soon as I press IRQ1 Switch, it shows me following message
>         
>         irq 34376, desc: c0206c40, depth: 0, count: 0, unhandled: 0
>         ->handle_irq():  c0053edc, handle_bad_irq+0x0/0x1f4
>         ->chip(): 00000000, __init_begin+0x3fff8000/0x30
>         ->action(): 00000000

Do you have a own kernel module which does interrupt handling?
I fear as long as there are not more information it would be hard to help you.


Dieter

         
>         
> and then it starts to send "I m in main" again. 
> 
> I request you to suggest me what may be the problem.
> I'll be highly oblized. 
>  
> 
> With Thanks and Best Regards, 
> Prashant Sangal
> 
> 
> 
> Author: Dieter Kiermaier
> Date: 2009-07-10 11:312009-07-10 06:01 +5.530UTC
> To: prashant sangal
> CC: linux-arm
> Subject: Re: Interrupt problem
> 
> Hi Prashant, 
> 
> > Hello Dieter, 
> > 
> > I am also not very much experienced on linux. Your idea may work, but
> i don't know how to use sysfs. 
> > Can you please elaborate it? 
> > 
> 
> You can have a look at Documentation/gpio.txt in the kernel tree. There
> is (hopefully) all what you need. 
> 
> Dieter 
> 
> > With Thanks and Regards, 
> > Prashant Sangal 
> > 
> > 
> > ________________________________ 
> > From: Dieter Kiermaier <[email protected]> 
> > To: [email protected] 
> > Sent: Thursday, 9 July, 2009 9:14:51 PM 
> > Subject: Re: Interrupt problem 
> > 
> > Hi all, 
> > 
> > I'm fairly new to linux and also to this list so please don't hang me
> up if I'm wrong. 
> > But if your board provides gpiolib support it may be more easy to
> access gpios by using the sysfs? 
> > 
> > Cheers, 
> > Dieter 
> > 
> > 
> > > Hello, 
> > > 
> > > I am working on AT91SAM9260 based board. The board is running linux.
> Using mmap, i can access GPIOs. 
> > > I have been trying to access Interrupt controller through mmap, but
> failed. 
> > > Is it possible to access Interrupt controller of processor using
> mmap? what may be alternate way without digging deep into kernel? 
> > > 
> > > Also, I need a better understanding of how linux manages addressing
> of peripherals? For GPIOs, I am using a sample code as basis of my
> application. this sample code has been provided by the board
> manufacturer. The code snippets are as followed: 
> > > 
> > > ---- 
> > > ---- 
> > > #define AT_BASE 0xFFFFF000 
> > > -- 
> > > --- 
> > > static void *piobase; 
> > > static unsigned int* base; 
> > > --- 
> > > --- 
> > > int main() 
> > > { 
> > > static int fd, pagesize; 
> > > int pattern; 
> > > pagesize = getpagesize(); 
> > > fd = open("/dev/mem", O_RDWR); 
> > > piobase = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, fd,
> AT_BASE); 
> > > base = (unsigned int *) piobase + 0x100; 
> > > -------- 
> > > --------- 
> > > 
> > > } 
> > > 
> > > Here i am unable to undersatnd the reason of choosing 0xFFFFF000 as
> AT_BASE, because as per the memory map of AT91SAM960, this particular
> location is assigned to Advanced Interrupt Controller. 
> > > 
> > > With Best Regards, 
> > > Prashant 
> > > 
> > > 
> > > 
> > > Yahoo! recommends that you upgrade to the new and safer Internet
> Explorer 8. http://downloads.yahoo.com/in/internetexplorer/ 
> > > ------------------------------------------------------------------- 
> > > List admin:
> http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm 
> > > FAQ: http://www.arm.linux.org.uk/mailinglists/faq.php 
> > > Etiquette: http://www.arm.linux.org.uk/mailinglists/etiquette.php 
> > > 
> > 
> > 
> > 
> > ------------------------------------------------------------------- 
> > List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm 
> > FAQ: http://www.arm.linux.org.uk/mailinglists/faq.php 
> > Etiquette: http://www.arm.linux.org.uk/mailinglists/etiquette.php 
> > 
> > 
> > 
> > Looking for local information? Find it on Yahoo! Local
> http://in.local.yahoo.com/ 
> 
> 
> -------------------------------------
> Hi-Tech Gears Limited, Gurgaon, India
> 
> 
> 
> 



-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
FAQ:        http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette:  http://www.arm.linux.org.uk/mailinglists/etiquette.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.