Hello All I was hoping some of you could help me write an interrupt vector. I'm using CCS - Should I be using something else?. I understand how the IV works, but I would be better helped if some of you have a well commented example of this... Please help!. Best Regards Daniel-San |
|
Writing an interrupt vector?
Started by ●October 9, 2002
Reply by ●October 10, 20022002-10-10
Daniel-San vectors.asm is an example of interrupt vector. myFunction1(2-3) are functions that are declared in other files the no_isrxx finctions are infinite loops so that if an unexpected IT occurs, you will get it easily you need also to set the IVPD and IVPH register. insert the 2 following lines in your initializations phase (using algebraic assembly) @IVPD_L = #(_myVec >> 8 ) || mmap() ;init IT vector @IVPH_L = #(_myVec >> 8 ) || mmap() ;init IT vector Hope this helps, good luck Laurent >From: >Reply-To: >To: >Subject: [c55x] Writing an interrupt vector? >Date: Wed, 9 Oct 2002 11:25:05 +0200 >Hello All > >I was hoping some of you could help me write an interrupt vector. I'm using >CCS - Should I be using something else?. > >I understand how the IV works, but I would be better helped if some of you >have a well commented example of this... > >Please help!. > >Best Regards > >Daniel-San _________________________________________________________________ Affichez, modifiez et partagez gratuitement vos photos en ligne: http://photos.msn.com/support/worldwide.aspx |
;************************************************************************** ; ; File Name : vectors.asm ; Project : ; Author : ; ; Version : 0.1 ; Date : ; Update : ; ; Description : This file defines C5509 Interrupt Vector Table ; ;************************************************************************** .def _myVec .sect "vecTable" .ref _c_int00 .ref myFunction1 .ref myFunction2 .ref myFunction3 .def no_isr1, no_isr2, no_isr3, no_isr4, no_isr5, no_isr6 .def no_isr7, no_isr8, no_isr9, no_isr10, no_isr11, no_isr12 .def no_isr13, no_isr14, no_isr15, no_isr16, no_isr17, no_isr18 .def no_isr19, no_isr20, no_isr21, no_isr22, no_isr23, no_isr24 .def no_isr25, no_isr26, no_isr27, no_isr28, no_isr29, no_isr30 .def no_isr31 .vli_off ;*******************************************************************************\ *** ; .sect "vecTable" ;*******************************************************************************\ *** _myVec: RST: .ivec _c_int00, USE_RETA NMI: .ivec no_isr1 ; SINT1 INT0: .ivec no_isr2 ; SINT2 INT2: .ivec no_isr3 ; SINT3 TINT0: .ivec myFunction3 ;no_isr4 ; SINT4 RINT0: .ivec no_isr5 ; SINT5 RINT1: .ivec no_isr6 ; SINT6 XINT1: .ivec no_isr7 ; SINT7 SINT8: .ivec no_isr8 ; SINT8 DMAC1: .ivec no_isr9 ; SINT9 DSPINT: .ivec no_isr10 ; SINT10 INT3: .ivec no_isr11 ; SINT11 RINT2: .ivec no_isr12 ; SINT12 XINT2: .ivec no_isr13 ; SINT13 DMAC4: .ivec no_isr14 ; ; SINT14 DMAC5: .ivec no_isr15 ; ; SINT15 INT1: .ivec no_isr16 ; SINT16 XINT0: .ivec no_isr17 ; SINT17 DMAC0: .ivec no_isr18 ; SINT18 INT4: .ivec no_isr19 ;SINT19 DMAC2: .ivec myFunction1 ; SINT20 DMAC3: .ivec myFunction1 ; SINT21 TINT1: .ivec no_isr22 ; SINT22 INT5: .ivec no_isr23 ; SINT23 BERR: .ivec no_isr24 ; SINT24 DLOG: .ivec no_isr25 ; SINT25 RTOS: .ivec no_isr26 ; SINT26 SINT27: .ivec no_isr27 ; SINT27 SINT28: .ivec no_isr28 ; SINT28 SINT29: .ivec no_isr29 ; SINT29 SINT30: .ivec no_isr30 ; SINT30 SINT31: .ivec no_isr31 ; SINT31 .vli_on .text no_isr1: goto( no_isr1 ) no_isr2: goto( no_isr2 ) no_isr3: goto( no_isr3 ) no_isr4: goto( no_isr4 ) no_isr5: goto( no_isr5 ) no_isr6: goto( no_isr6 ) no_isr7: goto( no_isr7 ) no_isr8: goto( no_isr8 ) no_isr9: goto( no_isr9 ) no_isr10: goto( no_isr10 ) no_isr11: goto( no_isr11 ) no_isr12: goto( no_isr12 ) no_isr13: goto( no_isr13 ) no_isr14: goto( no_isr14 ) no_isr15: goto( no_isr15 ) no_isr16: goto( no_isr16 ) no_isr17: goto( no_isr17 ) no_isr18: goto( no_isr18 ) no_isr19: goto( no_isr19 ) no_isr20: goto( no_isr20 ) no_isr21: goto( no_isr21 ) no_isr22: goto( no_isr22 ) no_isr23: goto( no_isr23 ) no_isr24: goto( no_isr24 ) no_isr25: goto( no_isr25 ) no_isr26: goto( no_isr26 ) no_isr27: goto( no_isr27 ) no_isr28: goto( no_isr28 ) no_isr29: goto( no_isr29 ) no_isr30: goto( no_isr30 ) no_isr31: goto( no_isr31 ) |