cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H750 Performance slows down after time

sqwerize
Associate III

Hi!
I have a problem with the canbus gateway project, I have a very good ring buffer that works without delays and transfers data between can1 and can2. All data copying is done through the main while loop where I check the buffers for can1 and can2 to see if there is anything to send and handle it. The project works great, but after 2-3 hours of driving, strange anomalies start to happen... There is a second delay in data transfer, when I press the reset button on the art-pi board, everything returns to normal and works properly for the next 2-3 hours. I thought it might be a buffer overflow problem which can hold 512 messages for each can. However, when I turn off the vehicle and after a minute there are no frames on the bus and I restart the vehicle, the delay is still there... So it's not the buffers' fault. Has anyone encountered such a problem?

3 REPLIES 3

I seriously doubt anyone's got an apples-to-apples case for your issue / failure.

If you can't understand what your own code is doing, it's not clear how uninvolved parties are going to know.

Instrument things so you can better understand what's happening internally, and query / probe current state. Perhaps the ability to dump buffer, or memory structures, and reset buffering.

If using dynamic memory look at fragmentation and resource leaking.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
STOne-32
ST Employee

Dear @sqwerize ,

 

Also check the Clocks used on your system , a long term jitter may affect CAN bus . If possible to share your setup - crystal , PLL etc.

Hope it helps.

STOne-32

sqwerize
Associate III

@STOne-32 @Tesla DeLorean 

Here is screens and my ringbuffer:

 

sqwerize_7-1720994642276.png

sqwerize_0-1720994371581.pngsqwerize_1-1720994392309.pngsqwerize_2-1720994409458.pngsqwerize_3-1720994429826.png

sqwerize_4-1720994584264.pngsqwerize_5-1720994601295.pngsqwerize_6-1720994617735.png