Unfortunately the duration is too critical (I have to get a 25mS of high signal and 25mS of low signal before I can transmit) with less than 2% variation.

I tried to eliminate the Int32 problem which SysTaskDelay takes, and I put a dumb loop instead (just to check):

if (blnBreak) {

error = SrmControl(gPortID, srmCtlStartBreak, 0,&flagsSize);

//Temporarily
while (timeSecond < 1) {
while (timeStamp < 9750) {
timeStamp++;
}
timeSecond++;
}

//SysTaskDelay(25*SysTicksPerSecond()/1000);

error = SrmControl(gPortID, srmCtlStopBreak, 0,&flagsSize);

timeSecond=0;
timeStamp = 0;

//Temporarily
while (timeSecond < 1) {
while (timeStamp < 10050) {
timeStamp++;
}
timeSecond++;
}
//SysTaskDelay(27*SysTicksPerSecond()/1000);

}


It gets a tiny low signal (almost a bit time) in the midle of high signal (3ms before high signal goes down).

The problem persists. Do You think a 25mS high break signal is too short to srmCtlStopBreak?

I'm using Palm Vx (dragonball 20MHz) which returns SysTicksPerSecond() = 100, so the math 30*100/1000 = 3 Ticks or 30mS?

[]

Dave Lippincott writes:

Here's one possible problem:
> SysTaskDelay(30*SysTicksPerSecond()/1000);
on most SysTicksPerSecond = 60
SysTaskDelay takes an Int32
Thus 30*60/1000 = 1 not 1.8 or 2 so your delay will always be too short.
If your break signal duration is not critical, try normalizing the value you
pass to SysTaskDelay to the next whole integer value.


----- Original Message ----- From: "Alessandro Zummo" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Friday, September 19, 2003 9:15 AM
Subject: Re: Using Break Signal - Serial Manager



On Fri, 19 Sep 2003 08:41:28 -0300
[EMAIL PROTECTED] wrote:


> I'm using the srmControl with srmCtlStartBreak and srmCtlStopBreak,
> unfortunately, I didn't get a consistent break signal with it.
>
> Here is my code :
>
> if (blnBreak) {
>
> error = SrmControl(gPortID, srmCtlStartBreak, 0,&flagsSize);
>
> SysTaskDelay(30*SysTicksPerSecond()/1000);
>
> error = SrmControl(gPortID, srmCtlStopBreak, 0,&flagsSize);
>
> }



We had problems on the m125. Check the value your are passing to
SysTaskDelay()
and maybe increase it a little bit.

Which Palm(s) are you targeting?

--

Best regards,

Alessandro Zummo,
Tower Technologies - Turin, Italy


http://www.towertech.it

--
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/



--
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/

Reply via email to