Filters again MCP2515

Hi,

Apologies from the start; I've a CAN setup where I think messages are arriving too quickly for my code to sort out and I'm missing messages I want .
So I thought masks/filters.

I've been though everything I can think of , posts here , and the Data sheet etc but cannot get it to work.
I'll happily donate £10 to a nominated charity if anyone "CAN" sort this for me, as I've tried for a day and a half on this to no avail.

My Can is standard ID length
Board is MCP2515.
Library is MCP_CAN.
Arduino NANO.

My filter/ setup part is :

#include <mcp_can.h>
#define CAN0_INT 2 
MCP_CAN CAN0(8);  

void setup()
{
 
  Serial.begin(115200);
  delay(100);
Serial.println("GO!!")

//(etc etc )
 // Initialize MCP2515 running at a baudrate of 500kb/s and the masks and filters disabled.
  if (CAN0.begin(MCP_ANY, CAN_500KBPS, MCP_8MHZ) == CAN_OK)
    Serial.println(F("MCP2515 Initialized Successfully!"));
  else
    Serial.println(F("Error Initializing MCP2515..."));
  digitalWrite(Yellow, HIGH);

// FilterSet(); // tried here too .

  CAN0.setMode(MCP_NORMAL);                     // Set operation mode to normal so the MCP2515 sends acks to received data.

FilterSet();

  pinMode(CAN0_INT, INPUT);                            // Configuring pin for /INT input
}

void FilterSet()
{
     const unsigned long SAMask = 0x7;
     unsigned long SA = 0x290;   //address ; 11 bits
     unsigned long SA1 =0x294; // 11 bits
/*
 
 Mask setting (buffer 0):
Bit 7:  0  //not used
Bits 6-5 : 00// receive all that meets filter criteria
bit 4: 0  //not used
bit 3 :0 // no remote tx request (?)
 bits 2- 0: 111 // accept.

 so...  00000111   = 7hex ???????????????????????????

Mask setting (buffer 1):
 bit 7 : X
 bit 6-5:00  // receive all 
bit 4: 0
bit 3 :0
bit 2-0: 111 // accept all
 so... 00000111 =7hex
   
 */    
  // Set Mask 0 + Filters
  CAN0.init_Mask(0, 0, SAMask);
  CAN0.init_Filt(0, 0, SA);
  CAN0.init_Filt(0, 0, SA);

 // Set Mask 0 + Filters
  CAN0.init_Mask(1, 1, SAMask);
  CAN0.init_Filt(2, 1, SA1);
  CAN0.init_Filt(3, 1, SA1);
  CAN0.init_Filt(4, 1, SA1);
  CAN0.init_Filt(5, 1, SA1);
}



void loop()
{
 if (!digitalRead(CAN0_INT))                        // If CAN0_INT pin is low, read receive buffer
    {
      // display.clearDisplay();
      digitalWrite(Red, HIGH);
      CAN0.readMsgBuf(&rxId, &len, rxBuf); 
 Serial.print(rxId, HEX);
 for (byte i = 0; i < len; i++)
      {
        sprintf(msgString, " 0x%.2X", rxBuf[i]);
        Serial.print(msgString);
}

I have a Mega generating the CAN code:
if i put small delays between messages then all are read fine, but if i reduce this then I'm loosing data, as I do with the Real CAN meter to which I connect.
transmit bit of code is:
( note it is all receivable with the 'delay(10)' included )

void Trans()
{

  if (digitalRead(CanInt)) // ie no rec'd requests
  {
  
    MassFlow = VolFlow * 0.8;

    data[0] = byte (VolFlow);
    data[1] = byte (VolFlow >> 8);
    data[2] = byte (VolFlow >> 16);
    data[3] = byte (VolFlow >> 24);

    // data[4] = byte (MassFlow);
    // data[5] = byte (MassFlow >> 8);
    //data[6] = byte (MassFlow >> 16);
    //data[7] = byte (MassFlow >> 24);

    data[4] = 0;
    data[5] = 0;
    data[6] = 0;
    data[7] = 0;
    //*****************************************

    

    //  send data:  ID = 0x290, Standard CAN Frame, Data length = 8 bytes, 'data' = array of data bytes to send. (290 is flow rate data)

    sndStat = CAN0.sendMsgBuf(baseID, 0, 8, data);
   
    data[0] = 6;
    data[1] = 6;
    data[2] = 6;
    data[3] = meterID; // this is can id for the meter
    data[4] = 1;
    data[5] = 2;
    data[6] = 0;
    data[7] = 0;
   delay(10);

    sndStat = CAN0.sendMsgBuf((baseID + 1), 0, 8, data);
   
    data[0] = byte (ToTalvol);
    data[1] = 1;
    data[2] = 2;
    data[3] = 3;
    data[4] = 4;
    data[5] = 5;
    data[6] = 6;
    data[7] = 7;
     delay(10);

    sndStat = CAN0.sendMsgBuf((baseID + 2), 0, 8, data);
    // vol passed:

    data[0] = byte (ToTalvol);
    data[1] = byte (ToTalvol >> 8);
    data[2] = byte (ToTalvol >> 16);
    data[3] = byte (ToTalvol >> 24);
    data[4] = 0;
    data[5] = 0;
    data[6] = 0;
    data[7] = 0;
     delay(10);

    sndStat = CAN0.sendMsgBuf((baseID + 4), 0, 8, data);
   delay(10);
  }
}

Fixed it !!

I found the GIT example and noticed the line:

if (CAN0.begin(MCP_STDEXT, CAN_500KBPS, MCP_8MHZ) == CAN_OK)

Where I had

if (CAN0.begin(MCP_ANY, CAN_500KBPS, MCP_8MHZ) == CAN_OK)

The filters and mask were wrong too , but now sorted

this link