Single shot mode with arbitration support

"John Dammyer" <[email protected]>
Newsgroups gmane.comp.hardware.bus.can
Message-ID <[email protected]>
Hi everyone,

I've been trying to find a CAN transceiver that can handle what is popularly
called single shot mode.  This feature was added to support TTCAN where even
a retransmit after arbitration failure is considered unacceptable.

Here's the issue.  The MilCAN specification has a SYNC MASTER sending out a
SYNC message with a two byte SYNC COUNTER value at 64Hz.  That's every
15.625mS and the bus speed is 250kbps.  With a worst case of about 135 bits
that means a message doesn't take up more time than about 0.55mS.  There's
room for about 27 messages back to back between SYNC messages.

The problem is MilCAN doesn't allow error flags since a bad message retrying
could easily overlap into the next SYNC message window.  The architecture of
a MilCAN system is such that the designer plans what messages occur during
each SYNC slot.  A node may broadcast only when the SYNC COUNTER was 24.
Another only when 32 and so on.   

As in other types of time triggered protocols, not only can a node be
assigned to a single slot, it can also be assigned to a slot masked by a
value.  So every 8 slots means the SYNC COUNTER is masked with 0x0007 and if
the result is 0 then send so now it sends on ox0000, 0x0008, 0x0010...
There's also another parameter which is an offset from that masked value.
After the mask operation the offset is added and if the SYNC COUNTER matches
then send.  Say it's 3.  Now the node sends on 0x0003, 0x000B, 0x0013...  

Theoretically we can now have 8 nodes each transmitting every 8 SYNC
COUNTERS  or every 0.125 seconds.  It's when we need more than one message
in a SYNC SLOT that issues creep in.  Allow two nodes to send right after
SYNC COUNTER 0x0010 for example and they will arbitrate and one wins while
the other listens.  Then the second one sends.  This is as it should be.  If
there aren't any errors.

Many of the new CAN devices have a One Shot Mode.  They can be made to not
send an error flag and interrupt the processor if it happens.  Unfortunately
they also don't do arbitration which defeats the whole bitwise part of the
CAN specification.  Instead they also stop trying if they fail arbitration.

Here's the scenario.  You wait for SYNC message #0x100 as are 2 other units.
You start to send and lose arbitration so you stop sending.  Your processor
gets an interrupt and you try and resend.  Other unit that failed does the
same.  Once again one of you loses arbitration and stops. Once again
processor intervention is required and finally you get to try.

The problem is now the time between messages gets longer.  Perhaps with
asynchronous messages also occurring you could step on the point in time
where the next SYNC Message is sent.

What I really want is a CAN device that can do arbitration but in effect
operates almost like error passive mode, won't do error flags and won't
retry if there is an error but will retry if it fails arbitration.

For anyone doing MilCAN how are you handing this issue?

Thanks
John Dammeyer



"ELS! The Solution"
Automation Artisans Inc.
http://www.autoartisans.com/ELS/
Ph. 1 250 544 4950




--
Archives and useful links: http://groups.yahoo.com/group/CANbus
Subscribe and unsubscribe at www.vector.com/canlist/
Report any problems to <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.