Sorry by re-open this old topic
But I have the same problem with IRQ1 and I don't know how I can fix it. All my others IRQs work fine using the same IRQ configuration.
Matt
Hi Matt
I just tested IRQs 1, 4, 5 and 7 on an M5213EVB. All worked as expected.
The only difference in the code to handle IRQ1 configuration is the following:
if (ucIRQ_bit == 1) { // special case IRQ1 pin has quad function
PNQPAR &= ~0x03;
PNQPAR |= 0x01;
}
else {
PNQPAR |= (0x01 << ucIRQ_bit); // other pins have dual function
}
Since all pins default to their IRQ configuration these are however no usually needed.
If you want to verify your HW I have attached the file that I just tested so that you can load it to your board. It should run on any board with 8MHz crystal and uses UART0 at 115200 Baud. When the corresponding edge on these pins is detected it writes a message to this output.
You can get complete code at http://www.utasker.com/Licensing/request.html
Regards
Mark
Ok thank you by your response Mark!
Hi Airswit
There is a difference in the PNQPAR register since the IRQ1 has to be configured for a quad function rather than dual function (as for other IRQ lines).
Therefore check that the value is being set correctly for Primary function. (I believe that these pins all default to IRQ inputs after a reset and so possibly need no configuration at all).
Regards
Mark Butcher
www.mjbc.ch / www.uTasker.com