DSPRelated.com
Forums

What is the maximum frequency of blinking user_leds of TMS320C6711 starter kit?

Started by smprzemek February 14, 2003
Hello,
I've written similar program to dskblink in C:\ti...folder which is
shown below.

include <stdio.h>
#include <c6x.h>
#include "c6711dsk.h"
unsigned int ledstatus = 0x07000000;
void delay(); /* my function

#define LED1 0x06000000
#define LED2 0x05000000
#define LED3 0x03000000

int main()
{
/* DSP
initialization
*/
CSR=0x100; /* Disable all
interrupts */
IER=1; /* Disable all interrupts
except NMI */
ICR=0xffff; /* Clear all pending
interrupts */

*(unsigned volatile int *)EMIF_GCR = 0x3300; /* EMIF global
control */
*(unsigned volatile int *)EMIF_CE1 = CE1_32; /* EMIF CE1
control, 32bit */
*(unsigned volatile int *)EMIF_SDCTRL = 0x07126000; /* EMIF SDRAM
control */
*(unsigned volatile int *)EMIF_CE0 = 0x30; /* EMIF CE0
control */
*(unsigned volatile int *)EMIF_SDRP = 0x61a; /* EMIF SDRM
refresh period */
*(unsigned volatile int *)EMIF_SDEXT= 0x54529; /* EMIF SDRM
extension */

for (;;) {
ledstatus = ledstatus & LED1;
*(unsigned volatile int *)IO_PORT =ledstatus;
delay(); /* my own function which uses timer0 to cause
delay - I use CPU clock/4 as a internal clock */
ledstatus = ledstatus | ~LED1;
*(unsigned volatile int *)IO_PORT =ledstatus;
delay(); /* my own function which uses timer0 to cause delay-
- I use CPU clock/4 as a internal clock */
*/
}
}
Everything is fine if I work with the lower frequency (below 100 kHz
of blinking LED1).
The maximum frequency of blinking LED1 (I measured using the
laboratory oscilloscope) which I achieved is about 100 kHz (even if I
don't use procedure delay()).
How can I achieve the higher frequencies? Did anybody check this or
experience similar problem?
I would be very glad if somebody could help me to solve this problem.

Regards,
Poul