GPIO5 uses external interrupts 8 to 15 as default input function. They are grouped to WIU group 1 and is connected to VIC1.11. I also tried to mask one of GPIO5 bit in SCU->WKUPSEL, but the interrupt routine is never called. any ideas? [ This message was edited by: MarcoHansen on 26-03-2007 20:42 ]
Did u set up the WIU registers? Enable the WIU interrupt in WIU->CTRL and WIU->MR registers Also u may have to set the pin as alternate input 1 in the GPIOIN register...
WIU->CTRL |= 0x02; /* Global WIU Interrupt enable */ WIU->MR |= 0xFFFC; /* Enable all Interrupts in Maskreg */ No effect. Setting the input as alternate input also has no effect.
SCU->PCGRO |= (1<<5); /* Enable VIC peripheral clock gating*/ SCU->PCGR1 |= (1<<19); /* Enable GPIO5 port clock gating */ SCU->PCGR1 |= (1<<13); /* Enable WIU peripheral clock gating*/ SCU->PRR0 |= (1<<5); /* VIC not held in reset */ SCU->PRR1 |= (1<<19); /* GPIO5 not held in reset */ SCU->PRR1 |= (1<<13); /* WIU not held in reset */ Also no effect. The output of GPIO5-register shows change of value so input should work correctly.
I tried your code, but it doesnt work. I had to set up the port clock gating in startup code. Writing to SCU->PCGR1 had no effect. I attached the project. Maybe I forgot something to configure in startup code or there is something wrong with the board. :-?