---
# System prepended metadata

title: TeraTerm - TimeStamp
tags: [TeraTerm, TimeStamp, Serial Port]

---


# TeraTerm - TimeStamp

###### tags: `Serial Port` `TeraTerm` `TimeStamp`


# Add Timestamp

### Setup -> Additional Settings

![](https://i.imgur.com/pNScAdw.png)

1. Switch to __Log__ tab
2. Check the __Timestamp__ option
3. Input the file string format:
``teraterm_%y%m%d_%H%M%S_COM.log``
4. Optional: uncheck the __Append__ option

![](https://i.imgur.com/GCMdpDN.png)

### Save settings

You can Save the current setting to an ini file:

![](https://i.imgur.com/3Fr1RRa.png)

![](https://i.imgur.com/jjaJrEJ.png)

### Restore settings

When you close the app and launch it next time, 
you can restore the setting from the saved ini file

![](https://i.imgur.com/jjTiAPq.png)

![](https://i.imgur.com/Z3uuUMH.png)

### Save the log file

![](https://i.imgur.com/DANerQD.png)

Make sure the __Timestamp__ option is checked

![](https://i.imgur.com/jo3DvaL.png)

---

# Fiilex Color series

[How to Use printf on STM32](https://shawnhymel.com/1873/how-to-use-printf-on-stm32/)

可以使用 ``printf()`` 來印 log, 並透過一般 USB Typc-C to USB (PC),
再利用 Tera Term 來看 Log!

``Event.c:``
```
S32 Event_Check_Temp(Event_Element e)
{		
    U32 ADC_Avg = ADC_BufferAvg[eADC_Temp][0] + ADC_BufferAvg[eADC_Temp][1] + ADC_BufferAvg[eADC_Temp][2] + ADC_BufferAvg[eADC_Temp][3] +
                  ADC_BufferAvg[eADC_Temp][4] + ADC_BufferAvg[eADC_Temp][5] + ADC_BufferAvg[eADC_Temp][6] + ADC_BufferAvg[eADC_Temp][7];		
    TempControllerPCBA = TemperatureTable[ADC_Avg >> 7];
		//[start] added by elite_lin - 2022/01/04
		//sprintf("Tempn", TempControllerPCBA);
		printf("Temp\r\n");
		//[end] added by elite_lin - 2022/01/04
    Compare_Sensor_Value();
    return ERR_NULL;
}
```


Tera Term, Baud rate 要設定為 ``250000`` (250 kbps baud)
![](https://i.imgur.com/niyCSUL.png)
