Reply by Mina June 9, 20052005-06-09
luis soares wrote:
> Hi > > The problem seems to be in the printfs if when an interrupt occurs the > visual DSP is in the middle of writting to the console and then > another write occurs, there will be problems. > > But if this doesn t write it all goes well > > best regards > > luis
You have to use some build option that it cant interrupt in the middle of writing.
Reply by luis soares June 8, 20052005-06-08
Hi 

The problem seems to be in the printfs if when an interrupt occurs the
visual DSP is in the middle of writting to the console and then
another write occurs, there will be problems.

But if this doesn t write it all goes well

best regards 

luis
Reply by Bhaskar Thiagarajan June 8, 20052005-06-08
"luis soares" <lmbpsoares@gmail.com> wrote in message
news:8f1100bb.0506080942.911960d@posting.google.com...
> Hi > > My problem is related with the timer.c example presented in AD site > for the ADSP 2189. > > ftp://ftp.analog.com/pub/www/technology/dsp/218x/codeExamples/timer.zip > > #include"signal.h" > #include"misc.h" > #include"sysreg.h" > > void Timer_ISR(); > main() > { > interrupt(SIGTIMER,Timer_ISR); > timer_set(0xFFFF,0xFFFF,0xFF); > timer_on(); > enable_interrupts(); > > while (1) > { > asm("idle;"); // Wait for interrupt > } > } > void Timer_ISR(){ > //printf("Timer interrupt is generated!\n"); //Printed on > Simulator's > asm("toggle fl1;"); > } > > > I compile and run and everything seems to be ok. But when i uncomment > the printf in the interrupt routine of the timer, the printf doesn t > appear in the console. > > I putted some printfs in other places of the main program and it > prints them but it takes to long like 30 to 40 seconds for printf, and > if i put any printf after the intruction in the while(1) > >>asm("idle;");<< it doesn &#4294967295;t gets printed on the console and when i > push F10 the program does not step just keeps halted on the printf. > > what might be the problem ??
Try including <stdio.h> and rebuilding your project. Cheers Bhaskar
> > best regards
Reply by luis soares June 8, 20052005-06-08
Hi

My problem is related with the timer.c example presented in AD site
for the ADSP 2189.

ftp://ftp.analog.com/pub/www/technology/dsp/218x/codeExamples/timer.zip

#include"signal.h"
#include"misc.h"
#include"sysreg.h"

void Timer_ISR();
main()
{
	interrupt(SIGTIMER,Timer_ISR);
	timer_set(0xFFFF,0xFFFF,0xFF); 
	timer_on();
        enable_interrupts();	
	
		while (1)
		{
			asm("idle;");  // Wait for interrupt
		}
}
    void Timer_ISR(){
    	//printf("Timer interrupt is generated!\n"); //Printed on
Simulator's
    	asm("toggle fl1;");
    }


I compile and run and everything seems to be ok. But when i uncomment
the printf in the interrupt routine  of the timer, the printf doesn t
appear in the console.

I putted some printfs in other places of the main program and it
prints them but it takes to long like 30 to 40 seconds for printf, and
if i put any printf after the intruction in the while(1)
>>asm("idle;");<< it doesn &#4294967295;t gets printed on the console and when i
push F10 the program does not step just keeps halted on the printf. what might be the problem ?? best regards