Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Receiving CAN messages with TouCAN

Status
Not open for further replies.

stefan_m

Newbie level 1
Newbie level 1
Joined
Jun 29, 2006
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,295
Hi,

I've got the following problem: I want to receive CAN messages, but without
any interrupts. The CAN messages should be fetched by the application through
polling. The reason why I can't use interrupts is, the application is an environment
in which each task has strict deadlines, that must not be missed. Interrupts for
handling received messages in such application, would cause fatal deadline misses
in phases where the CAN bus is at high load. So I have to check the message buffers
at defined times.
I'm using a MPC555 with TouCAN controller, which has 16 message buffers. By the description
of the controller, it should be possible to set several message buffers to read mode. If
a message arrives it sould be placed in one of the empty buffers until all buffers are filled.
So I can read out the filled buffers and thereby I minimize the chance of missing messages.
I've tried this out, but when I set some buffers (e.g. 4) into read mode (each has the bit mask
0x000000 and should listen for every can message, cause I do not really know which messages will
arrive), the can controller fills the first buffer only. If two or more messages arrive within the
time between two polls the message buffer tells me that an overrun occured, and i missed at least one
CAN message.

Does anyone has experience with (lossless) receiving CAN messages without using interrupts?


Thanks in advance,
Stefan
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top