Technical discussions about the TI C54x DSPs (including the c5401, c5402, c5402a, c5404, c5407, c5409, c5409a, c5410, c5410a, c5416, c5420, c5421, c5441, c549, c5470 and c5471).
|
Hi it's me again. I have still problems with Interrupts on the C5402 DSK Board. I'm not able to fix my interrupt problem. I found the TI documentation very horrible. There are no source code examples that show how external interrupts are realised in C. I found many different header files that use the IMR register. In each file the register is accessed different. This files are the C54.h, intr.h or hwi.h . I've tried to a BIOS configuration file to handle the interrupts, and another time I tried to use the interrupt keyword, but it never runs. Who can help me to fix my problem. I want to use an external interrupt that is triggered by an externel event (clock or somethin else) to read from an IO port of the C54X. It would also be helpfull if someone could explain me which steps has to be done to realise an interrupt routine. - how can I set the IMR register for the external interrupts - hwo are interrupts globally enabled (like INTR_GLOBAL_ENABLE; from intr.h or C54_enable() from C54.h) - how are interrupt routines written in C (e.g. interrupt void INT0 () ) This is a code I tried out: #include <std.h> #include <c54.h> ioport Uns port8000; Uns uData; interrupt void INT1() { uData = port8000; } void main(void) { C54_enableIMR(C54_INT1); C54_enable(); while(1); } Thanks for any help. Christian |
|
|
|
The only way I've got these to work is by following the example in the CCS tutorial book which has the hardware interrupt firing off a software interrupt. Shortcutting the thing never worked. Jeff -----Original Message----- From: Christian Dolzer [mailto:] Sent: Tuesday, March 13, 2001 7:18 AM To: Subject: [c54x] Interrupts with CCS Hi it's me again. I have still problems with Interrupts on the C5402 DSK Board. I'm not able to fix my interrupt problem. I found the TI documentation very horrible. There are no source code examples that show how external interrupts are realised in C. I found many different header files that use the IMR register. In each file the register is accessed different. This files are the C54.h, intr.h or hwi.h . I've tried to a BIOS configuration file to handle the interrupts, and another time I tried to use the interrupt keyword, but it never runs. Who can help me to fix my problem. I want to use an external interrupt that is triggered by an externel event (clock or somethin else) to read from an IO port of the C54X. It would also be helpfull if someone could explain me which steps has to be done to realise an interrupt routine. - how can I set the IMR register for the external interrupts - hwo are interrupts globally enabled (like INTR_GLOBAL_ENABLE; from intr.h or C54_enable() from C54.h) - how are interrupt routines written in C (e.g. interrupt void INT0 () ) This is a code I tried out: #include <std.h> #include <c54.h> ioport Uns port8000; Uns uData; interrupt void INT1() { uData = port8000; } void main(void) { C54_enableIMR(C54_INT1); C54_enable(); while(1); } Thanks for any help. Christian _____________________________________ |