This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

unable to generate interrupts using TIMER2 and TIMER3

Hi,

I am using TIMER3 in my project.Configured timers  TIMER3 to generate interrupt.But i am unsuccessfull in this.

Following code is used .Please let me know where i am missing.

 

 

 

 

 

 

#define TIMER_EVENT4 86

sysRegs->PINMUX4 |= CSL_FMKT(SYSCFG_PINMUX4_PINMUX4_15_12,TM64P3_OUT12);

 

 

/* Clear TIM12 register */

CSL_FINST(tmr3Regs->TIM12,TMR_TIM12_TIM12,RESETVAL);

 

 

 

 

/* Clear TIM34 register */

CSL_FINST(tmr3Regs->TIM34,TMR_TIM34_TIM34,RESETVAL);

 

 

 

 

/* Select 32 bit unchained mode *

 * Take the timer out of reset and set the pre-scalar count for 3:4 */

tmr3Regs->TGCR = CSL_FMKT(TMR_TGCR_TIMMODE,32BIT_UNCHAIN)

| CSL_FMKT(TMR_TGCR_TIM12RS,NO_RESET)

| CSL_FMKT(TMR_TGCR_TIM34RS,NO_RESET)

| CSL_FMK(TMR_TGCR_PSC34,0x1);

 

 

 

 

/* Set timer1 PRD1:2 */

CSL_FINS(tmr3Regs->PRD12,TMR_PRD12_PRD12,TIMER_PERIOD);

 

 

 

 

/* Set timer1 PRD3:4 */

CSL_FINS(tmr3Regs->PRD34,TMR_PRD34_PRD34,TIMER_PERIOD);

//map to interrupt 4

 

CSL_FINS(intcRegs->INTMUX1, DSPINTC_INTMUX1_INTSEL4,TIMER_EVENT4);

 

 

 

 

 

 

 

/* set ISTP to point to the vector table address */

 

ISTP = (

 

unsigned int

)intcVectorTable;

 

 

 

/* clear all interrupts, bits 4 thru 15 */

ICR = 0xFFF0;

 

 

 

 

/* enable the bits for non maskable interrupt and */

IER = 0xF2;

 

 

 

 

/* enable interrupts, set GIE bit */

_enable_interrupts();

This is the intvecs.asm code

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Global symbols defined here and exported out of this file

 

 

.global

_intcVectorTable

 

 

.global

_c_int00

 

 

.global

_vector1

 

 

.global

_vector2

 

 

.global

_vector3

 

 

.global

_TIMER0_TINT12_isr

 

 

.global

 

_vector5

 

 

.global

 

_vector6

 

 

.global

 

_vector7

 

 

.global

 

 

_vector8

 

 

.global

_vector9

 

 

.global

_vector10

 

 

.global

_vector11

 

 

; This is a macro that instantiates one entry in the interrupt service table.

VEC_ENTRY

 

.macro

addr

STW B0,*--B15

MVKL addr,B0

MVKH addr,B0

 

 

B

B0

LDW *B15++,B0

 

 

NOP

2

 

 

NOP

 

 

NOP

 

 

.endm

 

; This is a dummy interrupt service routine used to initialize the IST.

_vec_dummy:

 

 

B

B3

 

 

NOP

5

 

; This is the actual interrupt service table (IST).

 

 

.sect

".vecs"

 

 

.align

1024

 

_intcVectorTable:

_vector0:

 

 

VEC_ENTRY _c_int00

;RESET

_vector1:

 

 

VEC_ENTRY _vec_dummy

;NMI

_vector2:

 

 

VEC_ENTRY _vec_dummy

;RSVD

_vector3:

 

 

VEC_ENTRY _vec_dummy

;RSVD

_vector4:

 

 

VEC_ENTRY _TIMER0_TINT12_isr

;isr0

_vector5:

 

 

VEC_ENTRY _vec_dummy

;isr1

_vector6:

 

 

VEC_ENTRY _vec_dummy

;isr2

_vector7:

 

 

VEC_ENTRY _vec_dummy

;isr3

_vector8:

 

 

VEC_ENTRY _vec_dummy

_vector9:

 

 

VEC_ENTRY _vec_dummy

_vector10:

 

 

VEC_ENTRY _vec_dummy

_vector11:

 

 

VEC_ENTRY _vec_dummy

 

After these configurations also i am unble to generate interrupt using Timer3.Please help me.it is very critical.

Thanks.