I have something working but not sure if I like it (looking for your opinion ).
The reason I don’t like it is you are still receiving standard or external frames (based on how you initialise the bus). I couldn’t receive either type without a filter (maybe that is expected).
// init->ExtFiltersNbr = 0; // Not used
init->ExtFiltersNbr = 32; // 64 / 2
//filter.IdType = FDCAN_STANDARD_ID;
filter.IdType = self->extframe ? FDCAN_EXTENDED_ID : FDCAN_STANDARD_ID;
# CAN Shield Example
# This example demonstrates CAN communications between two cameras.
# NOTE: you need two CAN transceiver shields and DB9 cable to run this example.
import time, omv
from pyb import CAN
from pyb import Timer
can.send('Hello', 1) # Send message with id 1
#can = CAN(2, CAN.NORMAL, extframe = False, baudrate=250_000, sampling_point=75, auto_restart=True)
can = CAN(2, CAN.NORMAL, extframe = True, baudrate=250_000, sampling_point=75, auto_restart=True)
can.setfilter(0, CAN.MASK, 0, (0, 0))
timer = Timer(2) # Timer 2 (don't use 1, 5, 6)
timer.init(freq=1) # trigger at 1Hz
# Receive messages on FIFO 0
msg = can.recv(0, timeout=10000)
Let me know your thoughts. If you mostly like it I can put up a PR in the OpenMV micropython fork and we can go from there.