CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

CANBus in Time-TriggeredCAN mode

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
MikeW



Joined: 15 Sep 2003
Posts: 184
Location: Warrington UK

View user's profile Send private message

CANBus in Time-TriggeredCAN mode
PostPosted: Sat Jan 19, 2013 3:18 am     Reply with quote

I posted this on the useless microchip forum, but go to replies.

Are there any CANBus guru's who know the answer to this

I am planning to use a PIC24 for a time triggered CAN application.

having read several datasheets, it becomes apparent that to have TTCan, the transmitter must not retry in the event of a failure.
Holt Integrated circuits call it "anti babble mode" or


"One-Shot Mode Enable.
OSMis intended to be usedONLYwith theTX1M bit. IfOSMis enabled andTX1M is set, the
controller transmits only once and does not attempt re-transmission upon loss of arbitration or
error. This feature is necessary to support the implementation of fixed time slots in the
Time-TriggeredCANstandard (TTCAN)."


This seems to be implemented in the MCP2515 as

"3.4 One-Shot Mode
One-Shot mode ensures that a message will only
attempt to transmit one time. Normally, if a CAN
message loses arbitration, or is destroyed by an error
frame, the message is retransmitted. With One-Shot
mode enabled, a message will only attempt to transmit
one time, regardless of arbitration loss or error frame.
One-Shot mode is required to maintain time slots in
deterministic systems, such as TTCAN. "

This feature seems to be missing in the CAN and ECAN modules inside PIC's, or am I wrong
Ttelmah



Joined: 11 Mar 2010
Posts: 19359

View user's profile Send private message

PostPosted: Sat Jan 19, 2013 5:52 am     Reply with quote

Not a CAN person myself, but of the programmers I worked with did this. If I remember correctly he used the IRXIF bit and set the bus to receive only mode when this occurred.

Best Wishes
MikeW



Joined: 15 Sep 2003
Posts: 184
Location: Warrington UK

View user's profile Send private message

PostPosted: Sat Jan 19, 2013 11:04 am     Reply with quote

@Ttelmah,

could you re-check with your software guys and confirm this.

I will get fired if I make the wrong decision.

but why oh why did microchip not include this mode ( rhetorical question)

Mike
Ttelmah



Joined: 11 Mar 2010
Posts: 19359

View user's profile Send private message

PostPosted: Sat Jan 19, 2013 2:08 pm     Reply with quote

Apologies, no, they were with a company I no longer deal with. It was just a 'memory' from a project where this was needed.

Best Wishes
newguy



Joined: 24 Jun 2004
Posts: 1903

View user's profile Send private message

PostPosted: Mon Jan 21, 2013 11:15 am     Reply with quote

Workaround would be to monitor the number of transmit errors. If nonzero, blow all outbound CAN buffers.

Sorry I can't be more helpful - I've never enabled or worked with the so-called one shot mode.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group