« Return to Thread: Question about MILCAN

RE: Question about MILCAN

by John Dammeyer :: Rate this Message:

Reply to Author | View in Thread

Hi,

It's been more than two years since I looked at the MilCAN spec so I
don't know if I can answer your questions completely.
Comments below.

> Subject: [CANLIST] Question about MILCAN
>
>
> Hello everyone,
> I am learning milcan protocol and new on milcan now ,and the posts
> here were helpful, but I still have some questions about milcan,
> could you please help me ,thank you evry much!
>
> 1. I have to choose  processor to realize the protocol , somes posts
> (maybe John Dammeyer,who's post about milcan are of lot help to me)
> said that MC9S12DG256  would work nicely ,so I  read the datasheet
> of MC9S12DG256 ,but have not found how to  stop automatic
> retransmission of a failed CAN message(sofware or hardware),First no
> Register bit can found to realize the function. second the processor
> allow to abort the message but  there is no interrupt vectors when
> CAN message tran failed. Does somebody know how MC9S12DG256 realize
> the function ,or any other processors  are suit whith milcan
> protocol ?

Our client chose the 9S12 even though we did point out that it would not
be able to disable retries.  Some of the newer CAN devices do allow a
single shot mode.  If you use the Inicore FPGA you can do this.


>
> 2. The spec of MilCAN A Application Layer Page 7 said that "Messages
> assigned SRT1 priority will be transmitted using bus capacity not
> consumed by HRT0, HRT1, HRT2 & HRT3 messages during an 8 x PTU
> period beginning with the Sync frame message in which this SRT1
> message is triggered".Does it means that I should  keep track of the
> time of erery  message after them triggered ,sothat I can know which
> message is expired? but also in the spec Page 8,"a fixed amount of
> time equal to the worst case response time to Sync Frame must be
> reserved in each PTU to ensure that all messages allocated to a
> particular slot can be transmitted in that slot.",any message is
> triggered in the particular PTU,does "that all messages "include
> SRT1 message triggered in that slot ?and John Dammeyer in his posts
> said "if a SyncFrame arrives and you still have a pending message
> it's best to cancel all pending messages" now I am confused whith
> alive time of the message.

The way I interpret the spec here, (and I may be wrong), is that you
have to set up your network so that each PTU can never have more
messages than are possible within a PTU.  So what happens if an async
message is placed onto the bus winning arbitration over the lower
synchronous priority messages?  It means all lower priority messages are
delayed by this message and you may no longer have enough time to
transmit them all.

If your design has too many messages in one PTU to allow for an async
event then the higher priority SYNC Frame will show up in each node
before it's finished transmitting whatever number of messages that are
queued.  My decision here was to then cancel all outstanding messages
queued when a SYNC Frame arrived.  

Internally inside the application each queued message can have a SYNC
Flag value with the message information.  Let your Rx interrupt routine
that sees a SYNC Frame remove all messages from the Tx Queue that are
lower in value than the current SYNC Flag.  There is still a possible
race condition here BTW.  A previous queued message from the previous
PTU may sneak in after the SYNC Frame is being analyzed.
>
>
> 3.I have read some material from www.milcan.org,and  was not very
> clear about the relation  between Latency and Cycle-Time,Does the
> shorter of the message's maximum latency means the shorter of the
> Cycle-time?   and the spec of MILCAN also said "asynchronous devices
> shall be restricted to the transmission of messages of priority 2 or
> lower" but if I have a asynchronous message ,it's required latency
> is very short,called Emergency Message,then what should I do?

Without spending some time rereading the spec.  I can't off the top of
my head help you with this question.

John Dammeyer

>
> I am a student interested in milcan,and English is not my mother
> tongue,  I am sorry if this seems like a newbie question,and I am
> eager to your reply,thanks!
>
> --
> Archives and useful links: http://groups.yahoo.com/group/CANbus
> Subscribe and unsubscribe at www.vector-informatik.com/canlist/
> Report any problems to <canlist-owner@...>
>
>

--
Archives and useful links: http://groups.yahoo.com/group/CANbus
Subscribe and unsubscribe at www.vector-informatik.com/canlist/
Report any problems to <canlist-owner@...>

 « Return to Thread: Question about MILCAN

LightInTheBox - Buy quality products at wholesale price!