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");
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:
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 ?
Discussion around AT91RM9200 and SAM9 Series Products.
2 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 0 guests