Receiving CAN messages with TouCAN

Stefan Metzlaff <[email protected]>
Newsgroups gmane.comp.hardware.motorola.microcontrollers
Message-ID <[email protected]>
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




-----------------------------------------------------------
To learn more about Freescale Microcontrollers, please visit
http://www.freescale.com/mcu


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/MPC500/

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.