From: Martin Kozusky <mkozusky@kkmicro.cz>
To: linux-can@vger.kernel.org
Subject: CAN messages being lost on i.MX25 with flexcan
Date: Thu, 19 Apr 2012 12:04:46 +0200 [thread overview]
Message-ID: <jmonvu$nu8$1@dough.gmane.org> (raw)
Hello,
I'm using Voipac i.MX25 module with flexcan, kernel 2.6.38.9.
I'm sending the data at 250kbps, around 1100 msgs/sec. When I enable the
canbus interface (canconfig can0 start), CPU load is higher, that is
understandable, there are many interrupts. I'm not doing anything else
then using recvmsg (or recvmmsg which is little better), but some
messages are still lost (around 1500 messages lost from 467 000 being
send from another source). When I start doing something (like "cat
/proc/interrupts", or write to file), many more messages are lost.
Do you have any idea how to fix this? I need to make some CAN messages
logger and I cannot lose any message (idealy :) So I made big buffer in
my program so that I don't need to write the messages into the file
while "recording" is enabled, after "recording" is switched off, I write
the buffer into the file, but that is still not good enough.
Is there any way how to write to some buffer directly in flexcan driver
(the best would be in the IRQ routine) and then read messages from this
buffer in my program?
Or are just interrupts lost when doing something else in the system and
I cannot fix this? Or can I somehow specify that "can rx interrupts" has
highest prioroty?
Thanks,
Martin
next reply other threads:[~2012-04-19 10:10 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-19 10:04 Martin Kozusky [this message]
2012-04-19 10:54 ` CAN messages being lost on i.MX25 with flexcan Wolfgang Grandegger
2012-04-19 11:21 ` Martin Kozusky
2012-04-19 11:44 ` Wolfgang Grandegger
2012-04-19 11:58 ` Martin Kozusky
2012-04-19 13:37 ` Wolfgang Grandegger
2012-04-20 5:51 ` Martin Kozusky
2012-04-20 6:04 ` Wolfgang Grandegger
2012-04-20 6:17 ` Martin Kozusky
2012-04-20 7:59 ` Wolfgang Grandegger
2012-04-19 20:00 ` Jesper Pedersen
2012-04-19 20:17 ` Wolfgang Grandegger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='jmonvu$nu8$1@dough.gmane.org' \
--to=mkozusky@kkmicro.cz \
--cc=linux-can@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.