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 CCS Technical Support

CAN-Communication disturbed when Controller gets warm/hot

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



Joined: 25 Apr 2006
Posts: 31
Location: Germany

View user's profile Send private message

CAN-Communication disturbed when Controller gets warm/hot
PostPosted: Mon Jul 09, 2012 11:35 pm     Reply with quote

Hi,

I have a project where 2 Motors for blinds have to be synchronized. They both works with a PIC18F46k80 with internal oscillator (16Mhz) and the motors (speeds) are controlled by PWM. For synchronization there are some datas which are permanently transfered over CAN (16Bytes in 2 ID-Frames (2x8Bytes)) with 200.000 Baud. The transmitting of the data is monitored with timers so the master sends an ID-Frame every 15ms and wants to get an answer from the slave within 10ms. When an error occurs or the answer was not get within the 10ms the transmitting will be repeated up to 2 times. The slave goes in error when it don't gets a new frame within 45ms. If there are 3 transmitting errors the communication and the motors stops and the motors will signalize an error.

Now I have the problem when the controller gets warm/hot the communication is disturbed and stops. In the moment I don't know if the controller (kernel) stops the communication or if transmitting error happens (I have to do some further tests) but I know that it comes from the controller (first searched with hot air, then with solder pen directly to the controller).

Has anybody an idea where I can search for the problem?
RF_Developer



Joined: 07 Feb 2011
Posts: 839

View user's profile Send private message

Re: CAN-Communication disturbed when Controller gets warm/ho
PostPosted: Tue Jul 10, 2012 1:57 am     Reply with quote

RHA wrote:
with internal oscillator (16Mhz)


The internal oscillator isn't very stable over temperature. It doesn't even meet RS232 specs over the full temp range. People use it a lot because its there and it's "free", but for many applications, and any that use communications you really should use an external crystal or oscillator.

RF Developer
RHA



Joined: 25 Apr 2006
Posts: 31
Location: Germany

View user's profile Send private message

PostPosted: Tue Jul 10, 2012 6:45 am     Reply with quote

Thanks for the hint. I will make a try with an external oscillator within the next days.
Ttelmah



Joined: 11 Mar 2010
Posts: 19539

View user's profile Send private message

PostPosted: Tue Jul 10, 2012 7:26 am     Reply with quote

How much timing error CAN bus can 'handle', depends on the settings you choose. The formula is:

Minimum(Phase_seg1, Phase_seg2)/(2*(13*NBT-Phase_seg2))

So with (say) a nominal bit time of 8 (sum of all the segments), and Phase_seg1=1, Phase_seg2=2, you get:

1/2*(13*8-2) = 0.0049

0.49%.

The internal oscillator gives +/-2% - factor of four too large.....

The data sheet does cover this in paragraph 27.12:

"As a rule of thumb, the bit timing requirements allow
ceramic resonators to be used in applications with
transmission rates of up to 125 Kbit/sec. For the full bus
speed range of the CAN protocol, a quartz oscillator is
required. Refer to ISO11898-1 for oscillator tolerance
requirements."

So, for lower rates, a ceramic resonator may be 'good enough', but for higher rates, a crystal is required. Not even the faintest 'suggestion' of trying to run this bus off the internal RC.....

Best Wishes
RHA



Joined: 25 Apr 2006
Posts: 31
Location: Germany

View user's profile Send private message

PostPosted: Tue Aug 14, 2012 7:22 am     Reply with quote

A late reply is better than no reply:

It was the oscillator. With an external crystal everything works fine.
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