izmit escort escort ankara adana escort

 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: PIO Input Change interrupt
PostPosted: Thu May 18, 2017 9:32 pm 
Offline

Joined: Thu May 18, 2017 8:37 pm
Posts: 1
Hello,

Using CPU SAM9G20 I am trying to get an interrupt on PIO Input Change.
I am using PA26 pin and PIOA controller. Currently having some issues to init the controller.

My code is:

volatile unsigned int reg ;
volatile unsigned int reg1 ;

pioa_clk = clk_get(NULL, "pioA_clk");
clk_enable(pioa_clk);

at91_set_gpio_input(AT91_PIN_PA26, 1);
at91_sys_write(AT91_PIOA + PIO_IER, 1<<26);

reg = at91_sys_read(AT91_PIOA + PIO_IMR);
printk(KERN_ERR "at91_sys_read: %x\n", reg);

reg1 = at91_sys_read(AT91_PIOA + PIO_IMR);
printk(KERN_ERR "one more time at91_sys_read: %x\n", reg1);

Here is the output:
at91_sys_read: 4000000
one more time at91_sys_read: 0

It shows that the mask has gone after the second read of PIO_IMR register. What could happen ?

Thank you,
Igal


Top
 Profile  
Reply with quote  
 Post subject: Re: PIO Input Change interrupt
PostPosted: Thu Jun 01, 2017 12:17 am 
Offline

Joined: Thu Apr 19, 2007 10:15 pm
Posts: 1432
Location: USA
What does your "code" represent?
It could be old 2.6.xx kernel code, but why is there clock initialization?

Try dumping the entire register block for PIOA before and after.

Regards


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: