Sign in

username:

password:



Not a member?

Search c54x



Search tips

Subscribe to c54x



c54x by Keywords

5409 | 5416 | AD5 | ADC | BIOS | Boot | Booting | Bootloader | C540 | C5402 | C5409 | C5416 | CCS | Codec | DMA | Dmad | DSK | DSKPlus | Dsplib | EVM | FFT | FIR | Flash | GPIO | HPI | Initialization | Interrupt | JTAG | LOG_printf | MCBSP | RFFT | RTDX | Sampling | STLM | UART | VC540

Discussion Groups

Discussion Groups | TMS320C54x | How to use sleep ?

Technical discussions about the TI C54x DSPs (including the c5401, c5402, c5402a, c5404, c5407, c5409, c5409a, c5410, c5410a, c5416, c5420, c5421, c5441, c549, c5470 and c5471).

  

Post a new Thread

How to use sleep ? - daya...@yahoo.com - Mar 17 6:11:47 2008



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<dsk5416.h>
#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();
 }

}

------------------------------------

Check Out Industry's First Single-Chip, Multi-Format, Real-Time HD Video Transcoding Solution
for Commercial & Consumer End Equipment: www.ti.com/dm6467



(You need to be a member of c54x -- send a blank email to c54x-subscribe@yahoogroups.com )

Re: How to use sleep ? - Ajith Kutty - Mar 17 18:17:16 2008

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, <d...@yahoo.com> 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<dsk5416.h>
> #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();
> }
> }
>
>  
>



(You need to be a member of c54x -- send a blank email to c54x-subscribe@yahoogroups.com )