Reply by Liechty Ronald-RAT109 May 20, 20052005-05-20

 

Hi Bruno,

 

My apology for the delay in my response.   This feature is not supported in Processor Expert.
  
Allocation of the interrupt, without using a bean for the peripheral,  is supported by a special bean InterruptVector which allows you to specify name of the ISR and generates a name of the IRS into vectors.c file.
However, the runtime changes of the vector is not directly supported in this case as well and you will have to do this within your code (for example using an IF condition or using a function pointer variable).

 

Hope this helps.

 

Ron

 

-- 
Ron Liechty  (MW Ron)
Ombudsman, Manager FOCUS team
r...@freescale.com


-----Original Message-----
From:
m...@yahoogroups.com [mailto:m...@yahoogroups.com] On Behalf Of Bruno Tremblay

 

            Again with that question. With the SDK, I was using the function :

 

archInstallISR (Pointer_to_Interrupt_Address, ISR_name)

 

but now with CW7.0, I'm stock without that SDK function. My question is: how can I set dynamically an ISR in the interrupt vector?

 

Thanks,

 

Bruno



Reply by Corey, Rick May 16, 20052005-05-16
Hi Bruno
 
I'm on CW 6, not 7.  Also, we do not use PE except in little "stub" projects, to produce sample code snippets..
 
What we use for the vector table has a name like "vector_isr.ASM", or "vectors.c" .  I forget where we got the first version of vector.ASM - maybe from stationary, or some sample program.  The sample vector.c file came from Processor Expert.
 
To select the ISRs at compile-time, we basically type in the name of the C function that has "#Pragma interrupt saveall", preceded by an "F", directly into the vector table.  You have to provide a function prototype in vector_isr.ASM. 
 
Little bits of sample code are below, from Metrowerks.
 
Is that what you were trying to do?  Or do you want to change the ISR at run-time?  For that we made the real ISR call a function pointer, and we change the function pointer at run-time.  In the example below, "FISR_GPIO_Port_D_Interrupt " means "jump to the C function "ISR_GPIO_Port_D_Interrupt" .  That function has "#pragma interrupt saveall".  It calls a function pointer, that we set up at runtime, usually a different function pointer for each pin on PortD.
 
Rick Corey
 
 

;--------------------------------
; SWI interrupts ($06, $1C, $1E, $20)
;--------------------------------
SWI_IRQ:
   debughlt                      
   nop
   nop
   rti
 
 
 
   
   section interrupt_vectors
   org   p:
  
   global   FMC56F835x_intVec
  
   ; ----------------------------- Stepper Motor ISRs - function prototypes
   global   FDecoder0HomeOrWatchdogISR
   global   FDecoder1HomeOrWatchdogISR
   global   FQTimerISRC0                ; JohnB's dispatch function calls ISR_StepperTimerC0
   global   FQTimerISRC1                ; JohnB's dispatch function calls ISR_StepperTimerC1
   global   FISR_GPIO_Port_D_Interrupt  ; GPIO POrt D IRQ: used for MoveToSensor, levelSens, TipJam, & DoorOpen in dspGPIO.C
  
   ; ----------------------------- FlexCAN ISRs  - function prototypes
   global   FISR_FlexCanRxTx            ; RCorey 07/28/2004  ... there is s a c fucntion  "ISR_FlexCanRxTx"
   global   FISR_FlexCanErrors          ; RCorey 07/28/2004
   global   FISR_FlexCanWakeUp          ; RCorey 08/13/2004
   global   FISR_FlexCanBusOff          ; RCorey 08/13/2004
. . .
 
; here is part of the vector table itself

FMC56F835x_intVec:
 
   jsr >F_DPC_Startup            ; RESET                                            ($00)
   jsr >COP_IRQ                  ; COP Watchdog reset                               ($02)
   jsr >OPCODE_IRQ               ; Illegal instruction                              ($04)
   jsr >SWI_IRQ                  ; Software interrupt 3                             ($06)
   jsr >HWS_OVERFLOW_IRQ         ; Hardware stack overflow                          ($08)
   jsr >MISALIGN_IRQ             ; Misaligned long word access                      ($0A)
   jsr >EONCE_IRQ                ; EOnCE step counter                               ($0C)
   jsr >EONCE_IRQ                ; EOnCE breakpoint unit 0                          ($0E)
   jsr >MC56F835x_intRoutine     ; reserved                                         ($10)
   jsr >EONCE_IRQ                ; EOnCE trace buffer                               ($12)
   jsr >EONCE_IRQ                ; EOnCE transmit register empty                    ($14)
   jsr >EONCE_IRQ                ; EOnCE receive register full                      ($16)
   jsr >MC56F835x_intRoutine     ; reserved                                         ($18)
   jsr >MC56F835x_intRoutine     ; reserved                                         ($1A)
   jsr >SWI_IRQ                  ; software interrupt 2                             ($1C)
   jsr >SWI_IRQ                  ; software interrupt 1                             ($1E)
   jsr >SWI_IRQ                  ; software interrupt 0                             ($20)
   jsr >IRQA_IRQ                 ; IRQA                                             ($22)
   jsr >IRQB_IRQ                 ; IRQB                                             ($24)
   jsr >MC56F835x_intRoutine     ; reserved                                         ($26)
   jsr >LVD_IRQ                  ; Low Voltage Detector (power sense)               ($28)
   jsr >PLL_IRQ                  ; PLL                                              ($2A)
   jsr >FLASH_IRQ                ; FM Error Interrupt                               ($2C)
   jsr >FLASH_IRQ                ; FM Command Complete                              ($2E)
   jsr >FLASH_IRQ                ; FM Command, data and address Buffers Empty       ($30)
   jsr >MC56F835x_intRoutine     ; reserved                                         ($32)
   jsr >FISR_FlexCanBusOff          ; FlexCAN Bus Off                               ($34)
   jsr >FISR_FlexCanErrors          ; FlexCAN Error                                 ($36)
   jsr >FISR_FlexCanWakeUp          ; FlexCAN Wake Up                               ($38)
   jsr >FISR_FlexCanRxTx            ; FlexCAN Message Buffer Interrupt              ($3A)
   jsr >GPIOF_IRQ                ; GPIO F                                           ($3C)
   jsr >GPIOE_IRQ                ;  GPIO E FISR_GPIO_Port_E_Interrupt ;             ($3E)
   jsr >FISR_GPIO_Port_D_Interrupt ; GPIO D MoveToSensor, DoorOpen LevelSense etc   ($40)
 
 
-----Original Message-----
From: m...@yahoogroups.com [mailto:m...@yahoogroups.com]On Behalf Of Bruno Tremblay
Sent: Monday, May 16, 2005 11:04 AM
To: m...@yahoogroups.com
Subject: [motoroladsp] Dynamic interrupt with CW7.0

Hi,

 

            Again with that question. With the SDK, I was using the function :

 

archInstallISR (Pointer_to_Interrupt_Address, ISR_name)

 

but now with CW7.0, I'm stock without that SDK function. My question is: how can I set dynamically an ISR in the interrupt vector?

 

Thanks,

 

Bruno



NEW!  You can now post a message or access and search the archives of this group on DSPRelated.com:
http://www.dsprelated.com/groups/motoroladsp/1.php

_____________________________________
Note: If you do a simple "reply" with your email client, only the author of this message will receive your answer.  You need to do a "reply all" if you want your answer to be distributed to the entire group.

_____________________________________
About this discussion group:

Archives:  http://www.dsprelated.com/groups/motoroladsp/1.php

To Post:  Send an email to m...@yahoogroups.com

Other DSP Related Groups: http://www.dsprelated.com/groups.php

Reply by Bruno Tremblay May 16, 20052005-05-16

Hi,

 

            Again with that question. With the SDK, I was using the function :

 

archInstallISR (Pointer_to_Interrupt_Address, ISR_name)

 

but now with CW7.0, I’m stock without that SDK function. My question is: how can I set dynamically an ISR in the interrupt vector?

 

Thanks,

 

Bruno