Dear Ameba Team,
I’m currently working on enabling GPIO interrupts on several pins, but I encountered CPU exceptions during testing. After evaluating each GPIO pin, I found that the following pins consistently fail when interrupts are enabled:
- D15 (GPIOE_1): Cannot read after GPIO interrupt is enabled
- D18 (GPIOD_16): Cannot read after GPIO interrupt is enabled
- D19 (GPIOD_15): Cannot read after GPIO interrupt is enabled
- D20 (GPIOD_14): Cannot read after GPIO interrupt is enabled
It seems enabling interrupts on these specific pins results in abnormal behavior or even system crashes.
Could you please help identify the cause and provide a way to make these pins work properly with GPIO interrupts?
I’ve also attached a test file for verifying GPIO behavior. The issue only occurs when D15, D18, D19, or D20 are included in the interrupt test.
If the test excludes these pins — for example:
if ((i!=15) && (i!=18) && (i!=19) && (i!=20))
then no exceptions occur, and everything works as expected.
However, if any of these pins are included, the CPU exception is triggered.
GPIOReadTest.zip (549 位元組)