I want to access the DBGU UART on a SAM7S256 using an ISR. My understanding is that DBGU interrupts show up as a SYS interrupt, which is the interrupt used by the tick timer. Therefore, I believe that I need to place my ISR into TickHook. My questions are:
1. Can anyone confirm that this is the right way to do so? If not, can you please let me know a better way to accomplish what I want to do?
2. If this is the right way, is TickHook necessarily a coroutine?
3. Do I need to enable coroutines to put in a tickhook, or merely just enable tickhook?
3. Can I use a xQueueReceiveFromISR from within tickhook, or do I need to use crQUEUE_RECEIVE_FROM_ISR?
4. If tickhook is a coroutine, does it need to yield or just return?
I also wish to put the system in idle mode when it is not doing anything. My understanding is that I can do so by creating an idlehook routine. My questions related to this are:
1. Is idlehook necessariloy a coroutine?
2. Do I need to enable coroutines to put in an idlehook or merely just enable idlehook?
3. If I put the processor into idle mode in idlehook, will it automatically come out of idle mode when a task is ready or do I need to take it out of idlemode in a tickhook routine?
4. Does idlehook need to yield or just return?
Any help would be very much appreciated.
Thanks in advance.