Reply by Ajith Kutty March 17, 20082008-03-17
Hi,
Before you go to sleep, you should think how you are going to wake up.
You probably need an interrupt for this and need to know when to wake up and
how you are going do it.

If I remember correctly using IDLE instruction should put the DSP into
sleep. Some other register configuration decides which all modules will be
in sleep while IDLE instruction is executed.
Best Regards,
Ajith.

On Mon, Mar 17, 2008 at 2:34 PM, wrote:

> Hi,
>
> Anyone know how to use sleep in CCS 3.1 using dsk 5416 ? The below program
> already works. I want to change the delay by using the sleep. I had tried to
> change the delay to sleep, but got error. Thanks.
>
> #include
> #define GPIOCR (*(volatile unsigned int*)(0x3C))
> #define GPIOCR_ADDR 0x3C
> #define GPIOSR (*(volatile unsigned int*)(0x3D))
> #define GPIOSR_ADDR 0x3D
>
> void delay(void)
> {
> long i, j=0;
> for(i=0;i<10000000;i++)
> {
> j++;
> }
>
> }
>
> void main()
> {
>
> GPIOCR=0xff;
>
> while(1)
> {
> GPIOSR=0x08;
> delay();
> GPIOSR=0x04;
> delay();
> GPIOSR=0x02;
> delay();
> GPIOSR=0x01;
> delay();
> }
> }
>
>
>
Reply by daya...@yahoo.com March 17, 20082008-03-17
Hi,

Anyone know how to use sleep in CCS 3.1 using dsk 5416 ? The below program already works. I want to change the delay by using the sleep. I had tried to change the delay to sleep, but got error. Thanks.

#include
#define GPIOCR (*(volatile unsigned int*)(0x3C))
#define GPIOCR_ADDR 0x3C
#define GPIOSR (*(volatile unsigned int*)(0x3D))
#define GPIOSR_ADDR 0x3D
void delay(void)
{
long i, j=0;
for(i=0;i<10000000;i++)
{
j++;
}

}

void main()
{

GPIOCR=0xff;

while(1)
{
GPIOSR=0x08;
delay();
GPIOSR=0x04;
delay();
GPIOSR=0x02;
delay();
GPIOSR=0x01;
delay();
}

}