I haven’t had a chance to play with the openMV H7 CAN Bus yet (I am waiting for a CAN adaptor to arrive) and have had a quick look around the forum. I found this from Oct 2019 saying that the H7 CAN driver doesn’t support extended frames:
# 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.