DSPRelated.com
Forums

Halting the DSP

Started by an na February 17, 2005

hi All,
Is there any mechanism to Halt the Dsp programatically? i mean can i halt the dsp through my test program ?

regards
Anoop



Yes. There is the IDLE instruction, which effectively halts the CPU until it
receives an
interrupt (see SPRU189f.pdf, the C6000 CPU and Instruction guide). I suppose
if you
really want it to stop dead, you'd also want to disable interrupts through
the GIE bit.
before you call IDLE...

I know that this is what you asked for, but are you sure this is what you
<want>?

George

----- Original Message -----
From: "an na" <>
To: <>
Sent: Thursday, February 17, 2005 4:28 AM
Subject: [c6x] Halting the DSP >
>
> hi All,
> Is there any mechanism to Halt the Dsp programatically? i mean
can i halt the dsp through my test program ?
>
> regards
> Anoop





Hi George,
Thanks for ur reply. I am kinda confused. What i want to do is to Halt the Processor and then bring it back to bootable state. Yes i had seen the IDLE instruction but wasnt sure whether its the correct way of halting the processor. Can u plz elaborate?

regards
Anoop >
>Yes. There is the IDLE instruction, which effectively halts the CPU until it
>receives an
>interrupt (see SPRU189f.pdf, the C6000 CPU and Instruction guide). I suppose
>if you
>really want it to stop dead, you'd also want to disable interrupts through
>the GIE bit.
>before you call IDLE...
>
>I know that this is what you asked for, but are you sure this is what you
><want>?
>
>George
>
>----- Original Message -----
>From: "an na" <>
>To: <>
>Sent: Thursday, February 17, 2005 4:28 AM
>Subject: [c6x] Halting the DSP >>
>>
>> hi All,
>> Is there any mechanism to Halt the Dsp programatically? i mean
>can i halt the dsp through my test program ?
>>
>> regards
>> Anoop
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>




Hi Anoop,

this sound more like a SW reset. We discussed this some time ago. AFAIR
you must write default values to all used peripherals and jump to
address 0h. Of course you should block all IRQ via GIE before

Idle would be ok if there is nothing to be done and you want to save
energy.

HTH

Gustl wrote:

>
> Hi George, Thanks for ur reply. I am kinda confused. What i want to
> do is to Halt the Processor and then bring it back to bootable state.
> Yes i had seen the IDLE instruction but wasnt sure whether its the
> correct way of halting the processor. Can u plz elaborate?
>
> regards Anoop >
>>
>>
>>
>>
>> Yes. There is the IDLE instruction, which effectively halts the CPU
>> until it receives an interrupt (see SPRU189f.pdf, the C6000 CPU and
>> Instruction guide). I suppose if you really want it to stop dead,
>> you'd also want to disable interrupts through the GIE bit. before
>> you call IDLE...
>>
>> I know that this is what you asked for, but are you sure this is
>> what you <want>?
>>
>> George
>>
>> ----- Original Message ----- From: "an na" <> To: <> Sent:
>> Thursday, February 17, 2005 4:28 AM Subject: [c6x] Halting the DSP
>>
>>
>>
>>
>>>
>>>
>>> hi All, Is there any mechanism to Halt the Dsp programatically? i
>>> mean
>>
>> can i halt the dsp through my test program ?
>>
>>>
>>> regards Anoop
>>>




Hi Anoop, Bernhard:

From what you said Anoop, what Bernhard is saying <is> probably
what you want to do, i.e., a SW Reset. The CSL functions can easily
be used to insure that the processor is in fact brought back to the
default conditions at reset, and by jumping to 0x00000000, you're
back at the starting gate.

That said, there is a legitimate reason for using the IDLE instruction. I've
seen a third party RTOS's source code where they use it post-initialization.
(Can't go into it, because I'm not at liberty to discuss). The RTOS's task
scheduler kicks off the first task on it's task list via the TIMER interrupt
(Remember, IDLE effectively Halts the CPU <until> an interrupt is
received), thus the CPU is then no longer sitting there in a halted state.
No, this wasn't DSP-BIOS, but I'd guess that they probably do what I
just mentioned.

OK, so what does this all mean? It means that the C6000 processor
family is like a "Swiss Army Knife" of DSP procs. There is a large palette
of instructions and functions, etc., that you can use and/or abuse. <You>
need to decide what it is that is required to do - that drives the coding.
You can do a lot of things with the C6000 - the question is what do you
really need to do.

HTH,
George Wicks ----- Original Message -----
From: "Bernhard 'Gustl' Bauer" <>
To: <>
Cc: <>
Sent: Friday, February 18, 2005 7:39 AM
Subject: Re: [c6x] Re: Halting the DSP >
>
> Hi Anoop,
>
> this sound more like a SW reset. We discussed this some time ago. AFAIR
> you must write default values to all used peripherals and jump to
> address 0h. Of course you should block all IRQ via GIE before
>
> Idle would be ok if there is nothing to be done and you want to save
> energy.
>
> HTH
>
> Gustl > wrote:
>
> >
> > Hi George, Thanks for ur reply. I am kinda confused. What i want to
> > do is to Halt the Processor and then bring it back to bootable state.
> > Yes i had seen the IDLE instruction but wasnt sure whether its the
> > correct way of halting the processor. Can u plz elaborate?
> >
> > regards Anoop
> >
> >
> >
> >>
> >>
> >>
> >>
> >> Yes. There is the IDLE instruction, which effectively halts the CPU
> >> until it receives an interrupt (see SPRU189f.pdf, the C6000 CPU and
> >> Instruction guide). I suppose if you really want it to stop dead,
> >> you'd also want to disable interrupts through the GIE bit. before
> >> you call IDLE...
> >>
> >> I know that this is what you asked for, but are you sure this is
> >> what you <want>?
> >>
> >> George
> >>
> >> ----- Original Message ----- From: "an na" <> To: <> Sent:
> >> Thursday, February 17, 2005 4:28 AM Subject: [c6x] Halting the DSP
> >>
> >>
> >>
> >>
> >>>
> >>>
> >>> hi All, Is there any mechanism to Halt the Dsp programatically? i
> >>> mean
> >>
> >> can i halt the dsp through my test program ?
> >>
> >>>
> >>> regards Anoop
> >>





Hi,

I'm interested in SW resetting the DSP. At the moment my procedure is
less than perfect. Do you have the code needed to reset every
peripherial in a DM642? Or perhaps the link to the related discussion
in this ML?
Thank you.

--
Best regards, Reply to:
Marco Braga
Insignis Technologies




Hi Marco:

Well, that's a tall order, and I don't have what you're looking
for (although it may have been answered before in this group -
check to see). Two suggestions:

(1). Go through your CSL documentation and find out what calls
you need to make to reset all of the peripheral registers, etc.,
back to the default, then jump to 0x00000000.

(2). The other idea, and it's really probably the most ideal if you
can do this, is to talk with your HW designer and see about adding
a RESET bit to your FPGA or PLD, where if you set it, it outputs
an active low RESET to your DM642 - I <believe> (although I
can be wrong), all of C6000 chips have an active low RESET. That
way, you're actually guaranteed to have your register set back to
the default. You've probably already thought of this, but can't have
that done because of where you're at in the design cycle, but I
thought I'd mention it anyways.

Well, hope it helps,
George
----- Original Message -----
From: "Marco Braga" <>
To: "George Wicks" <>
Cc: <>
Sent: Friday, February 18, 2005 11:22 AM
Subject: Software reset > Hi,
>
> I'm interested in SW resetting the DSP. At the moment my procedure is
> less than perfect. Do you have the code needed to reset every
> peripherial in a DM642? Or perhaps the link to the related discussion
> in this ML?
> Thank you.
>
> --
> Best regards, Reply to:
> Marco Braga
> Insignis Technologies
>



Hey folks, I think that you all have covered the bases, but I will chime in anyway with my opinions.
 
1.  there is no functional reason to halt [or try to halt] a c6000 DSP.
2.  you can execute an idle instruction, but if you do you better have a guaranteed interrupt or you will stay in idle indefinitely.  If you are doing this for some form of error recovery, it would be foolish to count on the DSP timer.
3.  if you have "gone into the weeds" and executed "garbage", I suggest a hardware reset [an external $1-2 [US] micro can be a watchdog].  All of the c6000s that I have worked with do not seem to have a protected instruction set [if you execute an undefined instruction, the processor "does something" and does not generate a trap or interrupt].
4.  if you look at the possible reasons for a 'reset' [hard or soft] - software problem, external memory problem, external EMI, power glitch, etc. it does not appear reasonable to trust the recovery to "a piece of code".  The only thing from the above list that a 'reset function' can recover from is a software problem [as long as it does not clobber the timer/trigger/I_need_to_reset_indicator or the reset function].
5.  I also realize that people may be using their DSP in an environment that I have not considered and these suggestions may not be appropriate.
 
Of course, if we all add bullet proof hardware and software, we would not be thinking about reset after power up.
 
mikedunn

George Wicks <g...@sbcglobal.net> wrote:

Hi Anoop, Bernhard:

From what you said Anoop, what Bernhard is saying probably
what you want to do, i.e., a SW Reset. The CSL functions can easily
be used to insure that the processor is in fact brought back to the
default conditions at reset, and by jumping to 0x00000000, you're
back at the starting gate.

That said, there is a legitimate reason for using the IDLE instruction. I've
seen a third party RTOS's source code where they use it post-initialization.
(Can't go into it, because I'm not at liberty to discuss). The RTOS's task
scheduler kicks off the first task on it's task list via the TIMER interrupt
(Remember, IDLE effectively Halts the CPU an interrupt is
received), thus the CPU is then no longer sitting there in a halted state.
No, this wasn't DSP-BIOS, but I'd guess that they probably do what I
just mentioned.

OK, so what does this all mean? It means that the C6000 processor
family is like a "Swiss Army Knife" of DSP procs. There is a large palette
of instructions and functions, etc., that you can use and/or abuse.
need to decide what it is that is required to do - that drives the coding.
You can do a lot of things with the C6000 - the question is what do you
really need to do.

HTH,
George Wicks----- Original Message -----
From: "Bernhard 'Gustl' Bauer"
To:
Cc:
Sent: Friday, February 18, 2005 7:39 AM
Subject: Re: [c6x] Re: Halting the DSP>
>
> Hi Anoop,
>
> this sound more like a SW reset. We discussed this some time ago. AFAIR
> you must write default values to all used peripherals and jump to
> address 0h. Of course you should block all IRQ via GIE before
>
> Idle would be ok if there is nothing to be done and you want to save
> energy.
>
> HTH
>
> Gustl> v...@yahoo.com wrote:
>
> >
> > Hi George, Thanks for ur reply. I am kinda confused. What i want to
> > do is to Halt the Processor and then bring it back to bootable state.
> > Yes i had seen the IDLE instruction but wasnt sure whether its the
> > correct way of halting the processor. Can u plz elaborate?
> >
> > regards Anoop
> >
> >
> >
> >>
> >>
> >>
> >>
> >> Yes. There is the IDLE instruction, which effectively halts the CPU
> >> until it receives an interrupt (see SPRU189f.pdf, the C6000 CPU and
> >> Instruction guide). I suppose if you really want it to stop dead,
> >> you'd also want to disable interrupts through the GIE bit. before
> >> you call IDLE...
> >>
> >> I know that this is what you asked for, but are you sure this is
> >> what you ?
> >>
> >> George
> >>
> >> ----- Original Message ----- From: "an na" <> To: <> Sent:
> >> Thursday, February 17, 2005 4:28 AM Subject: [c6x] Halting the DSP
> >>
> >>
> >>
> >>
> >>>
> >>>
> >>> hi All, Is there any mechanism to Halt the Dsp programatically? i
> >>> mean
> >>
> >> can i halt the dsp through my test program ?
> >>
> >>>
> >>> regards Anoop
> >>

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/c6x/

<*> To unsubscribe from this group, send an email to:
c...@yahoogroups.com

<*



Mike-

> 1. there is no functional reason to halt [or try to halt] a c6000 DSP.

Is reducing power consumption a valid reason to make frequent use of IDLE/interrupt
combination?
.
.
.

> Of course, if we all add bullet proof hardware and software, we would
> not be thinking about reset after power up.

There is always the cosmic ray with the name of your product on it :-) I know that's
truly nanoscopic writing not yet developed by mankind, but it's there.

-Jeff



Mike-

> 1. there is no functional reason to halt [or try to halt] a c6000 DSP.

Is reducing power consumption a valid reason to make frequent use of IDLE/interrupt
combination?
.
.
.

> Of course, if we all add bullet proof hardware and software, we would
> not be thinking about reset after power up.

There is always the cosmic ray with the name of your product on it :-) I know that's
truly microscopic writing not yet developed by mankind, but it's there.

-Jeff