DSPRelated.com
Forums

Query related to ADSP 21060/21160

Started by sundi January 16, 2001
Dear all,

We are working with SHARC ADSP21060 and ADSP21160 processors.
We have certain issues relating to Pheripherals and their interrupts.

we will explain the whole scenario of our setup:

The total flow of execution is divided into 3 sections:
section 1:
Intialization part where the interrupts and pheripherals are enabled

section 2:
comprises the main loop of execution which goes infinitely until
broken by an exit condition.
section 3:
Deintialization part where we disable the pheripherals and the
interrupts and once again move over to section 1.
The above process goes till power off.

Assuming the above scenario we had faced the following problems in the past:

a) Serial Port1 of ADSP21060 was activated and its interrupt enabled in
section 1. Some where in the middle of section 2 , we disabled the Serial
Port1, but did not diable its interrupt. Now when the exit conditon was
met in section 2 , the flow of execution from section2 to section 3 and
back to section 1 did not happen properly and the whole code crashed.
we rectified the above problem by disabling the sport1 interrupt also apart
from disabling Serial port 1 . The question is: why should an interrupt of
any pheriperal device play a role on the program execution when the
pheripheral device itself is not enabled ?

b) we faced Similar problem with Timer of ADSP21160.
We activated Timer and its interrupt in section1. Then some where in the
middle of section2 we disable the Timer but not the timer interrupt.
With this situation, the crash happened in section2 itself. This also
we rectified by disabling the timer interrupt also along with disabling
the timer.

Though the above two problems got rectified, the question is again: why
should an interrupt of any pheriperal device play a role on the program
execution when the pheripheral device itself is not enabled ? could u
please throw some light on this.

Now the current problem we face is as follows:
c) Problem with IRQ1 in ADSP21060:
IRQ1 is enabled somewhere in the middle of section2. Once an exit
condition is met in section2, the control as usual moves to section3 where
IRQ1 is disabled and the control thread then moves back to section1. The
problem we face is that, no matter what is in the ISR of IRQ1, just merely
enabling IRQ1 causes the whole program to crash when the exit condition in
section2. Running parallely are Serial Port 0 transmit with its interrupt
enabled and Serial Port 1 with its interrupt disabled. could there be any
problem because of more than one pheripheral functioning parallely ?
Kindly throw some light on this matter as we are stuck with this problem
at the end of the project for an important Japanese client.

Interrupts are enabled using the "interrupt()" function.
For (eg) the IRQ1 interrupt is enabled as follows:

fn_IRQ1 = &IRQ1_ISR;
interrupt(SIG_IRQ1,fn_IRQ1);
where SIG_IRQ1 is taken from "signals.h" header file, IRQ1_ISR is the
ISR routine that needs to be called when IRQ1 occurs and fn_IRQ1 is
a function pointer.

The interrupts are diabled using the following piece of code:
interrupt(SIG_IRQ1,SIG_IGN);
we also enable and disable the interrupts using explicit assembly statements
using inline assembly.

kindly help us in this regard

with best regards,
Suyog Moogi
S Sundararaman

Sasken communication Technology limited
Bangalore, India.
ph : 91-80-5560735

Intelligent Life on the Web..........................find it today at
Buzzle.com!