Reply by mswierzy July 12, 20062006-07-12
Hi @ll,

i am a a newbie to DSP's and have a lot of questions. My first problem
is the perfomance.
I have a ADSP-BF535 EZ-Kit Lite.
There is an example how to alternate blinking PF0/PF2 and PF1/PF3 using
a delay loop
I try to get the max. performance but i couldn't alternate the pins
faster then with 8 MHz. Please tell me how to modify the C-Source to
get the max. perfomance.



/*****************************************************************************/
/***This program alternates blinking PF0/PF2 and PF1/PF3 using a delay
loop***/
/***This program is written in C.	*/
/* This program also shows an example on how to modify the C run-time
header***/
/*****************************************************************************/
#include <sys/exception.h>
#include <sys/excause.h>
#include "defBF535.h"

#define	DELAY_LOOP	0xFFFFF

/*global variables*/
volatile unsigned short * fio_dir_reg;
volatile unsigned short * fio_set_reg;
volatile unsigned short * fio_clr_reg;

/*function prototype*/
void	delay(void);


/*void main()*/
void main()
{



    fio_dir_reg = (unsigned short *)FIO_DIR;
	fio_set_reg = (unsigned short *)FIO_FLAG_S;
	fio_clr_reg = (unsigned short *)FIO_FLAG_C;

	/* set PF0 - PF3 as output */
	*fio_dir_reg = (unsigned short)0x000F;

	asm("ssync;");
	int a,b,c;

	for(;;)
    {
		/* clear all the LED */
  		*fio_set_reg = (unsigned short)0x000F;
		/* set LED to 0xA pattern */
		*fio_clr_reg = (unsigned short)0x000F;
	}

}

/* simple delay routine */
void delay()
{
	unsigned long	i;

	for(i=0; i<DELAY_LOOP; i++)
	{
		asm("nop;nop;nop;nop;");
	}
	return;
}

Thank's 

mswierzy