EmbeddedRelated.com
Forums

Use of timer2 and INT14

Started by Raoul January 30, 2007
Hi to all

has anyone of You ever used timer2 and its interrupt INT14?
I'm not using DSPBIOS nor RTOS and I need to use timer2; but, when the
interrupt of timer 2 is on, the Program Counter goes to a wrong place
in the code space.

I can't understand if I'm mistaking something when setting INT14 or in
the loading of the ISR address in the correct place or if there are
any limitations in using timer2.
I'm currently using interrupts for ADC, PWM, CAN, TIMER0 and other
periphereals, but I can't set correctly INT14 for TIMER2.

Can anyone of You tell me if he's using timer2 as normal timer and how
to set correctly the ISR and its address in the interrupt vector.

Thank You very much

Best regards
Hi Raoul,

Are you using a 280x or 281x device ?

In 281x devices, Timer interrupt 2 is a reserved TI
interrupt so you might not be able to actually use it.
I haven't personally used Timer 2 Interrupt.

The peripheral Interrupt Expansion controller handles
only interrupt INT1-INT12. So you need to check with
the system control reference guide as to how to handle
the INT14 interrupt. INT14 also has a low priority of
16 and thats probably why other interrupts are getting
sreviced and not INT14.

Hope this helps.

Thanks,
Vishal.
--- Raoul wrote:

> Hi to all
>
> has anyone of You ever used timer2 and its interrupt
> INT14?
> I'm not using DSPBIOS nor RTOS and I need to use
> timer2; but, when the
> interrupt of timer 2 is on, the Program Counter goes
> to a wrong place
> in the code space.
>
> I can't understand if I'm mistaking something when
> setting INT14 or in
> the loading of the ISR address in the correct place
> or if there are
> any limitations in using timer2.
> I'm currently using interrupts for ADC, PWM, CAN,
> TIMER0 and other
> periphereals, but I can't set correctly INT14 for
> TIMER2.
>
> Can anyone of You tell me if he's using timer2 as
> normal timer and how
> to set correctly the ISR and its address in the
> interrupt vector.
>
> Thank You very much
>
> Best regards
Hi there,

I have used both timer0 and 2 with my F2812ezDSP, and I attached some part of my program that was related to these two interrupts, just check if you set all of these registers or not, I hope it can help.

all the best,
Parissa

gopalakrishnan vishal anand wrote:
Hi Raoul,

Are you using a 280x or 281x device ?

In 281x devices, Timer interrupt 2 is a reserved TI
interrupt so you might not be able to actually use it.
I haven't personally used Timer 2 Interrupt.

The peripheral Interrupt Expansion controller handles
only interrupt INT1-INT12. So you need to check with
the system control reference guide as to how to handle
the INT14 interrupt. INT14 also has a low priority of
16 and thats probably why other interrupts are getting
sreviced and not INT14.

Hope this helps.

Thanks,
Vishal.
--- Raoul wrote:

Hi to all

has anyone of You ever used timer2 and its interrupt
INT14?
I'm not using DSPBIOS nor RTOS and I need to use
timer2; but, when the
interrupt of timer 2 is on, the Program Counter goes
to a wrong place
in the code space.

I can't understand if I'm mistaking something when
setting INT14 or in
the loading of the ISR address in the correct place
or if there are
any limitations in using timer2.
I'm currently using interrupts for ADC, PWM, CAN,
TIMER0 and other
periphereals, but I can't set correctly INT14 for
TIMER2.

Can anyone of You tell me if he's using timer2 as
normal timer and how
to set correctly the ISR and its address in the
interrupt vector.

Thank You very much

Best regards
Hi Vishal
Thanks for your answer.

As You can see in the attached file, TI itself says that we should be able to use timer1 and 2 if we don't use RTOS or DSPBIOS: in the attached file search the following statement:

// CpuTimer 1 and CpuTimer2 are reserved for DSP BIOS & other RTOS
// Do not use these two timers if you ever plan on integrating
// DSP-BIOS or another realtime OS.
//

Anyway, I'm using 2812 and 2810.
What do You think about the fact that in spru430d, TI says the address for INT14 vector is 0x001C ( if VMAP=0 and 0x3F FFDC if VMAP=1, at page 3-4 ) while it says the address is 0x 0D1C in spru078c, page 6-17?

Some in TI support says that timers 1 and 2 can be used if we don't use RTOS, but...following the lines suggested in documentation ( or probably I think to do so ), something works wrong: toggling an output pin goes on, but stopping Code Composer I see a long list of ITRAP0!

Thanks

Best regards

Raoul Chieu
Centro Ricerche
Ups Manufacturing Srl
Viale Europa 7
37048 San Pietro di Legnago (VR)
Tel. +39 0442 635811 - Fax. +39 0442 635934
Skype: - VoIp:
email: R...@riello-ups.com
Web: http://www.riello-ups.com
-----------------------------
Chi riceve il presente messaggio e` tenuto a verificare se lo stesso non gli sia pervenuto per errore. In tal caso e` pregato di avvisare immediatamente il mittente e, tenuto conto delle responsabilita` connesse all'indebito utilizzo e/o divulgazione del messaggio e/o delle informazioni in esso contenute, voglia cancellare l'originale e distruggere le varie copie o stampe.

The receiver of this message is required to check if he/she has received it erroneously. If so, the receiver is requested to immediately inform the sender and - in consideration of the responsibilities arising from undue use and/or disclosure of the message and/or the information contained therein - destroy the original message and any copy or printout thereof.

________________________________
Da: c... [mailto:c...] Per conto di gopalakrishnan vishal anand
Inviato: gioved1 febbraio 2007 5.04
A: Raoul Chieu; c...
Oggetto: Re: [c28x] Use of timer2 and INT14

Hi Raoul,

Are you using a 280x or 281x device ?

In 281x devices, Timer interrupt 2 is a reserved TI
interrupt so you might not be able to actually use it.
I haven't personally used Timer 2 Interrupt.

The peripheral Interrupt Expansion controller handles
only interrupt INT1-INT12. So you need to check with
the system control reference guide as to how to handle
the INT14 interrupt. INT14 also has a low priority of
16 and thats probably why other interrupts are getting
sreviced and not INT14.

Hope this helps.

Thanks,
Vishal.
--- Raoul > wrote:

> Hi to all
>
> has anyone of You ever used timer2 and its interrupt
> INT14?
> I'm not using DSPBIOS nor RTOS and I need to use
> timer2; but, when the
> interrupt of timer 2 is on, the Program Counter goes
> to a wrong place
> in the code space.
>
> I can't understand if I'm mistaking something when
> setting INT14 or in
> the loading of the ISR address in the correct place
> or if there are
> any limitations in using timer2.
> I'm currently using interrupts for ADC, PWM, CAN,
> TIMER0 and other
> periphereals, but I can't set correctly INT14 for
> TIMER2.
>
> Can anyone of You tell me if he's using timer2 as
> normal timer and how
> to set correctly the ISR and its address in the
> interrupt vector.
>
> Thank You very much
>
> Best regards