# "MCU 'mcu' shutdown: Timer too close.... Random

**URL:** <https://klipper.discourse.group/t/mcu-mcu-shutdown-timer-too-close-random/14573>\
**Category:** General Discussion\
**Created:** [March 1, 2024, 7:14pm UTC](https://klipper.discourse.group/t/mcu-mcu-shutdown-timer-too-close-random/14573 "2024-03-01T19:14:45Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![RosaireMimake](https://avatars.discourse-cdn.com/v4/letter/r/b5ac83/32.png) [@RosaireMimake](https://klipper.discourse.group/u/RosaireMimake)\
**Post date:** [March 1, 2024, 7:14pm UTC](https://klipper.discourse.group/t/mcu-mcu-shutdown-timer-too-close-random/14573/1 "2024-03-01T19:14:45Z")

</div>

### Basic Information:

Printer Model: Corexy homemade.  
 MCU / Printerboard: raspberry pi 3b+ / btt octopus 1.1  
 `klippy.log`

_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:

…  
Good evening,  
I am the owner of a self-built Corexy printer with an Octopus motherboard and EBB42 Canbus. The printer randomly stops and I get the error “MCU ‘mcu’ shutdown: Timer too close. This often indicates the host computer is overloaded. Check for other processes consuming excessive CPU time, high swap usage, disk errors, overheating, unstable voltage, or similar system problems on the host computer. KLIPPER”. having the btt relay module, when the firmware goes into error it throws out the voltage and everything turns off. I ask for your help I am desperate  
Thanks in advance  
nb: forgive my English. 😃  
[klippy (2).zip](https://klipper.discourse.group/uploads/short-url/qe1XwRwIxuVVrcW5ooA7fxq2DyJ.zip) (4.5 MB)

---

<div class="post-metadata">

**Author:** ![gaolst](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/gaolst/32/10026_2.png) [@gaolst](https://klipper.discourse.group/u/gaolst)\
**Post date:** [March 2, 2024, 1:16am UTC](https://klipper.discourse.group/t/mcu-mcu-shutdown-timer-too-close-random/14573/2 "2024-03-02T01:16:15Z")

</div>

Hi I did look at your log file…  
first what I can say - “Timer too close” errors by their nature are very complex and many things can cause it, usually klipper does log it and provide some additional data from which at least we can understand what did happened and point user to right direction.  
Your BTT relay module is really messing everything even more, because when something did happened - your system is just powered off and log don’t contain any usable information about last seconds before that error did happend.  
Your current log is looking following way:

> Ok we started the system,  
> you start print,  
> we are happily printing,  
> printing,  
> printing,  
> printing,  
> Ok we started the system.

So next time, remove/disable BTT relay module and collect full log when you will hit that error, if you afraid to leave printer running unattended - then sit around and wait for error.

But still I did spot some weird behavior in your log:  
klipper is producing “Stats” almost each second and storing them to log file with `time marker`, that `Time marker` is counting how much second did pass from klipper startup.

I did see that `Time marker` is running quicker than system time.  
For example, there was a log rotation at 00:00:00 by system time, `Time marker` was at “13945”  
Last record of that marker was at “22750” - which give us difference 8805 seconds,  
which equals to 2 hours, 26 min 45 seconds, also last “Stats” record is showing that your heatbed is at 60c, extruder is at 210c  
Next record is about printer Startup, which did happened at 02:23:33 by system time, and your heatbed at 18.4c and extruder is at 16.2c - this means at 02:23 (by system time) they already completely cool (probably at room temperature) - system was already turned off at least 20 minutes.

So timers don’t match  
by Stats - error should happend around 02:27  
by System time and temperatures - error should happened around 02:00 (or earlier)

In log I see this kind of behaviour in both cases when you did expirienced error.  
I’m not sure that this behaviour is indicating some overclocking of RPi, issues with clocks, incorrect freq, or it don’t mean anything at all - but that’s all what i was abble to derive from your log.

---

<div class="post-metadata">

**Author:** ![RosaireMimake](https://avatars.discourse-cdn.com/v4/letter/r/b5ac83/32.png) [@RosaireMimake](https://klipper.discourse.group/u/RosaireMimake)\
**Post date:** [March 18, 2024, 8:29pm UTC](https://klipper.discourse.group/t/mcu-mcu-shutdown-timer-too-close-random/14573/3 "2024-03-18T20:29:29Z")

</div>

[k.zip](https://klipper.discourse.group/uploads/short-url/okeo6Jl6QFsbjS1P5kZtsP5zJlm.zip) (4.6 MB)

this is the log without the shutdown module

---

<div class="post-metadata">

**Author:** ![Sineos](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/sineos/32/18_2.png) [@Sineos](https://klipper.discourse.group/u/Sineos)\
**Post date:** [March 18, 2024, 8:54pm UTC](https://klipper.discourse.group/t/mcu-mcu-shutdown-timer-too-close-random/14573/4 "2024-03-18T20:54:44Z")

</div>

You have two errors that are quite similar.

- [Timer too close](https://klipper.discourse.group/t/timer-too-close/6634)
- [Missed scheduling of next digital out event](https://klipper.discourse.group/t/missed-scheduling-of-next-digital-out-event/14775)

Especially check that you really used the correct parameters for building the firmware(s).

---

<div class="post-metadata">

**Author:** ![RosaireMimake](https://avatars.discourse-cdn.com/v4/letter/r/b5ac83/32.png) [@RosaireMimake](https://klipper.discourse.group/u/RosaireMimake)\
**Post date:** [March 18, 2024, 9:18pm UTC](https://klipper.discourse.group/t/mcu-mcu-shutdown-timer-too-close-random/14573/5 "2024-03-18T21:18:51Z")

</div>

I tried to rewatch and reload the firmware several times.  
checking again I saw that I had the txqueuelen at 128 instead of 1024, could this cause the problem?

---

<div class="post-metadata">

**Author:** ![gaolst](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/gaolst/32/10026_2.png) [@gaolst](https://klipper.discourse.group/u/gaolst)\
**Post date:** [March 18, 2024, 9:38pm UTC](https://klipper.discourse.group/t/mcu-mcu-shutdown-timer-too-close-random/14573/6 "2024-03-18T21:38:09Z")

</div>

> [@RosaireMimake](#):
>
> I saw that I had the txqueuelen at 128 instead of 1024, could this cause the problem?

Could be …  
Also re-check terminating resistors  
[https://www.klipper3d.org/CANBUS.html#terminating-resistors](https://www.klipper3d.org/CANBUS.html#terminating-resistors)

also during print you should try to monitor your Can bus  
i did see in your log that you have constantly growing retransmit counters.

Command to get canbus statistics:  
`ip -details -statistic link show can0`  
keep eye on errors, dropped, overrun, collsns fields

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/klipper/original/1X/64419bf2aac6639e6ef5cef200dcd456b0a01ac3.png) [@system](https://klipper.discourse.group/u/system)\
**Post date:** [May 17, 2024, 9:38pm UTC](https://klipper.discourse.group/t/mcu-mcu-shutdown-timer-too-close-random/14573/7 "2024-05-17T21:38:13Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
