Timer too close in one of my Can Devices

Basic Information:

Printer Model: Custom
MCU / Printerboard: Manta M8P
Host / SBC CB1
klippy.log
logs-20250304-155733.zip (2.6 MB)

Fill out above information and in all cases attach your klippy.log file (use zip to compress it, if too big). Pasting your printer.cfg is not needed
Be sure to check our “Knowledge Base” Category first. Most relevant items, e.g. error messages, are covered there

Describe your issue:

Hey. Today one of my prints just stopped because a timer too close error in my Can devices and i don’t know what happened.
(Error: EbbCan_0 timer too close)

I need a hand for troubleshooting.
i have ran the scripts in order to know if it is really overloaded and i think it is not, here are the images:

I have ran this for the mcu:

python3 ~/klipper/scripts/graphstats.py /home/biqu/printer_data/logs/klippy.log -o loadgraph_mcu.png

And got this image:

And also have ran this one for Ebb:

python3 ~/klipper/scripts/graphstats.py /home/biqu/printer_data/logs/klippy.log -o loadgraph_mcu.png  --mcu=EBBCan_0

And got this:

Any help is welcome, thanks!

Could it be your CB1? Pretty hot.

I mentioned this link MCU 'mcu' shutdown: Timer too close still present · Issue #124 · Frix-x/klippain-shaketune · GitHub here Random Shutdown - #4 by hcet14.

Good luck, hcet

Maybe.
I have seen that my CB1 is between 60-70°C, is this too much hot?

It’s quite warm. You may consider cooling.

It’s approaching a worrisome level. Do you understand why they’re getting that hot?

I just took a look at your klippy.log and see that you have the stepper currents at 0.9A in the two extruders - do you need it to be that high? Typically, you can get a lot lower drive currents for extruders which results in lower currents and lower temperatures for the toolhead MCUs.

Well, the CB1 currently has a cooling issue because it is inside an electrical enclosure, and the air flowing through is already hot. Additionally, the airflow around the heatsink is not well designed, so it doesn’t dissipate heat effectively. To improve this, I am repositioning the fans to enhance cooling.

Regarding the stepper current… That’s obviously not an issue for the CB1, as the stepper motors are connected to the toolboard MCUs, but it might be a problem for these ones. And yes, I need to run them at maximum current because I’m using high-flow extruders, which require powerful steppers.

For now i’m taking a look in all mcus temperatures in order to check if this is the problem.

Thanks!

Well, yes, it seems everything is quite hot in my printer…

Maybe 60-70 is fine.

I can’t see anything suspicious in the log, so I can’t say anything strong here.
Looks like CAN is fine, everything is fine, and maybe PWM arrived too late.

I can only guess by process time that maybe there is just not enough CPU time.

Those, though, can be caused by thermal trolling if your CB1 is capable of it.
(IDK).

In the log:

Sent 88 16269.201879 16269.201661 16: seq: 1f, queue_digital_out oid=10 clock=2455005585 on_ticks=5492334
Sent 89 16269.224301 16269.224099 14: seq: 10, tmcuart_send oid=0 write=b'\xea\x03\xe8\xad\xe1' read=10
Sent 90 16269.230329 16269.230127 14: seq: 11, tmcuart_send oid=0 write=b'\xea\x03( \xc3' read=10
Sent 91 16269.910387 16269.910296 6: seq: 12, get_clock
Sent 92 16270.102014 16270.101796 16: seq: 13, queue_digital_out oid=10 clock=2512605646 on_ticks=5824098
Sent 93 16270.303933 16270.303723 15: seq: 14, queue_digital_out oid=6 clock=2515118106 on_ticks=371200
Sent 94 16270.304440 16270.304230 15: seq: 15, queue_digital_out oid=7 clock=2515118106 on_ticks=371200
Sent 95 16270.305853 16270.304969 64: seq: 16, set_next_step_dir oid=5 dir=1, queue_step oid=5 interval=58121126 count=1 add=0, queue_step oid=5 interval=201963 count=1 add=0, queue_step oid=5 interval=108725 count=2 add=-23959, queue_step oid=5 interval=68568 count=4 add=-6294, queue_step oid=5 interval=46149 count=7 add=-1795, queue_step oid=5 interval=35689 count=9 add=-577, queue_step oid=5 interval=31245 count=26 add=80

Receive: 92 16269.149599 16269.122279 15: seq: 1f, analog_in_state oid=9 next_clock=2454493442 value=14881
Receive: 93 16269.228508 16269.224301 18: seq: 11, tmcuart_response oid=0 read=b'\n\xfa\xef-\x808\x02\x08 \xbb'
Receive: 94 16269.234496 16269.230329 18: seq: 12, tmcuart_response oid=0 read=b'\n\xfa/ \x80\x00\x02\x08\xa0\x89'
Receive: 95 16269.449618 16269.230329 15: seq: 12, analog_in_state oid=9 next_clock=2473693442 value=14881
Receive: 96 16269.749658 16269.230329 15: seq: 12, analog_in_state oid=9 next_clock=2492893442 value=14878
Receive: 97 16269.910932 16269.910387 11: seq: 13, clock clock=2484461168
Receive: 98 16270.049619 16269.910387 15: seq: 13, analog_in_state oid=9 next_clock=2512093442 value=14877
Receive: 99 16270.308111 16270.305853 12: seq: 17, shutdown clock=2509832400 static_string_id=Timer too close

Like get_clock got response.
After that, you see TTC, so the next command will probably add a timer, which will be too late.
shutdown clock is less than all of the queue_digital_out commands, which confuses me a little.

We know that ebb runs at 64000000, so 2512605646-2509832400 = 2773246 and 2773246/64_000_000 = 0.043s which is pretty close (AFAIK, it should be closer to +150ms).

But technically, it should not cause TTC, because, according to the shutdown clock (2509832400), it happens before they should be scheduled (2512605646). According to the seq 17 they are received - 17 > 13, 14 and 15.

Either way, I suggest you pull the latest changes and maybe reflash the main mcu.
One of the patches may slightly reduce CPU load by GC changes, while other patches may optimize the USB CAN bridge.

Also, you may want to upgrade your system to Python 3.11, it should be just a little faster in everything, which I hope will help farther reduce your CPU load in the end.

Hope it helps.

You’re not looking at the right parameter - you should be looking at the Operating Temperature.

Junction Temperature is the maximum temperature that a device on the silicon chip can get to and you can reasonably expect it to work again when it cools down.

Operating Temperature is just that - the maximum temperature that the manufacturer states that the complete device will operate properly.

@JuanR3D is basically at the maximum temperature at which AllWinner indicates that the device will work reliably - which is why I said you were “approaching a worrisome level”.

Honestly, I don’t think this is the cause of your problems, but I would recommend getting the Manta M8P/CB1 out of the hot environment as a first step.

1 Like

Thanks you both! :slight_smile:

I have redesigned the airflow through the manta and It has lowered to a more reasonable temp (now it is about 50-60 ºC), so I hope this helps, not only to avoid timer too close but also to not damage the device.

Thanks for the firmware tips @nefelim4ag, I’ll try to update everything as soon as possible!

1 Like