On 10/11/2010 05:01 PM, "Müller, René" wrote:
> Hello,
> 
> we are loosing frames on our embedded target and currently we are searching 
> for the cause.
> 
> Our current setup is:
> - TQM5200 (a board made by TQ with an MPC5200B) on our own carrier-board
> - Kernel 2.6.35.7 from kernel.org (we initial used 2.6.27.18 from denx and 
> had the same problems)
> - activated mscan in kernel-config
> 
> - 2x CAN-sources connected to the 2 can interfaces of the board:
>   - first source (connected to can0):
>     - creates an message containing a counter every 5ms
>     - creates another message containing another counter every 2ms
>   - second source (connected to can1):
>     - creates 3 messages every 20ms containing some payload
> 
> - both can interfaces are configured with 1Mbit/s
> 
> Now we have two cases, one with missing frames and one without:
> Case 1:
>  - candump -l -s2 can0 -> logging in an file which is stored in RAM
>  - we get all messages in the logfile
> 
> Case 2:
>  - candump -l -s2 can0 -> logging in an file which is stored on an 
> CompactFlash-card
>  - the CF-card is connected via the IDE-interface without DMA (we don't get 
> DMA working with the CF-card, unfortunately it only works with harddrives)
>  - we are loosing messages:
>    - every 35s we are missing messages in blocks, never we are missing 1 
> message, always 5-6 at once
> 
> Anyone had similar problems? Any hints?

Sounds like a receive buffer overrun when the application is not able to
read messages fast enough. You could use setsockopt(... ,SOL_SOCKET,
SO_RCVBUF, ....) to increase the buffer size. It's also possible to
detect dropped CAN frames as described here:

http://www.mail-archive.com/[email protected]/msg00861.html

Wolfgang.
_______________________________________________
Socketcan-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/socketcan-users

Reply via email to