Closed mksit closed 3 years ago
Hi,
I am writing the C code to handle the interrupt from a custom module. I have already modified crt0.riscv.S to support the new interrupt, but I am confused about how to set up the event unit for the interrupt.
First, I followed this example (https://github.com/pulp-platform/pulpino/blob/master/sw/apps/riscv_tests/testIRQ/main.c) to write ECP, IER and ICP, but I found that the event unit got stuck in SLEEP state.
Then, I tried the approach in another example (https://github.com/pulp-platform/pulpino/blob/master/sw/apps/imperio_tests/testInterrupt/main.c) to write EER as well, and it finally works, but I don't understand why I need to set up EER.
What is the difference between event and interrupt for event unit? Which registers should I write before and after interrupt?
Hi,
I am writing the C code to handle the interrupt from a custom module. I have already modified crt0.riscv.S to support the new interrupt, but I am confused about how to set up the event unit for the interrupt.
First, I followed this example (https://github.com/pulp-platform/pulpino/blob/master/sw/apps/riscv_tests/testIRQ/main.c) to write ECP, IER and ICP, but I found that the event unit got stuck in SLEEP state.
Then, I tried the approach in another example (https://github.com/pulp-platform/pulpino/blob/master/sw/apps/imperio_tests/testInterrupt/main.c) to write EER as well, and it finally works, but I don't understand why I need to set up EER.
What is the difference between event and interrupt for event unit? Which registers should I write before and after interrupt?