[ECOS] Re: DSR Scheduling Problem

Uwe Kindler uwe.kindler@cetoni.de
Mon Feb 13 14:51:00 GMT 2006


Hello,

I followed the "DSR scheduling problem" thread with little interest - 
till now. In the last days I improved the eCos CAN driver for FlexCAN 
module of Motorola Coldfire processors and run into trouble with DSR 
scheduling.

The FlexCAN module contains 16 message buffers for reception of CAN 
messages. Each buffer got its own interrupt vector. There is always only 
one message buffer active. That means, if a CAN message arrives, the 
message buffer that received this message will be locked immediatelly 
and the next message buffer will be enabled. So it is possible to read 
data from one buffer while listening for the next message with another 
buffer. In some situations there are bursts of CAN messages on the CAN 
bus - that is absolutely normal and does not mean that bus load is to high.

When a ISR of a message buffer is called, then the next message buffer 
will be enabled by this ISR. Disabling the active buffer and enabling 
the next one is quite fast and guarants that no message will be lost. 
When such a burst of messages arrives it may happen, that a number of 
message buffer ISRs will be called without any chance for a DSR to run. 
This is not really a problem because we have up to 16 message buffers. 
As soon as all messages are received the DSRs will run. And they will 
run in LIFO order. So the interesting thing is, if we receive the CAN 
messages with the following IDs:

0x001, 0x002, 0x003, 0x004, 0x005

our application will  see the following:

0x005, 0x004, 0x003, 0x002, 0x001

So the eCos DSR handling does change the received data here. At the 
moment I did not ran into any trouble with my CAN application and it 
seems not to be a problem but there is still a little bad feeling with 
this behaviour. It was quite tricky to write the CAN driver in a way 
that it works well with list and table implementation of DSR scheduling.

Regards,

Uwe Kindler
Softwareentwicklung

--

cetoni GmbH
Am Wiesenring 6
D-07554 Korbussen

Tel.: +49 (0) 36602 338 28
Fax:  +49 (0) 36602 338 11
uwe.kindler@cetoni.de
www.cetoni.de

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss



More information about the Ecos-discuss mailing list