cancel
Showing results for 
Search instead for 
Did you mean: 

ST62T65 problem with ports and interrupts

lukasbakowski
Associate II
Posted on February 06, 2004 at 08:23

ST62T65 problem with ports and interrupts

2 REPLIES 2
lukasbakowski
Associate II
Posted on February 05, 2004 at 14:16

I work with 4 interrupts simltaneously: NMI

AR Timer

A/D Converter

TIMER

My ports have next configuration:

DDRA 11110000 DDRB 11111111 DDRC 00000010

ORA 11110010 ORB 00111111 ORC 00000010

DRA 11110110 DRB 11111111 DRC 00000011

All interrupt works in real time.

My problem is:

When I reconfigure outputs of port B in Timer (or A/D converter) interrupt, then interrupt of AR timer is not periodical.

All the time I have in ARCP register the same value.

My AR Timer works in auto-reload mode, and makes compare interrupt.

What I must do, to interrupt of AR Timer was periodical, and independent from reconfiguration port B in vector 4 interrupt.
vikas2
Associate II
Posted on February 06, 2004 at 08:23

When you configure the timer intrerrupt, this makes the timer interrupt to occur after the particular time. Also at the same time you are also enabling ARtimer interrupt.

The ARtimer interrupt in this case in not periodical. This is due to the fact that if the ARtimer interrupt occur when the controller is executing Timer Interrupt service routine, then first the timer interrupt routine will get executed and after completing the Timer ISR, the control will go to ARTimer routine or any other ISR depending on the priority of the interrupt.