# \[New] CB2 Timer too close

## ※**Error Message**

When using the BTT CB2 mainboard with Klipper, you might encounter the following error:

{% hint style="danger" %} <mark style="color:red;">`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.`</mark>
{% endhint %}

## ※**Cause of the Problem**

This error typically indicates a synchronization issue between the host computer (running Klipper) and the MCU (microcontroller unit), where the timer intervals are too close. It is generally not a hardware fault but a configuration issue, especially in systems with higher resource demands. Potential causes include:

1. **Host performance**: High CPU or memory usage may impact communication efficiency, particularly if the host is running other processes or tasks simultaneously.
2. **Communication delays**: Factors like USB cable quality or system responsiveness can introduce small delays in communication.
3. **System configuration**: The default value for the **`TRSYNC_TIMEOUT`** parameter in Klipper is set for typical use cases, but in some setups, it may need to be adjusted to better handle high-load conditions.
4. **Increased system demand**: Adding optional components like **Knomi displays**, **RGB light strips**, or **cameras** can increase the system load, affecting communication timing.

This method, recommended by BigTreeTech, is an official solution to adjust the system’s tolerance and improve stability in more complex setups.

***

## ※**Solution**

Adjusting the **`TRSYNC_TIMEOUT`** parameter in Klipper can alleviate this issue. The default value is **0.025 seconds**. Increasing it to **0.05 seconds** allows for more time margin to accommodate higher system delays. Below is a step-by-step guide on how to modify this parameter using **MobaXterm**.

### **Step 1: Log in to the Host**

Follow your existing SSH login guide to access the host running Klipper.

### **Step 2: Modify the `TRSYNC_TIMEOUT` Parameter**

1. **Navigate to the Klipper Directory**\
   Enter the following command in the terminal to navigate to the Klipper directory:

   ```bash
   cd ~/klipper
   ```
2. **Open the `mcu.py` File**\
   Run the following command to open the file in a text editor:

   ```bash
   nano klippy/mcu.py
   ```
3. **Locate the Target Parameter**\
   To find the parameter, use the **mouse scroll wheel** to navigate through the file. You cannot edit directly by clicking, so use the scroll wheel to move through the file.\
   Look for the following line:

   ```python
   TRSYNC_TIMEOUT = 0.025
   ```

<figure><img src="https://3855363247-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fcs6QyzgclSdyKWWV05Sb%2Fuploads%2FUIbQ8keQs1je0lsix5Uo%2Fimage.png?alt=media&#x26;token=ee78881c-0813-4080-9330-cf8ab6175f10" alt=""><figcaption></figcaption></figure>

4. **Adjust the Parameter Value**\
   Change the value from **0.025** to **0.05**, so it looks like this:

```python
TRSYNC_TIMEOUT = 0.05
```

<figure><img src="https://3855363247-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fcs6QyzgclSdyKWWV05Sb%2Fuploads%2FkFN8K9L5VaeBUesLVAkG%2Fimage.png?alt=media&#x26;token=5df9996b-ba45-489d-a8ea-16183e4f87b8" alt=""><figcaption></figcaption></figure>

5. **Save the Changes**

* Press `Ctrl + O` to save the file.
* Press `Ctrl + X` to exit the editor.
* it will prompt you with **"Save modified buffer?"**. Press `Y` to confirm.
* Next, it will ask for the **file name to write**: `klippy/mcu.py`. Simply press `Enter` to confirm and save.

#### **Step 3: Restart the Klipper Service**

1. **Restart Klipper**\
   Enter the following command to restart the Klipper service and apply the changes:

   ```bash
   sudo service klipper restart
   ```
2. **Test the Printer**\
   After the restart, test the printer to ensure the **Timer too close** error no longer occurs.

This method can effectively address the **Timer too close** error and improve printer stability.
