DSPRelated.com
Forums

Re: DSP/BIOS TSK restart

Started by Andrew Elder June 22, 2011
I would put a
while (1) {
SEM_pend(&some_hwi_sem);
code
}
loop in the task, then

SEM_post(&some_hwi_sem);

from within the HWI.

________________________________
From: xzranger
To: c...
Sent: Wed, June 22, 2011 8:05:31 AM
Subject: [c6x] DSP/BIOS TSK restart

Dear all,
I want to restart my task (run from the very begining of my task) after rcv some
HWI when my task is running.

Which API should I use? Or I have to delete in my HWI ISR and creat the same
task again?
I am new to DSP/BIOS , and I use DM3730 with BIOS V5 under CCS V4.2.

Best regards!
Dear Andrew,
If INTR comes when task is processing(in "code" part), it will premmpt the task, after HWI finish, the task will continue processing.
But I want it run from the very beginning of the task(may be "while(1)" or "SEM_pend(&some_hwi_sem)").
Is it possible?
Best regards!
At 2011-06-22 23:10:30,"Andrew Elder" wrote:
I would put a
while (1) {
SEM_pend(&some_hwi_sem);
code
}
loop in the task, then

SEM_post(&some_hwi_sem);

from within the HWI.
From: xzranger
To:c...
Sent: Wed, June 22, 2011 8:05:31 AM
Subject: [c6x] DSP/BIOS TSK restart
Dear all,
I want to restart my task (run from the very begining of my task) after rcv some HWI when my task is running.

Which API should I use? Or I have to delete in my HWI ISR and creat the same task again?

I am new to DSP/BIOS , and I use DM3730 with BIOS V5 under CCS V4.2.

Best regards!
Ranger-

> If INTR comes when task is processing(in "code" part),
> it will premmpt the task, after HWI finish, the task will
> continue processing.
> But I want it run from the very beginning of the
> task(may be "while(1)" or "SEM_pend(&some_hwi_sem)").
> Is it possible?

It sounds like you have an irregular (non-periodic) interrupt, and when you get one you want to restart your
processing, even if you were already in the middle of it. If that's the case then I might suggest finding a way to
use TSK_create() and TSK_delete(). Here is a thread where they seemed to be doing something similar:

http://e2e.ti.com/support/embedded/f/355/p/49019/181411.aspx

-Jeff

> At 2011-06-22 23:10:30,"Andrew Elder" wrote:
> I would put a
> while (1) {
> SEM_pend(&some_hwi_sem);
> code
> }
> loop in the task, then
>
> SEM_post(&some_hwi_sem);
>
> from within the HWI.
>
> From: xzranger
> To:c...
> Sent: Wed, June 22, 2011 8:05:31 AM
> Subject: [c6x] DSP/BIOS TSK restart
>
> Dear all,
> I want to restart my task (run from the very begining of my task) after rcv some HWI when my task is running.
>
> Which API should I use? Or I have to delete in my HWI ISR and creat the same task again?
>
> I am new to DSP/BIOS , and I use DM3730 with BIOS V5 under CCS V4.2.
>
> Best regards!

_____________________________________
errors on the project of audio codec may help me.
24: error: this declaration has no storage class or type specifier
"audiocodec.c", line 24: error: function call is not allowed in a
constant expression
"audiocodec.c", line 25: error: expected an identifier
"audiocodec.c", line 25: warning: this declaration has no storage
class or type specifier
"audiocodec.c", line 25: error: identifier-list parameters may only be
used in a function definition
"audiocodec.c", line 25: error: declaration is incompatible with "void
DSK6713_AIC23_setFreq(DSK6713_AIC23_CodecHandle, Uint32)" (declared at
line 164 of "dsk6713_aic23.h")
"audiocodec.c", line 27: error: expected a declaration
"audiocodec.c", line 28: error: expected a declaration
"audiocodec.c", line 29: error: expected a declaration
"audiocodec.c", line 30: error: expected a declaration
"audiocodec.c", line 32: warning: this declaration has no storage
class or type specifier
"audiocodec.c", line 32: error: identifier-list parameters may only be
used in a function definition
"audiocodec.c", line 32: error: declaration is incompatible with "void
DSK6713_AIC23_closeCodec(DSK6713_AIC23_CodecHandle)" (declared at line
140 of "dsk6713_aic23.h")
12 errors detected in the compilation of "audiocodec.c".

>> Compilation failure

On 6/25/11, Jeff Brower wrote:
> Ranger-
>
>> If INTR comes when task is processing(in "code" part),
>> it will premmpt the task, after HWI finish, the task will
>> continue processing.
>> But I want it run from the very beginning of the
>> task(may be "while(1)" or "SEM_pend(&some_hwi_sem)").
>> Is it possible?
>
> It sounds like you have an irregular (non-periodic) interrupt, and when you
> get one you want to restart your
> processing, even if you were already in the middle of it. If that's the
> case then I might suggest finding a way to
> use TSK_create() and TSK_delete(). Here is a thread where they seemed to be
> doing something similar:
>
> http://e2e.ti.com/support/embedded/f/355/p/49019/181411.aspx
>
> -Jeff
>
>> At 2011-06-22 23:10:30,"Andrew Elder" wrote:
>> I would put a
>> while (1) {
>> SEM_pend(&some_hwi_sem);
>> code
>> }
>> loop in the task, then
>>
>> SEM_post(&some_hwi_sem);
>>
>> from within the HWI.
>>
>> From: xzranger
>> To:c...
>> Sent: Wed, June 22, 2011 8:05:31 AM
>> Subject: [c6x] DSP/BIOS TSK restart
>>
>> Dear all,
>> I want to restart my task (run from the very begining of my task) after
>> rcv some HWI when my task is running.
>>
>> Which API should I use? Or I have to delete in my HWI ISR and creat the
>> same task again?
>>
>> I am new to DSP/BIOS , and I use DM3730 with BIOS V5 under CCS V4.2.
>>
>> Best regards!

_____________________________________
I would guess your include path(s) are not set up correctly.

________________________________
From: krishnan rani
To: Jeff Brower
Cc: c...; x...@163.com
Sent: Sat, June 25, 2011 1:13:42 AM
Subject: Re: Re: [c6x] DSP/BIOS TSK restart

errors on the project of audio codec may help me.

24: error: this declaration has no storage class or type specifier
"audiocodec.c", line 24: error: function call is not allowed in a
constant expression
"audiocodec.c", line 25: error: expected an identifier
"audiocodec.c", line 25: warning: this declaration has no storage
class or type specifier
"audiocodec.c", line 25: error: identifier-list parameters may only be
used in a function definition
"audiocodec.c", line 25: error: declaration is incompatible with "void
DSK6713_AIC23_setFreq(DSK6713_AIC23_CodecHandle, Uint32)" (declared at
line 164 of "dsk6713_aic23.h")
"audiocodec.c", line 27: error: expected a declaration
"audiocodec.c", line 28: error: expected a declaration
"audiocodec.c", line 29: error: expected a declaration
"audiocodec.c", line 30: error: expected a declaration
"audiocodec.c", line 32: warning: this declaration has no storage
class or type specifier
"audiocodec.c", line 32: error: identifier-list parameters may only be
used in a function definition
"audiocodec.c", line 32: error: declaration is incompatible with "void
DSK6713_AIC23_closeCodec(DSK6713_AIC23_CodecHandle)" (declared at line
140 of "dsk6713_aic23.h")
12 errors detected in the compilation of "audiocodec.c".

>> Compilation failure

On 6/25/11, Jeff Brower wrote:
> Ranger-
>
>> If INTR comes when task is processing(in "code" part),
>> it will premmpt the task, after HWI finish, the task will
>> continue processing.
>> But I want it run from the very beginning of the
>> task(may be "while(1)" or "SEM_pend(&some_hwi_sem)").
>> Is it possible?
>
> It sounds like you have an irregular (non-periodic) interrupt, and when you
> get one you want to restart your
> processing, even if you were already in the middle of it. If that's the
> case then I might suggest finding a way to
> use TSK_create() and TSK_delete(). Here is a thread where they seemed to be
> doing something similar:
>
> http://e2e.ti.com/support/embedded/f/355/p/49019/181411.aspx
>
> -Jeff
>
>> At 2011-06-22 23:10:30,"Andrew Elder" wrote:
>> I would put a
>> while (1) {
>> SEM_pend(&some_hwi_sem);
>> code
>> }
>> loop in the task, then
>>
>> SEM_post(&some_hwi_sem);
>>
>> from within the HWI.
>>
>> From: xzranger
>> To:c...
>> Sent: Wed, June 22, 2011 8:05:31 AM
>> Subject: [c6x] DSP/BIOS TSK restart
>>
>> Dear all,
>> I want to restart my task (run from the very begining of my task) after
>> rcv some HWI when my task is running.
>>
>> Which API should I use? Or I have to delete in my HWI ISR and creat the
>> same task again?
>>
>> I am new to DSP/BIOS , and I use DM3730 with BIOS V5 under CCS V4.2.
>>
>> Best regards!
Krishnan-

> errors on the project of audio codec may help me.

First, can you make an original post and subject-line? Your question has nothing to do with BIOS and task restart.

Second, it seems like your project implodes at line 24 of audiocodec.c, but for some reason you didn't think it was
important to show that line.

Suggest to make your own post, and show lines 22-25 of audiocodec.c.

-Jeff

> 24: error: this declaration has no storage class or type specifier
> "audiocodec.c", line 24: error: function call is not allowed in a
> constant expression
> "audiocodec.c", line 25: error: expected an identifier
> "audiocodec.c", line 25: warning: this declaration has no storage
> class or type specifier
> "audiocodec.c", line 25: error: identifier-list parameters may only be
> used in a function definition
> "audiocodec.c", line 25: error: declaration is incompatible with "void
> DSK6713_AIC23_setFreq(DSK6713_AIC23_CodecHandle, Uint32)" (declared at
> line 164 of "dsk6713_aic23.h")
> "audiocodec.c", line 27: error: expected a declaration
> "audiocodec.c", line 28: error: expected a declaration
> "audiocodec.c", line 29: error: expected a declaration
> "audiocodec.c", line 30: error: expected a declaration
> "audiocodec.c", line 32: warning: this declaration has no storage
> class or type specifier
> "audiocodec.c", line 32: error: identifier-list parameters may only be
> used in a function definition
> "audiocodec.c", line 32: error: declaration is incompatible with "void
> DSK6713_AIC23_closeCodec(DSK6713_AIC23_CodecHandle)" (declared at line
> 140 of "dsk6713_aic23.h")
> 12 errors detected in the compilation of "audiocodec.c".
>
>>> Compilation failure
>
> On 6/25/11, Jeff Brower wrote:
>> Ranger-
>>
>>> If INTR comes when task is processing(in "code" part),
>>> it will premmpt the task, after HWI finish, the task will
>>> continue processing.
>>> But I want it run from the very beginning of the
>>> task(may be "while(1)" or "SEM_pend(&some_hwi_sem)").
>>> Is it possible?
>>
>> It sounds like you have an irregular (non-periodic) interrupt, and when you
>> get one you want to restart your
>> processing, even if you were already in the middle of it. If that's the
>> case then I might suggest finding a way to
>> use TSK_create() and TSK_delete(). Here is a thread where they seemed to be
>> doing something similar:
>>
>> http://e2e.ti.com/support/embedded/f/355/p/49019/181411.aspx
>>
>> -Jeff
>>
>>> At 2011-06-22 23:10:30,"Andrew Elder" wrote:
>>>
>>>
>>> I would put a
>>> while (1) {
>>> SEM_pend(&some_hwi_sem);
>>> code
>>> }
>>> loop in the task, then
>>>
>>> SEM_post(&some_hwi_sem);
>>>
>>> from within the HWI.
>>>
>>>
>>>
>>>
>>>
>>> From: xzranger
>>> To:c...
>>> Sent: Wed, June 22, 2011 8:05:31 AM
>>> Subject: [c6x] DSP/BIOS TSK restart
>>>
>>>
>>>
>>> Dear all,
>>> I want to restart my task (run from the very begining of my task) after
>>> rcv some HWI when my task is running.
>>>
>>> Which API should I use? Or I have to delete in my HWI ISR and creat the
>>> same task again?
>>>
>>> I am new to DSP/BIOS , and I use DM3730 with BIOS V5 under CCS V4.2.
>>>
>>> Best regards!

_____________________________________
rani,

did you remember to include the audiocodec.h file?

can you post the audiocodec.c file, lines 20 through 32?

Are the header, library, and source code files all for the same version of the DSP?

The error messages read like the compiler is thinking the macros are actually
function calls.
The inclusion of the appropriate .h file(s) should correct those compile problems.

R. Williams
---------- Original Message -----------
From: krishnan rani
To: Jeff Brower
Cc: c..., x...@163.com
Sent: Sat, 25 Jun 2011 10:43:42 +0530
Subject: Re: Re: [c6x] DSP/BIOS TSK restart

> errors on the project of audio codec may help me.
>
> 24: error: this declaration has no storage class or type specifier
> "audiocodec.c", line 24: error: function call is not allowed in a
> constant expression
> "audiocodec.c", line 25: error: expected an identifier
> "audiocodec.c", line 25: warning: this declaration has no storage
> class or type specifier
> "audiocodec.c", line 25: error: identifier-list parameters may only be
> used in a function definition
> "audiocodec.c", line 25: error: declaration is incompatible with "void
> DSK6713_AIC23_setFreq(DSK6713_AIC23_CodecHandle, Uint32)" (declared at
> line 164 of "dsk6713_aic23.h")
> "audiocodec.c", line 27: error: expected a declaration
> "audiocodec.c", line 28: error: expected a declaration
> "audiocodec.c", line 29: error: expected a declaration
> "audiocodec.c", line 30: error: expected a declaration
> "audiocodec.c", line 32: warning: this declaration has no storage
> class or type specifier
> "audiocodec.c", line 32: error: identifier-list parameters may only be
> used in a function definition
> "audiocodec.c", line 32: error: declaration is incompatible with "void
> DSK6713_AIC23_closeCodec(DSK6713_AIC23_CodecHandle)" (declared at line
> 140 of "dsk6713_aic23.h")
> 12 errors detected in the compilation of "audiocodec.c".
>
> >> Compilation failure
>


_____________________________________