Can bus message buffer size

I am trying to enhance Can bus management in our product. We have a G400D that sends data (17 can messages every 500ms approximately). An EMX receives theses messages and logs data on SD card. To avoid message lost I have increase recently the size of the buffer :



but :


```cs
var count = Can.ReadMessages(_msgList, 0, _msgList.Length);
            if (IsManaged)
            {
                Count2 = count;
                MsgListm = _msgList;
            }
            Debug.Print("nb message Can=" + count);

This returns a max value of 126 . Does it mean anything for you GHI team?

I believe the returned value is the number off messages moved from the can buffer into _msgList.
So in this case you should process 0 to 126.

@ leforban - @ David@ Leclanche is correct, except it should be 0 to 125. ReadMessages will only return what is current available to read. Sending it a larger buffer does not prevent lost messages. The buffer properties on the CAN object itself can change the internal buffer size.

the strange things is that on 4.2 the max value was 998 message whereas it’s only 126 on 4.3. Therefore I am receiving RXover error faster on 4.3 than on 4.2… doe sit make sense?

I would expect RXover slower because you still have 874 open locations in the incomming buffer.