Portenta X8 Build Image 934, CAN- Rx Buffer overflow Bug fix - not working

Quick Overview:
I use an X8 with hat carrier to send and receive CAN messages over can1. With the firmware build 881, i was able to succesfully send and receive CAN messages. However, i see that high frequency messages causes a buffer overflow during the rx phase. I eventually have to take the can1 down and back up again to solve this. which is obviously not practical.

Lucky for me, i was glad to see that someone noticed this and a firmware fix 934 with an update to H7 addresses this. however, when i tested this, i was not able to send can message at all over the bus.

My versions:
I see that build 934 uses. x8h7_firmware/version 0.0.5-next-53df799-20250314:072359
and Build 881 uses x8h7_firmware/version 0.0.3-next-555d7b4-20240806:102326

How to replicate the error:
i did a simple test to send a can message from the device after activating can1. since there are no in build candump and can send. i used a very simple python container version and monitor the bus using a kvaser

command: docker run --rm --network host --cap-add NET_RAW --cap-add NET_ADMIN python:3.12-alpine python3 -c "import socket,struct; s=socket.socket(socket.PF_CAN, socket.SOCK_RAW, socket.CAN_RAW); s.bind(('can1',)); s.send(struct.pack('=IB3x8s',0x123,8,b'\x11\x22\x33\x44\x55\x66\x77\x88')); print('sent')"

i could immidietly see that, the 881 build will send the message over the bus, but the latest 934 build with Buffer over flow bug fix does not. I was not able to send a can message over the bus. I have tried this multiple boards and i end up having the same issue.

Can some one help with finding the root cause of this?

Please read the pinned post re How to get the most from the forum. Pay attention to how to post code and wiring diagrams.

@sonofcy. thank you for the comment.

Solved: :slightly_smiling_face:
I was informed from the arduino support that this is a bug that CAN is not working properly in image 934. I am putting the solution here which allowed me to fix it.

The image v934, contains a bug where CAN is not working, in that case, please flash another image version of STM32 so the patch works. You can get the binary and more information from
github

Open the terminal on your machine and navigate where these file has been downloaded and then type:

adb push ./STM32H747AII6_CM7.bin /home/fio

Then open the Portenta X8 shell with adb shell and:

sudo mount -o remount,rw /usr
sudo mv STM32H747AII6_CM7.bin /usr/lib/firmware/arduino/stm32h7-fw/STM32H747AII6_CM7.bin

After that, flash the STM32 with:

cd /usr/arduino/extra
sudo ./program.sh

Then reboot

This will make the CAN working in build 934. However, i beleive there is still a Tx wedge happening at high Rx flow which i am trying to solve. Will update more on that if I could get it working.