stefan_m
Newbie level 1
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
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