DSPRelated.com
Forums

How can I avoid of using Period Function Manager in DSP/BIOS?

Started by smprzemek February 16, 2003
Hello,
I don't have much experience with using DSP/BIOS. I would be very
grateful if somebody could help me to solve the following problem.

I would like to do something like this:

************ ********* ********* ********* ******** *****
*Procedure1* - *Proc.2* *Proc. 3*--*Proc. 1* --*Proc.2*--*etc*
************ ******** ********* ********* ******** ***** I wouldn't like to use PeriodFunc object (in continuous mode) which
can be defined in DSP/BIOS which can start Procedure 1 because this
function can break my procedure 1, 2 or 3 during the calculation.
Also I can't set too long time which can be defined in PeriodFunc
because between Procedure n and Procedure n+1 can't be any delay.
I'm going to use the example program for THS1206evm device (AD
converter) which is shown below.

/* PeriodFunc is called every milisecond by DSP/BIOS
and posts a StartConversion SWI to start a new conversion

void main(void)
{
................................................ /*few settings */
TIMER_Start(hTimer);
}

void BlockReady1206(void *pDC)
{
SWI_post(&SwiDoCalculation);
}

void StartConversionFunc()
{
dc_rblock(&Ths1206_1, ad_buffer, BLOCK_SZ, &BlockReady1206);
}

void DoCalculationFunc()
{
............................................
}

void PeriodFunc()
{
SWI_post(&SwiStartConversion);
}
What should I change in above program? How can I avoid using
PeriodFunc object in continuous mode (I know that I can change
setting of PeriodFunc into shot mode but I would like to call
Procedure 1 when Procedure 3 is finished)?
I tried to set one shot mode (settings of Period Func) and use
SWI_post(&BlockReady1206)- in the procedure void DoCalculationFunc()
in above program but without any success.
Can anybody correct me?

Thanks in advance,
Poul