# SEMA® User Manual

(Applicable to SEMA Linux Version ≥ 4.4.0 and SEMA Windows Version ≥ 4.2.15)

January 30, 2026

![The image displays a logo featuring the word 'SEMA' in bold, white, uppercase letters that are slanted slightly to the right. The text is centered on a bright orange rectangular background with rounded corners. A thin white horizontal line runs across the upper portion of the orange background, positioned just above the text.](.sema-user-manual/6718b56556679a667d5f02c7db5c8d38de7f97c4562a96d1261e664db4a98527.jpg)

Leading EDGE COMPUTING

# Copyright 2026 ADLINK Technology, Inc.

# Disclaimer

The information in this document is subject to change without prior notice in order to improve reliability, design, and function and does not represent a commitment on the part of the manufacturer. In no event will the manufacturer be liable for direct, indirect, special, incidental, or consequential damages arising out of the use or inability to use the product or documentation, even if advised of the possibility of such damages. This document contains proprietary information protected by copyright.

All rights are reserved. No part of this manual may be reproduced by any mechanical, electronic, or other means in any form without prior written permission of ADLINK Technology, Inc.

# Trademark Information

Product names mentioned herein are used for identification purposes only and may be trademarks and/or registered trademarks of their respective companies.

Revision History

<table><tr><td>Revision</td><td>Release Date</td><td>Description of Changes</td></tr><tr><td>1.0</td><td>30/01/2026</td><td>Initial version of User manual for SEMA Windows and Linux</td></tr></table>

# Contents

# Revision History... .3

1. Introduction .. .. 6
2. Supported Functionalities.. .6
3. Architecture ..

3.1. For Linux Platform...
3.2. For Windows Platform.. .8

# 4. Feature Testing . .9

4.1. For Linux Platform.. 9

4.1.1. Board Information... .10
4.1.2. Board Values .. . 13
4.1.3. Watchdog Control.. .21
4.1.4. Storage Access . .23
4.1.5. Voltage Monitor .. .27
4.1.6. GPIO Control.. .28
4.1.7. Generic I2C Access [Supported only for EC boards].. .29
4.1.8. Error log Description . . 32
4.1.9. BIOS Information.. .33
4.1.10. UUID [Type 4] . .34
4.1.11. Smart Fan Control.. . 35
4.1.12. Backlight Control . ..38
4.1.13. Exception Description.. .39
4.1.14. SMBus Access.. ..40

# 4.2. For Windows Platform.. .42

4.2.1. Board Information... .44
4.2.2. Board Values .. .. 48
4.2.3. Watchdog Control... .58
4.2.4. Storage Access . .. 60
4.2.5. Voltage Monitor .. .64
4.2.6. GPIO Control... .. 65
4.2.7. Generic I2C Access.. ..66
4.2.8. Error log Description . ..69

4.2.9. BIOS Information.. ..70
4.2.10. UUID [Type 4] .. .. 71
4.2.11. Smart Fan Control.. .72
4.2.12. Backlight Control . .75
4.2.13. Exception Description.. .76
4.2.14. SMBus Access.. .. 77

5. Annexure.. ... 79

5.1. Restart Event.. .79
5.2. Accessing I2C in Linux using I2C-tools.. .80

6. FAQs & Troubleshooting.. ..82

# 1. Introduction

SEMA (Smart Embedded Management Agent) is a middleware developed by ADLINK to monitor, control, and manage embedded and industrial computing platforms. It provides a standardized interface (EAPIs) in compliance to PICMG EAPI specification providing access low-level hardware features that are managed by the Embedded Controller (EC) or BMC (Board Management Controller).

This document explains how to test each supported function using the command-line interface on Windows and Linux.

# 2. Supported Functionalities

Board information and manufacturing data
Hardware monitoring
Watchdog control
• GPIO control (only support PCA9535 and SX1509 I/O expander)
I2C access
Temperature monitoring
Fan monitoring and control
• Non-volatile storage access (e.g., EEPROM)
Backlight control (LVDS panels)
• Error logging

# 3. Architecture

# 3.1. For Linux Platform

![The diagram illustrates a software architecture divided into three main sections: **User Space**, **Kernel Space**, and **Board Controller**.\n\n**User Space**\n*   A top red bar contains two white blocks: '**Your Program**' and '**ADLINK SEMA UTILITY (command line)**'.\n*   Double-headed red arrows connect both blocks downward to a dark grey bar labeled '**SEMA EAPI Library**'.\n*   Inside the library bar is a lighter grey strip labeled '**User-Space Mutex Protection**'.\n*   A double-headed red arrow connects the library downward to a dark grey bar labeled '**Sysfs/IOCTL interface for User Space**'.\n\n**Kernel Space**\n*   Separated by a dashed line, this section contains a large white box.\n*   Inside are dark grey blocks labeled '**Board Info Driver**', '**WDT Driver**', '**..........**' (ellipsis), and '**I2C Driver**'.\n*   Below these drivers is a red bar labeled '**Kernel Space Mutex Protection**'.\n*   A double-headed red arrow connects this section upward to the '**Sysfs/IOCTL interface for User Space**' block.\n\n**Board Controller**\n*   Separated by a dashed line, the bottom section is a red bar labeled '**Unified SEMA**'.\n*   It contains two dark grey blocks: '**EC Controller**' and '**Tiva BMC Controller**'.\n*   A double-headed red arrow connects this section upward to the '**Kernel Space Mutex Protection**' bar in the Kernel Space section.](.sema-user-manual/2bcec95e63e17542516e803b3f9cbb11fcae08ed093cce712922cfd3f6726168.jpg)

# • User Space Layer:

User applications and the ADLINK SEMA utility access hardware services through the SEMA EAPI library. User-space mutex protection ensures safe multi-threaded access before requests are forwarded to the kernel.

# • Kernel Space Layer:

Hardware drivers (Board Info, WDT, I²C, etc.) receive requests via the Sysfs/IOCTL interface. Kernel-level mutex protection synchronizes driver operations and prevents race conditions during hardware access.

# Board Controller Layer:

The Unified SEMA interface communicates with embedded controllers such as the EC and Tiva BMC. This layer executes low-level control and monitoring functions for reliable board management.

# 3.2. For Windows Platform

![Based on the provided image, here is the description of the flowchart:\n\n**Sections and Blocks:**\nThe diagram is divided into three sections by dashed lines: **User mode**, **Kernel Mode**, and **Board Controller**.\n\n*   **User mode**: A red bar containing two white blocks:\n    *   'Your Program'\n    *   'ADLINK SEMA UTILITY (command line)'\n*   **SEMA EAPI Library**: A grey block situated directly below the User mode section.\n*   **Kernel Mode**: A section enclosed in a rounded rectangle containing:\n    *   'SEMA Driver' (top grey block)\n    *   'Kernel Space Mutex Protection' (bottom red block)\n*   **Board Controller**: A red block labeled:\n    *   'Unified SEMA' (containing two smaller grey blocks inside: 'EC Controller' and 'Tiva BMC Controller')\n\n**Connections:**\n*   Double-headed arrows connect 'Your Program' and 'ADLINK SEMA UTILITY (command line)' down to the 'SEMA EAPI Library'.\n*   A double-headed arrow connects the 'SEMA EAPI Library' down to the 'SEMA Driver'.\n*   A double-headed arrow connects the 'SEMA Driver' (and the Kernel Mode section generally) down to the 'Unified SEMA' block.](.sema-user-manual/22beaf405077775ae454ba7b4e500f349726b20fd21a9bb685802fe0990db639.jpg)

# User Mode:

User applications and the ADLINK SEMA command-line utility access hardware services through the SEMA EAPI Library. This layer provides a unified API interface for board management and monitoring operations.

# . Kernel Mode:

The SEMA Driver receives requests from user space and acts as the main communication bridge between applications and the hardware controllers. It handles command routing and low-level device coordination.

# Board Controller Layer:

The EC Controller and Tiva BMC Controller execute hardware control and monitoring functions through the Unified SEMA interface. This layer directly manages board-level sensors, power, and system features.

# 4. Feature Testing

# 4.1. For Linux Platform

To utilize the SEMA command line interface, access the Linux command terminal.

# Test Environment:

Module: cExpress-MTL [Base: Express Base 6]

BIOS Version: 1.07.10

Firmware version: ADLINK 008

OS: Ubuntu 22.04

Kernel Version 5.15

SEMA Utility Version
```txt
$ sudo semautil version
adlink@adlink-Default-string:~$ sudo semautil version
SEMA Version : ADLINK-SEMA-UNIFIED-LINUX-V5_R0_0_25_12_17
```

Help Menu
```txt
$ sudo semautil /h

adlink@adlink-Default-string:~$ sudo semautil /h

Usage:
- Display this screen:
    semautil /h

- Get SEMA Version:
    semautil version

- Watch Dog:
1. semautil /w get_cap
2. semautil /w start [sec (0-65535)]
3. semautil /w trigger
4. semautil /w stop
5. semautil /w pwrup_enable [sec (60-65535)]
Note:
Start time will be different for the different platforms.
Please go to BIOS menu to check it
6. semautil /w pwrup_disable

- Storage:
1. semautil /s get_cap [Region]
2. semautil /s read [Region] [Address] [Length]
3. semautil /s write [Region] [Address] [string/value]
4. semautil /s hex_write [Region] [Address] [value]
```

# 4.1.1. Board Information

Allows the users to query essential system and manufacturer details for diagnostic and inventory purposes.

```txt
$ sudo semautil /i get_bd_info [EAPI ID]
```

```txt
adlink@adlink-Default-string:~$ sudo semautil /i
- System monitor-Board Info:
1. semautil /i get_bd_info [EAPI ID]
    1 : Board manufacturer name
    2 : Board name
    3 : Board serial number
    4 : Board BIOS revision
    5 : HW revision
    6 : Board platform type
    7 : BMC bootloader revision
    8 : BMC application revision
    9 : Board restart event
    10 : Board repair date
    11 : Board manufacturer date
    12 : Board MAC address 1
    13 : Board MAC address 2
    14 : Board 2nd HW revision number
    15 : Board 2nd serial
```

Board Manufacturer Name
```shell
$ sudo semautil /i get_bd_info 1
```

```txt
adlink@adlink-Default-string:~$ sudo semautil /i get_bd_info 1
Board manufacturer name: ADLINK Technology Inc.
```

Board Name
```txt
$ sudo semautil /i get_bd_info 2
```

```txt
adlink@adlink-Default-string:~$ sudo semautil /i get_bd_info 2
Board name: cExpress-MTL
```

Board Serial Number
```shell
$ sudo semautil /i get_bd_info 3
```

```txt
adlink@adlink-Default-string:~$ sudo semautil /i get_bd_info 3
Board serial number: 244110003L
```

Board BIOS Revision
```txt
$ sudo semautil /i get_bd_info 4
adlink@adlink-Default-string:~$ sudo semautil /i get_bd_info 4
Board BIOS revision: 1.07.10
```

Hardware Revision
```shell
$ sudo semautil /i get_bd_info 5
adlink@adlink-Default-string:~$ sudo semautil /i get_bd_info 5
Board HW revision: abcd
```

Board Platform Type
```perl
$ sudo semautil /i get_bd_info 6
adlink@adlink-Default-string:~$ sudo semautil /i get_bd_info 6
Board platform type:
```

BMC Bootloader Revision
```perl
$ sudo semautil /i get_bd_info 7
adlink@adlink-Default-string:~$ sudo semautil /i get_bd_info 7
Get EApi information failed
EApiBoardGetStringA error 22, Invalid argument
```

Application Revision/Firmware Revision
```perl
$ sudo semautil /i get_bd_info 8
adlink@adlink-Default-string:~$ sudo semautil /i get_bd_info 8
Board application revision: ADLINK 008
```

Board Restart Event
```txt
Indicates the cause of the last system restart.
```

```shell
$ sudo semautil /i get_bd_info 9
adlink@adlink-Default-string:~$ sudo semautil /i get_bd_info 9
Board restart event: Power down
```

Board Last Repair Date
```txt
$ sudo semautil /i get_bd_info 10
adlink@adlink-Default-string:~$ sudo semautil /i get_bd_info 10
Board repair date: 2024/07/16
```

Board Manufacturing Date
```txt
$ sudo semautil /i get_bd_info 11
adlink@adlink-Default-string:~$ sudo semautil /i get_bd_info 11
Board manufacturer date: 2024/06/17
```
Board MAC Address 1

```txt
$ sudo semautil /i get_bd_info 12
adlink@adlink-Default-string:~$ sudo semautil /i get_bd_info 12
Board MAC address: 00306474A1E1
```
Board MAC Address 2

Note: This feature is supported only in EC boards
```shell
$ sudo semautil /i get_bd_info 13
adlink@adlink-Default-string:~$ sudo semautil /i get_bd_info 13
Board MAC address 2:
```
Board Secondary Hardware Revision

Note: If a value has not been written to the ODM region, the command returns an empty string.
```txt
$ sudo semautil /i get_bd_info 14
adlink@adlink-Default-string:~$ sudo semautil /i get_bd_info 14
Board 2nd HW revision number:
```

Board Secondary Serial Number
```shell
$ sudo semautil /i get_bd_info 15
adlink@adlink-Default-string:~$ sudo semautil /i get_bd_info 15
Board 2nd serial number:
```

# 4.1.2. Board Values

Read the real-time system and hardware parameters [corresponds to a specific sensor reading or board metric]

```shell
$ sudo semautil /d get_value [EAPI ID]
```

```txt
adlink@adlink-Default-string:~$ sudo semautil /d
- Board values:
1. semautil /d get_value [EAPI ID]
1 : EAPI Specification Version
2 : Boot Counter
3 : Running time meter value
4 : Vendor Specific Library Version
5 : CPU Temperature
6 : Board Temperature
7 : CPU Core Voltage
8 : 2.5V Voltage
9 : 3.3V Voltage
10 : Battery Voltage
11 : 5V Voltage
12 : 5V Standby Voltage
13 : 12V Voltage
14 : CPU Fan
15 : System Fan 1
16 : Get power uptime
17 : Get restart event
18 : Get BMC capabilities
19 : Get extended BMC capabilities
20 : Board Min Temperature
21 : Board Max Temperature
22 : Board Startup Temperature
23 : CPU Min Temperature
24 : CPU Max Temperature
25 : CPU startup Temperature
26 : Get main power current
27 : GFX Voltage
28 : 1.05 Voltage
29 : 1.5 Voltage
30 : Vin Voltage
31 : System Fan 2
32 : System Fan 3
33 : Board 2nd Current Temperature
34 : Board 2nd Min Temperature
35 : Board 2nd Max Temperature
36 : Board 2nd Startup Temperature
37 : Get Board power cycle counter
38 : Get Board BMC Flag
39 : Get Board BMC Status
40 : IO Current
41 : System Temperature
42 : System Min Temperature
43 : System Max Temperature
44 : System Startup Temperature
```

# 4.1.2.1. Dynamic Hardware Metrics / Runtime Statistics

# Boot Counter

Number of hardware/software reset and successful power-up.

```shell
$ sudo semautil /d get_value 2
```

```txt
adlink@adlink-Default-string:~$ sudo semautil /d get_value 2
Boot counter: 784
```

# Running Time Meter Value (minutes)

Represents the total uptime of the system in minutes.

```shell
$ sudo semautil /d get_value 3
```

```txt
adlink@adlink-Default-string:~$ sudo semautil /d get_value 3
Running Time Meter: 155310 minutes
```

# Power-On Uptime

Represents the uptime of the system since last boot in seconds

```txt
$ sudo semautil /d get_value 16
```

```txt
adlink@adlink-Default-string:~$ sudo semautil /d get_value 16
Board powerup time: 6097 seconds
```

# Restart Event

Indicates the cause of the last system restart.

```txt
$ sudo semautil /d get_value 17
```

```txt
adlink@adlink-Default-string:~$ sudo semautil /d get_value 17
Restart event: 0x60
```

# Board Power-Cycle Counter

Indicates how many times the external power supply has been shut down (including standby voltage).

```txt
$ sudo semautil /d get_value 37
```

```txt
adlink@adlink-Default-string:~$ sudo semautil /d get_value 37
Power cycle counter: 496
```

# Board BMC/EC Status Flags

Displays information about the internal status of the EC/BMC

```txt
$ sudo semautil /d get_value 38
```

```makefile
adlink@adlink-Default-string:~$ sudo semautil /d get_value 38
BMC Flag:
Exception code : NO ERROR
Mode : ATX Mode
BIOS : Standard BIOS
```

# BMC status

This is not supported by EC boards.

Note: This screenshot was taken in board

```txt
$ sudo semautil /d get_value 39
```

# 4.1.2.2. Software Details

# EAPI specification version

```shell
$ sudo semautil /d get_value 1
```

```txt
adlink@adlink-Default-string:~$ sudo semautil /d get_value 1
EAPI Specification Version: 1.0.00
```

# Vendor-Specific Library Version

```shell
$ sudo semautil /d get_value 4
```

```batch
adlink@adlink-Default-string:~$ sudo semautil /d get_value 4
SEMA Library Version : 5.0.00
```

# 4.1.2.3. Controller Capabilities (EC / BMC)

Lists the supported and unsupported features

# EC/BMC Capabilities

```txt
$ sudo semautil /d get_value 18
```

adlink@adlink-Default-string:\~\$ sudo semautil /d get\_value 18

<table><tr><td colspan="6">BMC capabilities:</td></tr><tr><td>Bit</td><td>Capability</td><td>Status</td><td>Bit</td><td>Capability</td><td>Status</td></tr><tr><td>0</td><td>Uptime and Power Cycles</td><td>Supported</td><td>16</td><td>I2C Bus 1</td><td>Supported</td></tr><tr><td>1</td><td>System Restart Event</td><td>Supported</td><td>17</td><td>I2C Bus 2</td><td>Supported</td></tr><tr><td>2</td><td>User-Flash Size</td><td colspan="2">1024 bytes (0x0000 to 0x03FF)18</td><td>CPU Fan</td><td>Supported</td></tr><tr><td>3</td><td>Runtime Watchdog</td><td>Supported</td><td>19</td><td>System Fan 1</td><td>Not Supported</td></tr><tr><td>4</td><td>Temperatures</td><td>Supported</td><td>20</td><td>AT/ATX Mode</td><td>Supported</td></tr><tr><td>5</td><td>Voltage Monitor</td><td>Supported</td><td>21</td><td>ACPI Thermal Trigger</td><td>Supported</td></tr><tr><td>6</td><td>Storage of failure reason</td><td>Not Supported</td><td>22</td><td>Power-up to last state</td><td>Supported</td></tr><tr><td>7</td><td>Bootloader timeout</td><td>Not Supported</td><td>23</td><td>Backlight Restore</td><td>Supported</td></tr><tr><td>8</td><td>Display Backlight control</td><td>Supported</td><td>24</td><td>DTS Temperature</td><td>Not Supported</td></tr><tr><td>9</td><td>Power-up Watchdog</td><td>Supported</td><td>25</td><td>DTS Offset Registers</td><td>Not Supported</td></tr><tr><td>10</td><td>Power Monitor (current sense)</td><td>Supported</td><td>26</td><td>System Fan 2</td><td>Not Supported</td></tr><tr><td>11</td><td>Boot counter</td><td>Supported</td><td>27</td><td>System Fan 3</td><td>Not Supported</td></tr><tr><td>12&amp;13</td><td>Input Voltage</td><td>Not Supported</td><td>28</td><td>Ext-GPIO</td><td>Supported</td></tr><tr><td></td><td></td><td></td><td>29</td><td>I2C Bus 3</td><td>Supported</td></tr><tr><td>14</td><td>Rsense of Power Monitor</td><td>Not Supported</td><td>30</td><td>I2C Bus 4</td><td>Supported</td></tr><tr><td>15</td><td>Dual-BIOS</td><td>Not Supported</td><td>31</td><td>BMC ID 0</td><td>Other BMC</td></tr></table>

# Extended EC/BMC Capabilities

```txt
$ sudo semautil /d get_value 19
```

adlink@adlink-Default-string:\~\$ sudo semautil /d get\_value 19

<table><tr><td colspan="6">Extended BMC capabilities:</td></tr><tr><td>Bit</td><td>Capability</td><td>Status</td><td>Bit</td><td>Capability</td><td>Status</td></tr><tr><td>32</td><td>Board 2 Temperature</td><td>: Not Supported</td><td>40</td><td>Parameter Memory</td><td>: Supported</td></tr><tr><td>33</td><td>PEC Protocol</td><td>: Not Supported</td><td>41</td><td colspan="2">Extended I2C registers for Status and Data : Not Supported</td></tr><tr><td></td><td></td><td></td><td>42</td><td>Ext-GPIO Input Interrupt</td><td>: Supported</td></tr><tr><td>35</td><td>Error log</td><td>: Supported</td><td>43</td><td>Hardware Monitor Input String</td><td>: Not Supported</td></tr><tr><td>36</td><td>1-Wire Bus</td><td>: Not Supported</td><td>44</td><td>Ext-GPIO Pins Count</td><td>: 8 Pins</td></tr><tr><td>37</td><td>Wake by EC/BMC</td><td>: Supported</td><td>45</td><td colspan="2">Power-up/Runtime Watchdog support action setting : Not Supported</td></tr><tr><td>d</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>38</td><td>GPIO Alternate Function</td><td>: Not Supported</td><td>46</td><td>Switch BIOS immediately</td><td>: Supported</td></tr><tr><td>39</td><td>Soft Fan</td><td>: Supported</td><td></td><td></td><td></td></tr></table>

# 4.1.2.4. Voltage Monitor

Note: Some voltage readings may be unsupported, as this functionality is board-specific. Refer to the BIOS to determine the supported voltages

# CPU Core Voltage (mV)

```shell
$ sudo semautil /d get_value 7
```
adlink@adlink-Default-string:\~\$ sudo semautil /d get\_value 7

```txt
CPU Core Voltage: 701 mV
```

2.5V Voltage (mV)
```shell
$ sudo semautil /d get_value 8
```

3.3V Voltage (mV)
```shell
$ sudo semautil /d get_value 9
```

```batch
adlink@adlink-Default-string:~$ sudo semautil /d get_value 9
```

```txt
3.3V Voltage: 3362 mV
```

Battery Voltage (mV)
```txt
$ sudo semautil /d get_value 10
```

```txt
adlink@adlink-Default-string:~$ sudo semautil /d get_value 10
```

```txt
Battery Voltage: 3027 mV
```

5V Voltage (mV)
```txt
$ sudo semautil /d get_value 11
```

```txt
adlink@adlink-Default-string:~$ sudo semautil /d get_value 11
```

```txt
5V Voltage: 5183 mV
```

5V Standby Voltage (mV)
```txt
$ sudo semautil /d get_value 12
```

```txt
adlink@adlink-Default-string:~$ sudo semautil /d get_value 12
```

```txt
5V Standby Voltage: 5183 mV
```

12V Voltage (mV)
```txt
$ sudo semautil /d get_value 13
```

Main Power Current (mA)
```txt
$ sudo semautil /d get_value 26
```

```txt
adlink@adlink-Default-string:~$ sudo semautil /d get_value 26
```

```txt
Main power current: 459 mA
```

GFX Voltage (mV)
```txt
$ sudo semautil /d get_value 27
```

1.05V Voltage (mV)
```txt
$ sudo semautil /d get_value 28
```

1.5V Voltage (mV)
```txt
$ sudo semautil /d get_value 29
```

VIN Voltage (mV)
```txt
$ sudo semautil /d get_value 30
```

```txt
adlink@adlink-Default-string:~$ sudo semautil /d get_value 30
Vin Voltage: 12247 mV
```

IO Current (mA)
```txt
$ sudo semautil /d get_value 40
```

# 4.1.2.5. Temperature Monitor

CPU Temperature
```shell
$ sudo semautil /d get_value 5
```

```txt
adlink@adlink-Default-string:~$ sudo semautil /d get_value 5
CPU temperature: 3051 K (32 C)
```
Board Temperature

```shell
$ sudo semautil /d get_value 6
```

```txt
adlink@adlink-Default-string:~$ sudo semautil /d get_value 6
Board Temperature: 3011 K (28 C)
```

Minimum Board Temperature
```txt
$ sudo semautil /d get_value 20
```

```txt
adlink@adlink-Default-string:~$ sudo semautil /d get_value 20
Board minimum temperature: 2961 K (23 C)
```

Maximum Board Temperature
```txt
$ sudo semautil /d get_value 21
adlink@adlink-Default-string:~$ sudo semautil /d get_value 21
Board maximum temperature: 3211 K (48 C)
```

Startup Board Temperature
```txt
$ sudo semautil /d get_value 22
adlink@adlink-Default-string:~$ sudo semautil /d get_value 22
Board startup temperature: 3021 K (29 C)
```

Minimum CPU Temperature
```txt
$ sudo semautil /d get_value 23
adlink@adlink-Default-string:~$ sudo semautil /d get_value 23
CPU minimum temperature: 3031 K (30 C)
```

Maximum CPU Temperature
```txt
$ sudo semautil /d get_value 24
adlink@adlink-Default-string:~$ sudo semautil /d get_value 24
CPU maximum temperature: 3751 K (102 C)
```

Startup CPU Temperature
```txt
$ sudo semautil /d get_value 25
adlink@adlink-Default-string:~$ sudo semautil /d get_value 25
CPU startup temperature: 3161 K (43 C)
```

Note: Check bit 32 of Extended EC/BMC Capabilities for Board 2nd temperature support

Board 2nd Current Temperature [Check bit 32 of Extended EC/BMC Capabilities]
```txt
$ sudo semautil /d get_value 33
```

Board 2nd Minimum Temperature [Check bit 32 of Extended EC/BMC Capabilities]
```txt
$ sudo semautil /d get_value 34
```

Board 2nd Maximum Temperature [Check bit 32 of Extended EC/BMC Capabilities]
```txt
$ sudo semautil /d get_value 35
```

Board 2nd Startup Temperature [Check bit 32 of Extended EC/BMC Capabilities]
```txt
$ sudo semautil /d get_value 36
```

System Current Temperature
```txt
$ sudo semautil /d get_value 41
```

System Minimum Temperature
```txt
$ sudo semautil /d get_value 42
```

System Maximum Temperature
```txt
$ sudo semautil /d get_value 43
```

System Startup Temperature
```txt
$ sudo semautil /d get_value 44
```

# 4.1.2.6. Fan Speed Monitor

Refer bit 18, 19, 26 and 27 of EC/BMC Capabilities for the fans available.

CPU Fan Speed
```txt
$ sudo semautil /d get_value 14
```

```txt
adlink@adlink-Default-string:~$ sudo semautil /d get_value 14
CPU Fan speed: 3789 RPM
```

System Fan 1 Speed
```txt
$ sudo semautil /d get_value 15
```
System Fan 2 Speed

```txt
$ sudo semautil /d get_value 31
```

System Fan 3 Speed
```txt
$ sudo semautil /d get_value 32
```

# 4.1.3. Watchdog Control

SEMA supports runtime watchdog and power-up watchdog.

The Runtime Watchdog is used to recover from operating system hangs, application software hangs, or other system malfunctions. When the runtime watchdog timer expires, the EC/BMC triggers a system reset and automatically stops the runtime watchdog.

The Powerup Watchdog is used to handle system reset or boot failures. The reset cycle is repeated until the system successfully boots and the application services the watchdog.

```txt
$ sudo semautil /w
```

adlink@adlink-Default-string:\~\$ sudo semautil /w
```txt
- Watch Dog:
1. semawtil /w get_cap
2. semawtil /w start [sec (0-65535)]
3. semawtil /w trigger
4. semawtil /w stop
5. semawtil /w pwrup_enable [sec (60-65535)]
Note:
Start time will be different for the different platforms.
Please go to BIOS menu to check it
6. semawtil /w pwrup_disable
```

# 4.1.3.1. Runtime Watchdog

# Capabilities

Display the maximum supported values for event timeout, delay, and reset timeout.

```txt
$ sudo semautil /w get_cap
```

```yaml
adlink@adlink-Default-string:~$ sudo semautil /w get_cap
MaxEventTimeout : 0 seconds
MaxDelay : 0 seconds
MaxResetValue : 65535 seconds
```

# Enable

The system will reset after the specified number of seconds (timeout).

```txt
$ sudo semautil /w start [sec (1-65535)]
```

```txt
adlink@adlink-Default-string:~$ sudo semautil /w start 100
```

```txt
Run-time Watchdog Started with : 100 seconds
```

# Trigger

Refresh the runtime watchdog using the previously configured timeout value.

```txt
$ sudo semautil /w trigger
```

```txt
adlink@adlink-Default-string:~$ sudo semautil /w trigger Watchdog is triggered to previous number of seconds again
```

# Disable

Stop the runtime watchdog.

```txt
$ sudo semautil /w stop
```

```txt
adlink@adlink-Default-string:~$ sudo semautil /w stop
```

```txt
Watchdog Stopped Successfully
```

# 4.1.3.2. Powerup Watchdog

# Enable

Set the timeout value and restart the system to enable the power-up watchdog. The powerup watchdog will continue to reset the system until it is disabled by the application or BIOS.

Caution: The startup time varies by platform. Check the system boot time and configure the power-up watchdog accordingly. If the timeout is set too short, the system may continuously reset.

```txt
$ sudo semautil /w pwrup_enable [sec (60-65535)]
```

```txt
adlink@adlink-Default-string:~$ sudo semautil /w pwrup_enable 100
```

```txt
PowerUp Watchdog Started with : 100 seconds
```

# Disable

Stop the powerup watchdog.

```txt
$ sudo semautil /w pwrup_disable
```

```txt
adlink@adlink-Default-string:~$ sudo semautil /w pwrup_disable
```

```txt
Powerup Watchdog is disabled successfully
```

# 4.1.4. Storage Access

This section describes the commands for managing the on-board EEPROM storage (Eg:

EEPROM type: Microchip AT25256B) connected to the EC/BMC Users can read from and write to the user flash memory region of the EEPROM.

SEMA supports three storage regions: User, Secure, and ODM.

# User Region (1024 bytes)

• Intended for general user data storage.
• Accessible without restrictions.
• This region cannot be locked or protected.

# Secure Region (2048 bytes)

Reserved for secure data.
• Read and write access is restricted and requires a passcode to unlock.

# ODM Region (1024 bytes)

Contains manufacturer-defined information such as hardware revision, board serial number, last repair date, manufacturing date, MAC addresses, UUID, and other boardspecific data.
• Intended primarily for manufacturer use and not for customer access.
• Data in this region can be read without restrictions; however, write access requires passcode authentication.
• The reserved portion (0x0E00–0x0FFF) is allocated for internal use and must not be modified.

Note: Customers should use the User region to store their data.

<table><tr><td>Region</td><td>Address range</td><td>Base address</td><td>Valid Address to Read/Write</td><td>Block size</td></tr><tr><td>1-User</td><td>0x0000 to 0x03FF (1KB)</td><td>0x0000</td><td>0 to 1020</td><td>4</td></tr><tr><td>2-Secure</td><td>0x6000 to 0x67FF (2KB)</td><td>0x6000</td><td>0 to 2044</td><td>4</td></tr><tr><td>3-ODM</td><td>0x0C00 to 0x0FFF (1KB)</td><td>0x0C00</td><td>0 to 1020</td><td>4</td></tr></table>

```txt
$ sudo semautil /s
```

idlink@adlink-Default-string:\~\$ sudo semautil /s
```txt
Storage:
1. semawtil /s get_cap [Region]
2. semawtil /s read [Region] [Address] [Length]
3. semawtil /s write [Region] [Address] [string/value]
4. semawtil /s hex_write [Region] [Address] [value]
5. semawtil /s hex_read [Region] [Address] [Length]
6. semawtil /s lock [Region]
7. semawtil /s unlock [Region] [Permission] [passcode]
8. semawtil /s odm_write [ODM Id] [string/value]

Region:
1.User
2.Secure
3.ODM

Permission:
1.Read only
2.Read/Write

ODM Id:
1.Hardware Revision
2.Serial Number
3.Last Repair date
4.Manufacturing date
5.2nd Hardware Revision
6.2nd Serial Number
7.MAC Id
8.MAC Id 2

Note : Unlock the ODM region to perform odm_write operation
hex_write operation should be provided as below
Example: semawtil /s hex_write 1 128 aa bb c d
```

# 4.1.4.1. Capabilities

Display the storage size and block size of the selected region

```txt
$ sudo semautil /s get_cap [Region]
```

```txt
adlink@adlink-Default-string:~$ sudo semautil /s get_cap 1
Storage Capabilities:
Storage Size: 1024 bytes
Block Length: 4 bytes
adlink@adlink-Default-string:~$ sudo semautil /s get_cap 2
Storage Capabilities:
Storage Size: 2048 bytes
Block Length: 4 bytes
adlink@adlink-Default-string:~$ sudo semautil /s get_cap 3
Storage Capabilities:
Storage Size: 1024 bytes
Block Length: 4 bytes
```

# 4.1.4.2. User Region

# String Write Operation

```powershell
$ sudo semautil /s write [Region] [Address] [string/value]
```

```txt
adlink@adlink-Default-string:~$ sudo semautil /s write 1 00 accd Data Written Successfully
```

# String Read Operation

```txt
$ sudo semautil /s read [Region] [Address] [Length]
```

```txt
adlink@adlink-Default-string:~$ sudo semautil /s read 1 00 4
Read Buffer: accd
```

# Hex Write Operation [Supported Only for EC Boards]

To write a hexadecimal value to the specified address

```powershell
$ sudo semautil /s hex_write [Region] [Address] [Value]
```

```txt
adlink@adlink-Default-string:~$ sudo semautil /s hex_write 1 00 AA BB CC DD 4 Bytes Written Successfully
```

# Hex Read Operation [Supported Only for EC Boards]

To read a hexadecimal value from the specified address

```txt
$ sudo semautil /s hex_read [Region] [Address] [Length]
```

```batch
adlink@adlink-Default-string:~$ sudo semautil /s hex_read 1 00 4
Read Buffer : 0xAA 0xBB 0xCC 0xDD
```

# 4.1.4.3. Secure and ODM Regions [Not for customer use]

The secure and ODM regions can be accessed using

# Lock

To make the Secure region read/write protected or ODM region write protected

```txt
$ sudo semautil /s lock [Region]
```

# Unlock

The passcode must be used to gain read/write access to the Secure and ODM regions to perform String Write Operation, String Read Operation, Hex Write Operation [Supported Only for EC Boards] and Hex Read Operation [Supported Only for EC Boards]

```powershell
$ sudo semautil /s unlock [Region] [Permission] [Passcode]
```

# ODM Write [Supported Only for EC Boards]

The following system and manufacturer details [ODM details] can be changed using this command:

1. Hardware Revision
2. Serial Number
3. Last Repair date
4. Manufacturing date
5. 2nd Hardware Revision
6. 2nd Serial Number
7. MAC Id
8. MAC Id 2

```txt
$ sudo semautil /s odm_write [ODM Id] [string/value]
```

```txt
adlink@adlink-Default-string:~$ sudo semautil /s odm_write 1 A0 Data Written Successfully
```

The written string or value can be viewed using the following

```txt
$ sudo semautil /i get_bd_info [EAPI Id]
```

# 4.1.5. Voltage Monitor

Note: Some voltage readings may be unsupported, as this functionality is board-specific.

Refer to the BIOS to determine the supported voltages.

```txt
$ semautil /v
```

```txt
adlink@adlink-Default-string:~$ sudo semautil /v
```

```css
- Voltage monitor:
```

```txt
1. semautil /v get_voltage_cap
2. semautil /v get_voltage [Channel (0-15)]
```

# 4.1.5.1. Capability

```txt
$ semautil /v get_voltage_cap
```

```txt
adlink@adlink-Default-string:~$ sudo semautil /v get_voltage_cap
```

```txt
Voltage monitor is compatible for this platform
```

# 4.1.5.2. Voltage Values

```powershell
$ semautil /v get_voltage [Channel (0-15)]
```

```yaml
adlink@adlink-Default-string:~$ sudo semautil /v get_voltage 0
Voltage: 3027 mv
Description: RTC
adlink@adlink-Default-string:~$ sudo semautil /v get_voltage 1
Voltage: 5183 mv
Description: 5VSB
adlink@adlink-Default-string:~$ sudo semautil /v get_voltage 2
Voltage: 12285 mv
Description: VIN
adlink@adlink-Default-string:~$ sudo semautil /v get_voltage 3
Voltage: 3362 mv
Description: 3.3V
adlink@adlink-Default-string:~$ sudo semautil /v get_voltage 4
Voltage: 1088 mv
Description: VMEM
adlink@adlink-Default-string:~$ sudo semautil /v get_voltage 5
Voltage: 3365 mv
Description: 3.3VSB
adlink@adlink-Default-string:~$ sudo semautil /v get_voltage 6
Voltage: 763 mv
Description: VCORE
adlink@adlink-Default-string:~$ sudo semautil /v get_voltage 7
Current: 624 mA
Description: Current Input Current
```

4.1.6. GPIO Control
```txt
$ sudo semautil /g
```

```yaml
adlink@adlink-Default-string:~$ sudo semautil /g
- GPIO:
1. semautil /g get_direction_cap [ID]
2. semautil /g get_direction [GPIO Bit]
3. semautil /g set_direction [GPIO Bit] [0 - Output or 1 - Input]
4. semautil /g get_level [GPIO Bit]
5. semautil /g set_level [GPIO Bit] [0 - Low or 1 - High]
    GPIO set/write parameters:
    GPIO Bit 1-16
Note: GPIO access may not be available on all platforms
```
4.1.6.1. Capabilities

```txt
$ sudo semautil /g get_direction_cap
```

```batch
adlink@adlink-Default-string:~$ sudo semautil /g get_direction_cap 1
Input/Output supported for GPIO 1
```

# 4.1.6.2. GPIO Direction Control

To configure the direction of the GPIO pin as Input or output.

Read Direction
```shell
$ sudo semautil /g get_direction [GPIO Bit]
```

```makefile
adlink@adlink-Default-string:~$ sudo semautil /g get_direction 1
Direction : Input
```

Set Direction
```txt
$ sudo semautil /g set_direction [GPIO Bit] [0-Output | 1-Input]
```

```txt
adlink@adlink-Default-string:~$ sudo semautil /g set_direction 1 0
Direction updated successfully
```

# 4.1.6.3. GPIO Level Control

To configure the level of the output GPIO pin as High or Low.

Read Level
```shell
$ sudo semautil /g get_level [GPIO Bit]
```

```txt
adlink@adlink-Default-string:~$ sudo semautil /g get_level 1
Level: High
```
Set Level

```txt
$ sudo semautil /g set_level [GPIO Bit] [0-Low | 1-High]
```

```txt
adlink@adlink-Default-string:~$ sudo semautil /g set_level 1 1
GPIO Level updated successfully
```

# 4.1.7. Generic I2C Access [Supported only for EC boards]

\$ sudo semautil /i2c
```txt
adlink@adlink-Default-string:~$ sudo semautil /i2c
- Generic I2C Read/Write:
    1. semautil /i2c bus_cap
    2. semautil /i2c probe_device [bus id]
    3. semautil /i2c write_raw [bus id] [address] [wr length] [cmd] byte0 byte1 .
..
    4. semautil /i2c read_raw [bus id] [address] [cmd] [re length]
    5. semautil /i2c raw_xfer [bus id] [address] [wr length] [rd length] byte0 byte1 byte2...
    6. semautil /i2c read_xfer [bus id] [address] [cmd type] [cmd] [read lentgh]
    7. semautil /i2c write_xfer [bus id] [address] [cmd type] [cmd] [length] byte0 byte1 byte2 ...
    8. semautil /i2c get_status
[Bus Id]:
    ID SEMA EAPI ID Description
    1 EAPI_ID_I2C_EXTERNAL_1 Baseboard I2C Interface 1
    2 EAPI_ID_I2C_EXTERNAL_2 Baseboard I2C Interface 2
    3 EAPI_ID_I2C_EXTERNAL_3 Baseboard I2C Interface 3
    4 EAPI_ID_I2C_EXTERNAL_4 Baseboard I2C Interface 4
[Command type]:
    ID ENCODED_CMD ID Description
    1 EAPI_I2C_NO_CMD Specify no command/index is used
    2 EAPI_I2C_ENC_STD_CMD Extended standard 8 bits CMD
    3 EAPI_I2C_ENC_EXT_CMD Extended standard 16 bits CMD
adlink@adlink-Default-string:~$
```

# 4.1.7.1. Capabilities

To display the I2C buses supported by the board along with their maximum read and write sizes.

\$ sudo semautil /i2c bus\_cap
```txt
adlink@adlink-Default-string: ~$ sudo semautil /i2c bus_cap
EAPI_ID_I2C_EXTERNAL_1 is supported. maximum read size is 32 bytes, and maxim
um write size is 29 bytes.
EAPI_ID_I2C_EXTERNAL_2 is supported. maximum read size is 32 bytes, and maxim
um write size is 29 bytes.
EAPI_ID_I2C_EXTERNAL_3 is supported. maximum read size is 32 bytes, and maxim
um write size is 29 bytes.
EAPI_ID_I2C_EXTERNAL_4 is supported. maximum read size is 32 bytes, and maxim
um write size is 29 bytes.
```

# 4.1.7.2. Device Probe

To display the list of slave addresses connected to the specified I2C bus.

```txt
$ sudo semautil /i2c probe_device [bus id]
```

```shell
adlink@adlink-Default-string:~$ sudo semautil /i2c probe_device 4
Slave list in EAPI_ID_I2C_EXTERNAL_4 bus:
01. 20
02. 21
03. 49
04. 50
05. 52
```

# 4.1.7.3. Transfer Functions

To perform separate read and write transactions

# Read Transfer

```txt
$ sudo semautil /i2c read_xfer [bus id] [address] [cmd type] [cmd/offset] [read length]
```

```txt
adlink@adlink-Default-string:~$ sudo semautil /i2c read_xfer 4 50 2 00 4
Read data:
00 : 09
01 : 09
02 : 09
03 : 09
```

# Write Transfer

```txt
$ sudo semautil /i2c write_xfer [bus id] [address] [cmd type] [cmd/offset] [write length] byte0 byte1 ...
```

```txt
adlink@adlink-Default-string:~$ sudo semautil /i2c write_xfer 4 50 2 00 4 9 9 9 9
The I2C Write Transfer command is completed
```

# 4.1.7.4. Raw Functions

The write\_raw, read\_raw, and raw\_xfer commands are used for combined write/read transactions that utilize the I2C repeated-start feature.

Read Raw
```txt
$ sudo semautil /i2c read_raw [bus id] [address] [cmd/offset] [read length]
```

```txt
adlink@adlink-Default-string:~$ sudo semautil /i2c read_raw 4 50 00 4
Read data:
00 : 01
01 : 02
02 : 03
03 : 04
```

# Write Raw

When specifying the write length, include the offset. For example, to write 4 bytes of data, the total write length should be 5 bytes.

```txt
$ sudo semautil /i2c write_raw [bus id] [address] [write length] [cmd/offset] byte0 byte1 ...
```

```txt
adlink@adlink-Default-string:~$ sudo semautil /i2c write_raw 4 50 5 00 1 2 3 4
Data Written Successfully
```

# 4.2.7.5. Raw Transfer

The raw\_xfer command performs the same combined write/read operation as write\_raw and read\_raw, but in a single command.

```txt
$ sudo semautil /i2c raw_xfer [bus id] [address] [write length] [read_length] [cmd/offset] byte0 byte1 ...
```

Read
```txt
adlink@adlink-Default-string:~$ sudo semautil /i2c raw_xfer 4 50 1 4 00
Read data:
00 : 01
01 : 02
02 : 03
03 : 04
```

Write
```txt
adlink@adlink-Default-string:~$ sudo semautil /i2c raw_xfer 4 50 5 00 00 1 2 3 4
Data Written Successfully
```

# 4.1.8. Error log Description

Note: Error log functionality is supported only on certain boards, refer bit 35 of Extended EC/BMC Capabilities.

```txt
$ sudo semautil /e
```

```txt
adlink@adlink-Default-string:~$ sudo semautil /e
- Error log:
1. semautil /e get_error_log [Position(0-31)]
2. semautil /e get_cur_error_log
3. semautil /e get_bmc_error_code [Error Number]
```

# 4.1.8.1. Error Log

# Current Error Log

```txt
$ sudo semautil /e get_cur_error_log
```

```yaml
adlink@adlink-Default-string:~$ sudo semautil /e get_cur_error_log
ErrorNumber: 655
Flags: 0x55
RestartEvent: 0x70
PowerCycle: 495
BootCount: 780
Time: 60
TotalOnTime: 155211
BIOS Sel: 3
Status: 0x55
CPUTemp: 36
BoardTemp: 31
```

# Error Log of the Position

Position 0 contains the most recent error log entry.

```txt
$ sudo semautil /e get_error_log [Position (0-31)]
```

```yaml
adlink@adlink-Default-string:~$ sudo semautil /e get_error_log 1
ErrorNumber: 654
Flags: 0x55
RestartEvent: 0x70
PowerCycle: 495
BootCount: 780
Time: 60
TotalOnTime: 155211
Bios Sel: 3
Status: 0x55
CPUTemp: 36
BoardTemp: 31
```

# 4.1.8.2. BMC Error Code

To get the BMC Error code description of the provided Error number

```tcl
$ semautil /e get_bmc_error_code [Error number]
```

```txt
adlink@adlink-Default-string:~$ sudo semautil /e get_bmc_error_code 655
NO_SLP_S3
```

# 4.1.9. BIOS Information

```txt
adlink@adlink-Default-string:~$ sudo semautil /src
- Get BIOS Source:
1. semautil /src get_src
2. semautil /src set_src value[0-3]
3. semautil /src get_bios_status
Value :
0 - By hardware configuration of currently selected BIOS
1 - Switch to Fail-Safe BIOS
2 - Switch to External BIOS (SPI0 on carrier)
3 - Switch to Internal BIOS (SPI0 on module)
BIOS select status information.
Bit2 Bit1 Bit0
0 0 0 - Module SPI0/ Carrier SPI1 (Standard BIOS)
0 0 1 - Carrier SPI0/ Module SPI1 (Fail - Safe BIOS)
0 1 0 - Unknown
0 1 1 - Module SPI0/Module SPI1 (Standard BIOS)
1 0 0 - Unknown
1 0 1 - Switch to Fail-Safe BIOS
1 1 0 - Switch to External BIOS
1 1 1 - Switch to Internal BIOS
If Bit 2 is OFF : PICMG BIOS selected
If Bit 2 is ON : Dual BIOS selected
adlink@adlink-Default-string:~$
```

# 4.1.9.1. BIOS selection status

Display the type of BIOS selected as PICMG BIOS or Dual BIOS and the state of external hardware jumper control signals.

```shell
$ sudo semautil /src get_bios_status
```

```txt
adlink@adlink-Default-string:~$ sudo semautil /src get_bios_status
PICMG BIOS selected
0 1 1 - Module SPI0/Module SPI1 (Standard BIOS)
```

# 4.1.9.2. BIOS Boot Source Configuration

Set BIOS Boot Source mode

```txt
$ sudo semautil /src set_src value[0-3]
```

```txt
adlink@adlink-Default-string:~$ sudo semautil /src set_src 2
Bios boot source mode set successfully
```

Read BIOS Boot Source mode
```txt
$ sudo semautil /src get_src
```

```txt
adlink@adlink-Default-string:~$ sudo semautil /src get_src 2 - Switch to External BIOS(SPI0 on carrier)
```

4.1.10. UUID [Type 4]
```txt
$ semautil /c
```

```txt
adlink@adlink-Default-string:~$ sudo semautil /c
- UUID :
1. semautil /c guid_generate_write
2. semautil /c guid_read
```

4.1.10.1. Write New UUIDv4
```shell
$ sudo semautil /c guid_generate_write
```

```txt
adlink@adlink-Default-string:~$ sudo semautil /c guid_generate_write
Generated UUIDv4: e3565444-9996-4e90-8ac2-35bde0b1ef11
Bytes Written Successfully
adlink@adlink-Default-string:~$
```

4.1.10.2. Read UUIDv4
```txt
$ semautil /c guid_read
```

```asm
adlink@adlink-Default-string:~$ sudo semautil /c guid_read
Read Buffer : 0xE3 0x56 0x54 0x44 0x99 0x96 0x4E 0x90 0x8A 0xC2 0x35 0xBD 0xE0
0xB1 0xEF 0x11
adlink@adlink-Default-string:~$
```

# 4.1.11. Smart Fan Control

This functionality is used to control the fan connected to the CPU or system.

Each fan controller supports 4 temperature trigger levels, each associated with a corresponding PWM value. Whenever a temperature trigger level is crossed, the fan speed is adjusted based on the configured PWM value for that level.

Note: Fan control functionality is supported only on certain boards, refer bit 18, 19, 26 and 27 of EC/BMC Capabilities for the fans available.

\$ sudo semautil /f
```txt
adlink@adlink-Default-string:~$ sudo semautil /f
Wrong arguments
- Smart FAN control:
1. semautil /f set_temp_points [FanID] [Level1] [Level2] [Level3] [Level4]
2. semautil /f set_pwm_points [FanID] [PWMLevel1] [PWMLevel2] [PWMLevel3] [PWMlevel4]
3. semautil /f get_temp_points [FanID]
4. semautil /f get_pwm_points [FanID]
5. semautil /f set_temp_source [FanID] [TempSrc]
6. semautil /f get_temp_source [FanID]
7. semautil /f get_mode [FanID]
8. semautil /f set_mode [FanID] [Mode]

FanID
0:CPU fan
1:System fan 1

Mode
0:Auto
1:Off
2:On
3:Soft

TempSrc
0-CPU sensor
1-Board sensor
```

# 4.1.11.1. Temperature Set Points

Describes the temperature trigger level corresponding to the percentage of PWM trigger level (Maximum temperature set point = 100).

# Set Temperature Trigger Levels

```tcl
$ sudo semautil /f set_temp_points [FanID] [Level1] [Level2] [Level3] [Level4]
```

```txt
adlink@adlink-Default-string:~$ sudo semautil /f set_temp_points 0 20 40 50 60 Temperature levels set successfully
```

# Read Temperature Trigger Levels

```shell
$ sudo semautil /f get_temp_points [FanID]
```

```yaml
adlink@adlink-Default-string:~$ sudo semautil /f get_temp_points 0
Fan ID: 0 (CPU fan)
Level1: 20
Level2: 40
Level3: 50
```

# 4.1.11.2. Temperature Source

Describes which temperature sensor will be used for calculating the PWM level of the selected fan.

• The temperature source for the CPU fan can be set to either the CPU sensor or the board sensor.
• The temperature source for System Fan 1 can be set to either the CPU sensor or the carrier sensor.

Set Temperature Source
```tcl
$ sudo semautil /f set_temp_source [FanID] [TempSrc]
```

```txt
adlink@adlink-Default-string:~$ sudo semautil /f set_temp_source 0 1 Temperature source is set to Baseboard sensor
```
Read Temperature Source

```shell
$ sudo semautil /f get_temp_source [FanID]
```

```txt
adlink@adlink-Default-string:~$ sudo semautil /f get_temp_source 0
Current Temperature source is Baseboard sensor
```

# 4.1.11.3. PWM Set Points

Describes the percentage of PWM trigger level corresponding to the temperature trigger level (Maximum PWM set point = 100).

Set PWM Trigger level
```txt
$ sudo semautil /f set_pwm_points [FanID] [PWMLevel1] [PWMLevel2] [PWMLevel3] [PWMLevel4]
```

```txt
adlink@adlink-Default-string:~$ sudo semautil /f set_pwm_points 0 100 100 100 100 PWM levels set successfully
```

Read Temperature Trigger Levels
```txt
$ sudo semautil /f get_pwm_points [FanID]
```

```txt
adlink@adlink-Default-string:~$ sudo semautil /f get_pwm_points 0
Fan ID: 0 (CPU fan)
Level1: 100
Level2: 100
Level3: 100
Level4: 100
```

# 4.1.11.4. Fan Mode

SEMA supports 4 fan modes.

• Auto – the fan will be automatically controlled using the Trigger Settings described
• Off – the fan is turned off completely
On – the fan runs at maximum RPM (PWM level 100%)
Soft – Auto mode with PWM Level Interpolation (i.e.) The PWM level is not adapted stepwise, but continuously.

# Set Fan Mode

```shell
$ sudo semautil /f set_mode [FanID] [Mode]
```

```txt
adlink@adlink-Default-string:~$ sudo semautil /f set_mode 0 1
FAN mode set successfully
```

# Read Fan Mode

```shell
$ sudo semautil /f get_mode [FanID]
```

```txt
adlink@adlink-Default-string:~$ sudo semautil /f get_mode 0
Fan id: 0 (CPU fan)
Fan Mode: 2(On)
```

# 4.1.12. Backlight Control

To control the LVDS backlight panel connected to the EC/BMC.

Note: Backlight control is supported only on certain boards, refer bit 8 of EC/BMC Capabilities.

```txt
$ sudo semautil /b
```

# Test Environment

Module: LEC-EL

OS: RHEL 9

Display unit: LVDS-FBT050-30-070004

# 4.1.12.1. LVDS Panel Status Control

# Enable/Disable the Backlight Panel

```txt
$ sudo semautil /b set_bkl_enable [ID] [0 - Disable | 1 - Enable]
```

```txt
[root@localhost Unified_SEMA_Test]# semautil /b set_bkl_enable 0 0 Backlight OFF
```

# Read the Backlight Panel Status

Display the ON/OFF status of the selected panel.

```txt
$ sudo semautil /b get_bkl_enable [ID]
```

```txt
[root@localhost Unified_SEMA_Test]# semautil /b get_bkl_enable 0 Backlight ON
```

# 4.1.12.2. LVDS Panel Brightness Control

# Set Brightness

Set the backlight brightness (PWM) level of the specified panel. Maximum PWM level – 255

```txt
$ sudo semautil /b set_bkl_value [ID] [Level (0-255)]
```

```txt
[root@localhost Unified_SEMA_Test]# semautil /b set_bkl_value 0 50
Current Backlight Brightness is set to 50
```

# Read Brightness

Display the brightness PWM level

```ruby
$ sudo semautil /b get_bkl_value [ID]
```

```txt
[root@localhost Unified_SEMA_Test]# semautil /b get_bkl_value 0
Current Backlight Brightness is 200
```

# 4.1.13. Exception Description

Displays the exception codes returned by EC/BMC flags.

```txt
$ sudo semautil /x get_excep_desc
```

```shell
adlink@adlink-Default-string:~$ sudo semautil /x get_excep_desc
0 -> NOERROR
2 -> NO_SUSCLK
3 -> NO_SLP_S5
4 -> NO_SLP_S4
5 -> NO_SLP_S3
6 -> BIOS_FAIL
7 -> RESET_FAIL
8 -> RESETIN_FAIL
9 -> NO_CB_PWROK
10 -> CRITICAL_TEMP
11 -> POWER_FAIL
12 -> VOLTAGE_FAIL
13 -> RSMRST_FAIL
14 -> NO_VDDQ_PG
15 -> NO_V1P05A_PG
16 -> NO_VCORE_PG
17 -> NO_SYS_GD
18 -> NO_V5SBY
19 -> NO_V3P3A
20 -> NO_V5_DUAL
21 -> NO_PWRSRC_GD
22 -> NO_P_5V_3V3_S0_PG
23 -> NO_SAME_CHANNEL
24 -> NO_PCH_PG
```

# 4.1.14. SMBus Access

This functionality is supported for both EC and BMC-based boards.

To identify the devices connected to the SMBus of the hardware, refer to the hardware user manual.

```txt
$ sudo semautil /smb
```

```txt
adlink@adlink-Default-string:~$ sudo semautil /smb
- Direct access to devices connected to the PCH SMBus:
1. semautil /smb write_byte [address] [Cmd] byte
2. semautil /smb read_byte [address] [Cmd]
3. semautil /smb write_word [address] [Cmd] byte0 byte1
4. semautil /smb read_word [address] [Cmd]
```

# Test Environment

Module: cExpress-AL

OS: Ubuntu 20.04 (Kernel 5.15)

According cExpress-AL user manual, the Extended GPIO is connected at SMBus address 0x40 (8-bit address).

# 4.1.14.1. Read Operations

# Read Byte

To read 1 byte of data from the SMBus device

```tcl
$ sudo semautil /smb read_byte [Addr] [Cmd]
```

[Addr] - 7-bit SMBus slave address

[Cmd] - SMBus command

```txt
adlink@adlink-Express-TL:~$ sudo semautil /smb read_byte 20 0x06
Read Data: cc
```

# Read Word

To read 1 word (2 bytes) of data from the SMBus device

```tcl
$ sudo semautil /smb read_word [Addr] [Cmd]
```

```txt
adlink@adlink-Express-TL:~$ sudo semautil /smb read_word 20 0x06
Read data:
00 : 11
01 : 99
```

# 4.1.14.2. Write Operations

# Write Byte

To write 1 byte of hexadecimal data to SMBus Device

```txt
$ sudo semautil /smb write_byte [Addr] [Cmd] [Data]
adlink@adlink-Express-TL:~$ sudo semautil /smb write_byte 20 0x06 cc
The SMBUS Write Byte Transfer command is completed
```

# Write Word

To write 1 word (2 bytes) of hexadecimal data to the SMBus device

```tcl
$ sudo semautil /smb write_word [Addr] [Cmd] [Data]
```

```txt
adlink@adlink-Express-TL:~$ sudo semautil /smb write_word 20 0x06 11 99
The SMBUS Write Word Transfer command is completed
```

To get the EAPI usage, refer to the SEMA EAPI Guide attached in the below link

Link: Technical Resources | ADLINK

# 4.2. For Windows Platform

To utilize the SEMA command line interface, access the Windows command terminal.

# Test Environment:

Module: Express-ADP [Base: Express Base 6]

BIOS Version: 1.07.10

Firmware version: ADLINK 00A

OS: Windows 11 Home 24H2 x64

# SEMA Utility Version

```txt
$ semautil version
```

```batch
C:\Users\Adlink>semautil version
```

```txt
SEMA Version : ADLINK-SEMA-EC/BMC-WINDOWS-V4_R2_15_25_09_03
```

# Help Menu

\$ semautil /h
```yaml
C:\Users\Adlink>semautil /h
Usage:
- Display this screen:
    semautil /h
- Version:
    semautil version for more help related to SEMA version
- System monitor-Board Info:
    semautil /i    for more help related to system monitor-board information functions
- Board values:
    semautil /d    for more help related to board values functions
- Watch Dog:
    semautil /w    for more help related to watchdog functions
- Storage:
    semautil /s    for more help related to storage functions
- Voltage monitor:
    semautil /v    for more help related to voltage monitor functions
- GPIO:
    semautil /g    for more help related to GPIO functions
- Generic I2C Read/Write:
    semautil /i2c    for more help related to generic I2C read/write functions
- Error log:
    semautil /e    for more help related to error log functions
- BIOS source:
    semautil /src    for more help related to BIOS source functions
```

# 4.2.1. Board Information

Allows the users to query essential system and manufacturer details for diagnostic and inventory purposes.

```txt
$ semautil /i get_bd_info [EAPI ID]
```

C:\Users\Adlink>semautil /i
```yaml
- System monitor-Board Info:
1. semautil /i get_bd_info [EApi ID]
1 : Board manufacturer name
2 : Board name
3 : Board serial number
4 : Board BIOS revision
5 : HW revision
6 : Board platform type
7 : BMC Bootloader revision
8 : BMC application revision
9 : Board restart event
10 : Board repair date
11 : Board manufacturer date
12 : Board MAC address 1
13 : Board MAC address 2
14 : Board 2nd HW revision number
15 : Board 2nd serial
```

<table><tr><td>EAPI ID</td><td>Data</td></tr><tr><td>1</td><td>Board Manufacturer Name</td></tr><tr><td>2</td><td>Board Name</td></tr><tr><td>3</td><td>Board Serial Number</td></tr><tr><td>4</td><td>Board BIOS Revision</td></tr><tr><td>5</td><td>Hardware Revision</td></tr><tr><td>6</td><td>Board Platform Type</td></tr><tr><td>7</td><td>BMC Bootloader Revision</td></tr><tr><td>8</td><td>Application Revision/Firmware Revision</td></tr><tr><td>9</td><td>Board Restart Event</td></tr><tr><td>10</td><td>Board Repair Date</td></tr><tr><td>11</td><td>Board Manufacturing Date</td></tr><tr><td>12</td><td>Board MAC Address 1</td></tr><tr><td>13</td><td>Board MAC Address 2</td></tr><tr><td>14</td><td>Board Secondary Hardware Revision</td></tr><tr><td>15</td><td>Board Secondary Serial Number</td></tr></table>

# 4.2.1.1. System Information

# Board Name

```txt
$ semautil /i get_bd_info 2
C:\Users\Adlink>semautil /i get_bd_info 2
Board name: COMHPC-sIDH
```

# Board Serial Number

```batch
$ semautil /i get_bd_info 3
C:\Users\Adlink>semautil /i get_bd_info 3
Board serial number: QWEOJP
```

# Board BIOS Revision

```batch
$ semautil /i get_bd_info 4
C:\Users\Adlink>semautil /i get_bd_info 4
Board BIOS revision: 1.07.10
```

# Hardware Revision

```txt
$ semautil /i get_bd_info 5
C:\Users\Adlink>semautil /i get_bd_info 5
HW revision: 123456789
```

# Board Platform Type

```batch
$ semautil /i get_bd_info 6
C:\Users\Adlink>semautil /i get_bd_info 6
Data: 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF
```

# BMC Bootloader Revision [Supported only for BMC boards]

Note: This screenshot was taken in MXE-210 board

```shell
$ semautil /i get_bd_info 7
```

```txt
C:\Users\ADLINK>semautil /i get_bd_info 7
BMC Bootloader revision: bl_MXE-210 4v0 Mar 31 2017 (c) ADLINK Technology Inc.
```

# Application Revision/Firmware Revision

```shell
$ semautil /i get_bd_info 8
```

```batch
C:\Users\Adlink>semautil /i get_bd_info 8
BMC application revision: ADLINK 014
```

# Board Restart Event

Indicates the cause of the last system restart.

```shell
$ semautil /i get_bd_info 9
```

```batch
C:\Users\Adlink>semautil /i get_bd_info 9
Board restart event: Software Reset
```

# Board MAC Address 1

```txt
$ semautil /i get_bd_info 12
```

```batch
C:\Users\Adlink>semautil /i get_bd_info 12
Board MAC address 1: 0987654321
```

# Board MAC Address 2

Note: This feature is supported only in EC boards

```txt
$ semautil /i get_bd_info 13
```

```batch
C:\Users\Adlink>semautil /i get_bd_info 13
Board MAC address 2: 003064123456
```

# Board Secondary Hardware Revision

Note: If a value has not been written to the ODM region, the data will consist of 16 bytes of 0xFF

```txt
$ semautil /i get_bd_info 14
```

```batch
C:\Users\Adlink>semautil /i get_bd_info 14
Data: 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF
```

# Board Secondary Serial Number

```txt
$ semautil /i get_bd_info 15
```

```batch
C:\Users\Adlink>semautil /i get_bd_info 15
Board 2nd serial number: 12345678
```

# 4.2.1.2. Manufacture Details

# Board Manufacturer Name

```shell
$ semautil /i get_bd_info 1
```

```txt
C:\Users\Adlink>semautil /i get_bd_info 1
Board manufacturer name: ADLINK Technology Inc.
```

# Board Last Repair Date

```txt
$ semautil /i get_bd_info 10
```

```batch
C:\Users\Adlink>semautil /i get_bd_info 10
Data: 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF
```

# Board Manufacturing Date

```txt
$ semautil /i get_bd_info 11
```

```batch
C:\Users\Adlink>semautil /i get_bd_info 11
Board manufacturer date: 04/08/2025
```

# 4.2.2. Board Values

Read the real-time system and hardware parameters [corresponds to a specific sensor reading or board metric]

```shell
$ semautil /d get_value [EAPI ID]
```
C:\Users\Adlink>semautil /d

- Board values:
```txt
1. semawtil /d get_value [EAPI ID]
1 : EAPI Specification Version
2 : Boot Counter
3 : Running Time Meter
4 : Vendor Specific Library Version
5 : CPU Temperature
6 : Board Temperature
7 : CPU Core Voltage
8 : 2.5V Voltage
9 : 3.3V Voltage
10 : Battery Voltage
11 : 5V Voltage
12 : 5V Standby Voltage
13 : 12V Voltage
14 : CPU Fan
15 : System Fan 1
16 : Get power uptime
17 : Get restart event
18 : Get BMC capabilities
19 : Get extended BMC capabilities
20 : Board Min Temperature
21 : Board Max Temperature
22 : Board Startup Temperature
23 : CPU Min Temperature
24 : CPU Max Temperature
25 : CPU Startup Temperature
26 : Get main power current
27 : GFX Voltage
28 : 1.05V Voltage
29 : 1.5V Voltage
30 : Vin Voltage
31 : System Fan 2
32 : System Fan 3
33 : Board 2nd Current Temperature
34 : Board 2nd Min temperature
35 : Board 2nd Max Temperature
36 : Board 2nd Startup Temperature
37 : Get Power cycle counter
38 : Get Board BMC Flag
39 : Get Board BMC Status
40 : IO current
41 : System Temperature
42 : System Min Temperature
43 : System Max Temperature
44 : System Startup Temperature
```

# 4.2.2.1. Dynamic Hardware Metrics / Runtime Statistics

# Boot Counter

Number of hardware/software reset and successful power-up.

```shell
$ semautil /d get_value 2
```

```batch
C:\Users\Adlink>semautil /d get_value 2
Boot counter: 5433
```

# Total On-Time (minutes)

Represents the total uptime of the system in minutes.

```shell
$ semautil /d get_value 3
```

```batch
C:\Users\Adlink>semautil /d get_value 3
Running Time Meter: 82471 minutes
```

# Power-On Uptime

Represents the uptime of the system since last boot in seconds

```txt
$ semautil /d get_value 16
```

```batch
C:\Users\Adlink>semautil /d get_value 16
Board powerup time: 1262 seconds
```

# Restart Event

Indicates the cause of the last system restart.

```txt
$ semautil /d get_value 17
```

```batch
C:\Users\Adlink>semautil /d get_value 17
Restart event: 0x20
```

# Board Power-Cycle Counter

Indicates how many times the external power supply has been shut down (including standby voltage).

```txt
$ semautil /d get_value 37
```

```batch
C:\Users\Adlink>semautil /d get_value 37
Power cycle counter: 6003
```

# Board BMC/EC Status Flags

Displays information about the internal status of the EC/BMC

```txt
$ semautil /d get_value 38
```

```txt
C:\Users\Adlink>semautil /d get_value 38
BMC Flag:
Exception code : NO ERROR
Mode : AT Mode
BIOS : Standard BIOS
```

# BMC status

This is not supported by EC boards.

Note: This screenshot was taken in MXE-210 board

```txt
$ semautil /d get_value 39
```

```batch
C:\Users\ADLINK>semautil /d get_value 39
Board BMC Status: 0x0
```

# 4.2.2.2. Software Details

# EAPI specification version

```shell
$ semautil /d get_value 1
```

```batch
C:\Users\Adlink>semautil /d get_value 1
EAPI Specification Version: 1.0.00
```

# Vendor-Specific Library Version

```shell
$ semautil /d get_value 4
```

```batch
C:\Users\Adlink>semautil /d get_value 4
SEMA Library Version : 4.2.15
```

# 4.2.2.3. Controller Capabilities (EC / BMC)

Lists the supported and unsupported features

# EC/BMC Capabilities

```txt
$ semautil /d get_value 18
```
C:\Users\Adlink>semautil /d get\_value 18

BMCcapabilities:

<table><tr><td>Bit</td><td>Capability</td><td>Status</td><td>Bit</td><td>Capability</td><td>Status</td></tr><tr><td>0</td><td>Uptime and Power Cycles</td><td>: Supported</td><td>16</td><td>I2C Bus 1</td><td>: Supported</td></tr><tr><td>1</td><td>System Restart Event</td><td>: Supported</td><td>17</td><td>I2C Bus 2</td><td>: Not Supported</td></tr><tr><td>2</td><td>User-Flash Size</td><td>: 1024 bytes (0x0000 to 0x03FF)</td><td>18</td><td>CPU Fan</td><td>: Supported</td></tr><tr><td>3</td><td>Runtime Watchdog</td><td>: Supported</td><td>19</td><td>System Fan 1</td><td>: Supported</td></tr><tr><td>4</td><td>Temperatures</td><td>: Supported</td><td>20</td><td>AT/ATX Mode</td><td>: Supported</td></tr><tr><td>5</td><td>Voltage Monitor</td><td>: Supported</td><td>21</td><td>ACPI Thermal Trigger</td><td>: Supported</td></tr><tr><td>6</td><td>Storage of failure reason</td><td>: Not Supported</td><td>22</td><td>Power-up to last state</td><td>: Supported</td></tr><tr><td>7</td><td>Bootloader timeout</td><td>: Not Supported</td><td>23</td><td>Backlight Restore</td><td>: Not Supported</td></tr><tr><td>8</td><td>Display Backlight control</td><td>: Not Supported</td><td>24</td><td>DTS Temperature</td><td>: Not Supported</td></tr><tr><td>9</td><td>Power-up Watchdog</td><td>: Supported</td><td>25</td><td>DTS Offset Registers</td><td>: Not Supported</td></tr><tr><td>10</td><td>Power Monitor (current sense)</td><td>: Supported</td><td>26</td><td>System Fan 2</td><td>: Not Supported</td></tr><tr><td>11</td><td>Boot counter</td><td>: Supported</td><td>27</td><td>System Fan 3</td><td>: Not Supported</td></tr><tr><td>12&amp;13</td><td>Input Voltage</td><td>: Not Supported</td><td>28</td><td>Ext-GPIO</td><td>: Supported</td></tr><tr><td></td><td></td><td></td><td>29</td><td>I2C Bus 3</td><td>: Supported</td></tr><tr><td>14</td><td>Rsense of Power Monitor</td><td>: Not Supported</td><td>30</td><td>I2C Bus 4</td><td>: Not Supported</td></tr><tr><td>15</td><td>Dual-BIOS</td><td>: Supported</td><td>31</td><td>BMC ID 0</td><td>: Other BMC</td></tr></table>

# Extended EC/BMC Capabilities

```txt
$ semautil /d get_value 19
```

C:\Users\Adlink>semautil /d get\_value 19

<table><tr><td colspan="6">Extended BMC capabilities:</td></tr><tr><td>Bit</td><td>Capability</td><td>Status</td><td>Bit</td><td>Capability</td><td>Status</td></tr><tr><td>32</td><td>Board 2 Temperature</td><td>: Not Supported</td><td>40</td><td>Parameter Memory</td><td>: Supported</td></tr><tr><td>33</td><td>PEC Protocol</td><td>: Not Supported</td><td>41</td><td>Extended I2C registers for Status</td><td>: Not Supported</td></tr><tr><td></td><td></td><td></td><td>42</td><td>Ext-GPIO Input Interrupt</td><td>: Supported</td></tr><tr><td>35</td><td>Error log</td><td>: Supported</td><td>43</td><td>Hardware Monitor Input String</td><td>: Not Supported</td></tr><tr><td>36</td><td>1-Wire Bus</td><td>: Not Supported</td><td>44</td><td>Ext-GPIO Pins Count</td><td>: 12 Pins</td></tr><tr><td>37</td><td>Wake by EC</td><td>: Supported</td><td>45</td><td>Power-up/Runtime Watchdog support action setting</td><td>: Not Supported</td></tr><tr><td>38</td><td>GPIO Alternate Function</td><td>: Not Supported</td><td>46</td><td>Switch BIOS immediately</td><td>: Supported</td></tr><tr><td>39</td><td>Soft Fan</td><td>: Supported</td><td></td><td></td><td></td></tr></table>

# 4.2.2.4. Voltage Monitor

Note: Some voltage readings may be unsupported, as this functionality is board-specific. Refer to the BIOS to determine the supported voltages

CPU Core Voltage (mV)
```txt
$ semawtil /d get_value 7
C:\Users\Adlink>semautil /d get_value 7
CPU Core Voltage: 1803 mV
```

2.5V Voltage (mV)
```shell
$ semautil /d get_value 8
$ semautil /d get_value 9
```

3.3V Voltage (mV)
```batch
C:\Users\Adlink>semautil /d get_value 9
3.3V Voltage: 3348 mV
```

Battery Voltage (mV)
```txt
$ semautil /d get_value 10
C:\Users\Adlink>semautil /d get_value 10
Battery Voltage: 2568 mV
```

5V Voltage (mV)
```txt
$ semautil /d get_value 11
C:\Users\Adlink>semautil /d get_value 11
Failed : Unsupported function.
```

5V Standby Voltage (mV)
```batch
$ semautil /d get_value 12
C:\Users\Adlink>semautil /d get_value 12
5V Standby Voltage: 4994 mV
```

12V Voltage (mV)
```txt
$ semautil /d get_value 13
```

Main Power Current (mA)
```batch
$ semautil /d get_value 26
C:\Users\Adlink>semautil /d get_value 26
Main power current: 4880 mA
```

GFX Voltage (mV)
```txt
$ semautil /d get_value 27
```

1.05V Voltage (mV)
```txt
$ semautil /d get_value 28
```

1.5V Voltage (mV)
```txt
$ semautil /d get_value 29
```

VIN Voltage (mV)
```txt
$ semautil /d get_value 30
```

```batch
C:\Users\Adlink>semautil /d get_value 30
Vin Voltage: 11956 mV
```

IO Current (mA)
```txt
$ semautil /d get_value 40
```

```batch
C:\Users\Adlink>semautil /d get_value 40
IO Current: 5598 mA
```

# 4.2.2.5. Temperature Monitor

# CPU Temperature

```shell
$ semautil /d get_value 5
```

```batch
C:\Users\Adlink>semautil /d get_value 5
CPU temperature: 3111 K (38 C)
```

# Board Temperature

```shell
$ semautil /d get_value 6
```

```batch
C:\Users\Adlink>semautil /d get_value 6
Board Temperature: 3131 K (40 C)
```

# Minimum Board Temperature

```txt
$ semautil /d get_value 20
```

```batch
C:\Users\Adlink>semautil /d get_value 20
Board minimum temperature: 2951 K (22 C)
```

# Maximum Board Temperature

```txt
$ semautil /d get_value 21
```

```batch
C:\Users\Adlink>semautil /d get_value 21
Board maximum temperature: 3211 K (48 C)
```

# Startup Board Temperature

```txt
$ semautil /d get_value 22
```

```batch
C:\Users\Adlink>semautil /d get_value 22
Board startup temperature: 3001 K (27 C)
```

Minimum CPU Temperature
```txt
$ semawtil /d get_value 23
C:\Users\Adlink>semautil /d get_value 23
CPU minimum temperature: 2971 K (24 C)
```

Maximum CPU Temperature
```txt
$ semawtil /d get_value 24
C:\Users\Adlink>semautil /d get_value 24
CPU maximum temperature: 3731 K (100 C)
```

Startup CPU Temperature
```txt
$ semawtil /d get_value 25
C:\Users\Adlink>semautil /d get_value 25
CPU startup temperature: 3091 K (36 C)
```

Note: Check bit 32 of Extended EC/BMC Capabilities for Board 2nd temperature support

Board 2nd Current Temperature [Check bit 32 of Extended EC/BMC Capabilities]

```txt
$ semautil /d get_value 33
```

Board 2nd Minimum Temperature [Check bit 32 of Extended EC/BMC Capabilities]

```txt
$ semautil /d get_value 34
```

Board 2nd Maximum Temperature [Check bit 32 of Extended EC/BMC Capabilities]

```txt
$ semautil /d get_value 35
```

Board 2nd Startup Temperature [Check bit 32 of Extended EC/BMC Capabilities]

```txt
$ semautil /d get_value 36
```

System Current Temperature
```powershell
$ semautil /d get_value 41
C:\Users\Adlink>semautil /d get_value 41
System temperature: 2731 K (0 C)
```

System Minimum Temperature
```powershell
$ semautil /d get_value 42
C:\Users\Adlink>semautil /d get_value 42
System Minimum temperature: 2731 K (0 C)
```

System Maximum Temperature
```powershell
$ semautil /d get_value 43
C:\Users\Adlink>semautil /d get_value 43
System Maximum temperature: 2731 K (0 C)
```

System Startup Temperature
```powershell
$ semawtil /d get_value 44
C:\Users\Adlink>semautil /d get_value 44
System Startup temperature: 2731 K (0 C)
```

# 4.2.2.6. Fan Speed Monitor

Refer bit 18, 19, 26 and 27 of EC/BMC Capabilities for the fans available.

CPU Fan Speed
```txt
$ semautil /d get_value 14
C:\Users\Adlink>semautil /d get_value 14
CPU Fan speed: 0 RPM
```

System Fan 1 Speed
```txt
$ semautil /d get_value 15
```

```batch
C:\Users\AdLink>semautil /d get_value 15
System Fan 1 speed: 0 RPM
```

System Fan 2 Speed
```txt
$ semautil /d get_value 31
```

System Fan 3 Speed
```txt
$ semautil /d get_value 32
```

# 4.2.3. Watchdog Control

SEMA supports runtime watchdog and power-up watchdog.

The Runtime Watchdog is used to recover from operating system hangs, application software hangs, or other system malfunctions. When the runtime watchdog timer expires, the EC/BMC triggers a system reset and automatically stops the runtime watchdog.

The Powerup Watchdog is used to handle system reset or boot failures. The reset cycle is repeated until the system successfully boots and the application services the watchdog.

```txt
$ semautil /w
```

```txt
C:\Users\Adlink>semautil /w
- Watch Dog:
1. semautil /w get_cap
2. semautil /w start [sec (1-65535)]
3. semautil /w trigger
4. semautil /w stop
5. semautil /w pwrup_enable [sec (60-65535)]
6. semautil /w pwrup_disable
Note: Start time will be different for the different platforms.
Please go to BIOS menu to check it
```

# 4.2.3.1. Runtime Watchdog

# Capabilities

Display the maximum supported values for event timeout, delay, and reset timeout.

```txt
$ semautil /w get_cap
```

```batch
C:\Users\Adlink>semautil /w get_cap
```

```txt
MaxEventTimeout : 0 seconds
```

```txt
MaxDelay : 0 seconds
```

```txt
MaxResetValue : 65535 seconds
```

# Enable

The system will reset after the specified number of seconds (timeout).

```txt
$ semautil /w start [sec (1-65535)]
```

```batch
C:\Users\Adlink>semautil /w start 100
```

```txt
Run-time Watchdog Started with : 100 seconds
```

# Trigger

Refresh the runtime watchdog using the previously configured timeout value.

```txt
$ semautil /w trigger
```

```txt
C:\Users\Adlink>semautil /w trigger
Watchdog is triggered to 100 seconds.
```

# Disable

Stop the runtime watchdog.

```txt
$ semautil /w stop
```

```batch
C:\Users\Adlink>semautil /w stop Watchdog stopped successfully.
```

# 4.2.3.2. Powerup Watchdog

# Enable

Set the timeout value and restart the system to enable the power-up watchdog. The powerup watchdog will continue to reset the system until it is disabled by the application or BIOS.

Caution: The startup time varies by platform. Check the system boot time and configure the power-up watchdog accordingly. If the timeout is set too short, the system may continuously reset.

```txt
$ semawtil /w pwrup_enable [sec (60-65535)]
```

```batch
C:\Users\Adlink>semautil /w pwrup_enable 100
Power-Up Watchdog is load with 100 seconds
```

# Disable

Stop the powerup watchdog.

```txt
$ semautil /w pwrup_disable
```

```batch
C:\Users\Adlink>semautil /w pwrup_disable
Power-Up Watchdog Disabled
```

# 4.2.4. Storage Access

This section describes the commands for managing the on-board EEPROM storage (Eg: EEPROM type: Microchip AT25256B) connected to the EC/BMC. Users can read from and write to the user flash memory region of the EEPROM.

SEMA supports three storage regions: User, Secure, and ODM.

# User Region (1024 bytes)

• Intended for general user data storage.
• Accessible without restrictions.
• This region cannot be locked or protected.

# Secure Region (2048 bytes)

Reserved for secure data.
• Read and write access is restricted and requires a passcode to unlock.

# ODM Region (1024 bytes)

Contains manufacturer-defined information such as hardware revision, board serial number, last repair date, manufacturing date, MAC addresses, UUID, and other boardspecific data.
• Intended primarily for manufacturer use and not for customer access.
• Data in this region can be read without restrictions; however, write access requires passcode authentication.
• The reserved portion (0x0E00–0x0FFF) is allocated for internal use and must not be modified.

Note: Customers should use the User region to store their data.

<table><tr><td>Region</td><td>Address range</td><td>Base address</td><td>Valid Address to Read/Write</td><td>Block size</td></tr><tr><td>1-User</td><td>0x0000 to 0x03FF (1KB)</td><td>0x0000</td><td>0 to 1020</td><td>4</td></tr><tr><td>2-Secure</td><td>0x6000 to 0x67FF (2KB)</td><td>0x6000</td><td>0 to 2044</td><td>4</td></tr><tr><td>3-ODM</td><td>0x0C00 to 0x0FFF (1KB)</td><td>0x0C00</td><td>0 to 1020</td><td>4</td></tr></table>

\$ semautil /s
```txt
C:\Users\Adlink>semautil /s
- Storage:
1. semawtil /s get_cap [Region]
2. semawtil /s read [Region] [Address] [Length]
3. semawtil /s write [Region] [Address] [string/value]
4. semawtil /s lock [Region]
5. semawtil /s unlock [Region] [Permission] [Passcode]
6. semawtil /s hex_write [Region] [Address] [value]
7. semawtil /s hex_read [Region] [Address] [Length]
8. semawtil /s odm_write [ODM Id] [string/value]

Region:
1. User
2. Secured
3. ODM

Permission
1. Read-only
2. Read/Write

ODM Id:
1.Hardware Revision
2.Serial Number
3.Last Repair date
4.Manufacturing date
5.2nd Hardware Revision
6.2nd Serial Number
7.MAC Id
8.MAC Id 2

Example: semawtil /s write 1020 Aaaa 4
It will be written to 1020, 1021, 1022, 1023

Unlock the ODM region to perform odm_write operation

Note : hex_write operation should be provided as below
Example: semawtil /s hex_write 1 128 aa bb c d
```

# 4.2.4.1. Capabilities

Display the storage size and block size of the selected region

\$ semautil /s get\_cap [Region]
```batch
C:\Users\Adlink>semautil /s get_cap 1
Storage Size: 1024 bytes
BlockSize: 4 bytes
C:\Users\Adlink>semautil /s get_cap 2
Storage Size: 2048 bytes
BlockSize: 4 bytes
C:\Users\Adlink>semautil /s get_cap 3
Storage Size: 1024 bytes
BlockSize: 4 bytes
```

# 4.2.4.2. User Region

# String Write Operation

```powershell
$ semautil /s write [Region] [Address] [string/value]
```

```batch
C:\Users\Adlink>semautil /s write 1 00 accd
Data Written Successfully
```

# String Read Operation

```txt
$ semautil /s read [Region] [Address] [Length]
```

```batch
C:\Users\Adlink>semautil /s read 1 00 4
The Data is "accd"
```

# Hex Write Operation [Supported Only for EC Boards]

To write a hexadecimal value to the specified address

```powershell
$ semautil /s hex_write [Region] [Address] [Value]
```

```batch
C:\Users\Adlink>semautil /s hex_write 1 00 aa bb cc dd
4 Bytes Written Successfully
```

# Hex Read Operation [Supported Only for EC Boards]

To read a hexadecimal value from the specified address

```powershell
$ semautil /s hex_read [Region] [Address] [Length]
```

```batch
C:\Users\Adlink>semautil /s hex_read 1 00 4
Read Buffer : 0xAA 0xBB 0xCC 0xDD
```

# 4.2.4.3. Secure and ODM Regions [Not for customer use and Supported Only for EC Boards]

The secure and ODM regions can be accessed using

# Lock

To make the Secure region read/write protected or ODM region write protected

```txt
$ semautil /s lock [Region]
```

# Unlock

The passcode must be used to gain read/write access to the Secure and ODM regions to perform String Write Operation, String Read Operation, Hex Write Operation [Supported Only for EC Boards] and Hex Read Operation [Supported Only for EC Boards]

```powershell
$ semautil /s unlock [Region] [Permission] [Passcode]
```

# ODM Write

The following system and manufacturer details [ODM details] can be changed using this command:

9. Hardware Revision
10. Serial Number
11. Last Repair date
12. Manufacturing date
13. 2nd Hardware Revision
14. 2nd Serial Number
15. MAC Id
16. MAC Id 2

```txt
$ semautil /s odm_write [ODM Id] [string/value]
```

```batch
C:\Users\Adlink>semautil /s odm_write 1 A0
Data Written Successfully
C:\Users\Adlink>semautil /i get_bd_info 5
HW revision: A0
```

The written string or value can be viewed using the following command:

```txt
$ semautil /i get_bd_info [EAPI Id]
```

# 4.2.5. Voltage Monitor

Note: Some voltage readings may be unsupported, as this functionality is board-specific. Refer to the BIOS to determine the supported voltages.

```txt
$ semautil /v
C:\Users\Adlink>semautil /v
- Voltage monitor:
1. semautil /v get_voltage [Channel (0 - 15)]
$ semautil /v get_voltage [Channel (0-15)]
```

```batch
C:\Users\Adlink>semautil /v get_voltage 0
Voltage : 2568 mv
Description : RTC

C:\Users\Adlink>semautil /v get_voltage 1
Voltage : 4994 mv
Description : 5VSB

C:\Users\Adlink>semautil /v get_voltage 2
Voltage : 11937 mv
Description : VIN

C:\Users\Adlink>semautil /v get_voltage 3
Voltage : 3345 mv
Description : 3.3V

C:\Users\Adlink>semautil /v get_voltage 4
Voltage : 1207 mv
Description : VMEM

C:\Users\Adlink>semautil /v get_voltage 5
Voltage : 3345 mv
Description : 3.3VSB

C:\Users\Adlink>semautil /v get_voltage 6
Voltage : 1803 mv
Description : VCORE

C:\Users\Adlink>semautil /v get_voltage 7
Current : 4665 mA
Description : Current Input Current
```

# 4.2.6. GPIO Control

```txt
$ semautil /g
```

```txt
C:\Users\Adlink>semautil /g
- GPIO:
1. semawtil /g get_direction_cap
2. semawtil /g get_direction [ID] [GPIO Bit]
3. semawtil /g set_direction [ID] [GPIO Bit] [0 - Output or 1 - Input]
4. semawtil /g get_level [ID] [GPIO Bit]
5. semawtil /g set_level [ID] [GPIO Bit] [0 - Low or 1 - High]

GPIO set/write parameters:
    GPIO Bit 0-15
Note: GPIO function is not available in all platform
```

# 4.2.6.1. Capabilities

```txt
$ semautil /g get_direction_cap
```

```batch
C:\Users\Adlink>semautil /g get_direction_cap
Number of GPIO pins supported: 12 pins
```

# 4.2.6.2. GPIO Direction Control

To configure the direction of the GPIO pin as Input or output.

# Read Direction

```txt
$ semautil /g get_direction [GPIO Bit]
```

```batch
C:\Users\Adlink>semautil /g get_direction 0 1
Direction: Input
```

# Set Direction

```powershell
$ semautil /g set_direction [GPIO Bit] [0-Output | 1-Input]
```

```batch
C:\Users\Adlink>semautil /g set_direction 0 1 0
Direction updated successfully
```

# 4.2.6.3. GPIO Level Control

To configure the level of the output GPIO pin as High or Low.

# Read Level

```txt
$ semautil /g get_level [GPIO Bit]
```

```batch
C:\Users\Adlink>semautil /g get_level 0 1
Level: Low
```

Set Level
```txt
$ semawtil /g set_level [GPIO Bit] [0-Low | 1-High]
```

```batch
C:\Users\Adlink>semautil /g set_level 0 1 1
GPIO Level updated successfully
```

4.2.7. Generic I2C Access
```txt
$ semautil /i2c
```

```batch
C:\Users\Adlink>semautil /i2c
- Generic I2C Read/Write:
1. semawtil /i2c bus_cap
2. semawtil /i2c probe_device [bus id]
3. semawtil /i2c write_raw [bus id] [address] [wr length] [cmd] byte0 byte1 ...
3. semawtil /i2c read_raw [bus id] [address] [cmd] [re length]
4. semawtil /i2c raw_xfer [bus id] [address] [wr length] [rd length] byte0 byte1 byte2...
5. semawtil /i2c read_xfer [bus id] [address] [cmd type] [cmd] [read lentgh]
6. semawtil /i2c write_xfer [bus id] [address] [cmd type] [cmd] [length] byte0 byte1 byte2 ...
7. semawtil /i2c get_status

[Bus Id]:
ID SEMA EAPI ID Description
1 EAPI_ID_I2C_EXTERNAL 1st External I2C Interface
2 EAPI_ID_I2C_EXTERNAL 2nd External I2C Interface
3 EAPI_ID_I2C_EXTERNAL 3rd External I2C Interface
4 EAPI_ID_I2C_EXTERNAL 4th External I2C Interface

[Command type]:
ID ENCODED CMD ID Description
1 EAPI_I2C_NO_CMD Specify no command/index is used
2 EAPI_I2C_ENC_STD_CMD Extended standard 8 bits CMD
3 EAPI_I2C_ENC_EXT_CMD Extended standard 10 bits CMD
```

# 4.2.7.1. Capabilities

To display the I2C buses supported by the board along with their maximum read and write sizes.

```txt
$ semautil /i2c bus_cap
```

```batch
C:\Program Files\Adlink\SEMA\Application>semautil /i2c bus_cap
EAPI_ID_I2C_EXTERNAL_1 is supported. Max read size 32 bytes. Max write size 29 bytes.
EAPI_ID_I2C_EXTERNAL_2 is supported. Max read size 32 bytes. Max write size 29 bytes.
EAPI_ID_I2C_EXTERNAL_3 is supported. Max read size 32 bytes. Max write size 29 bytes.
EAPI_ID_I2C_EXTERNAL_4 is not supported
```

# 4.2.7.2. Device Probe

To display the list of slave addresses connected to the specified I2C bus.

```txt
$ semautil /i2c probe_device [bus id]
```

```batch
C:\Program Files\Adlink\SEMA\Application>semautil /i2c probe_device 3
Slave list in EAPI_ID_I2C_EXTERNAL_3 bus:
01. d
02. 3e
03. 50
04. 51
05. 52
06. 53
07. 54
```

# 4.2.7.3. Transfer Functions

To perform separate read and write transactions

Read Transfer
```txt
$ semautil /i2c read_xfer [bus id] [address] [cmd type] [cmd/offset] [read length]
```

```txt
C:\Program Files\Adlink\SEMA\Application>semautil /i2c read_xfer 3 50 2 00 4
Read data:
00 : 0a
01 : 0b
02 : 0c
03 : 0d
```

Write Transfer
```txt
$ semautil /i2c write_xfer [bus id] [address] [cmd type] [cmd/offset] [write length] byte0 byte1 ...
```

```batch
C:\Program Files\Adlink\SEMA\Application>semautil /i2c write_xfer 3 50 2 00 4 a b c d
The I2C Write Transfer command is completed
```

# 4.2.7.4. Raw Functions [Supported only for EC Boards]

The write\_raw, read\_raw, and raw\_xfer commands are used for combined write/read transactions that utilize the I²C repeated-start feature.

Read Raw
```txt
$ semautil /i2c read_raw [bus id] [address] [cmd/offset] [read length]
```

```batch
C:\Program Files\Adlink\SEMA\Application>semautil /i2c read_raw 3 50 00 4
Read data:
00 : 01
01 : 02
02 : 03
03 : 04
```

# Write Raw

When specifying the write length, include the offset. For example, to write 4 bytes of data, the total write length should be 5 bytes.

```powershell
$ semautil /i2c write_raw [bus id] [address] [write length] [cmd/offset] byte0 byte1 ...
```

```batch
C:\Program Files\Adlink\SEMA\Application>semautil /i2c write_raw 3 50 5 00 1 2 3 4
The I2C Write command is completed
```

# 4.2.7.5. Raw Transfer

The raw\_xfer command performs the same combined write/read operation as write\_raw and read\_raw, but in a single command.

```txt
$ semautil /i2c raw_xfer [bus id] [address] [write length] [read_length] [cmd/offset] byte0 byte1 ...
```

Read
```txt
C:\Program Files\Adlink\SEMA\Application>semautil /i2c raw_xfer 3 50 1 4 00
Read data:
00 : 0d
01 : 0c
02 : 0b
03 : 0a
```

Write
```txt
C:\Program Files\Adlink\SEMA\Application>semautil /i2c raw_xfer 3 50 5 0 00 d c b a
The I2C Write command is completed
```

# 4.2.8. Error log Description

Note: Error log functionality is supported only on certain boards, refer bit 35 of Extended EC/BMC Capabilities.

```txt
$ semautil /e
```

```txt
C:\Users\Adlink>semautil /e
- Error log:
1. semautil /e get_error_log [Position(0-31)]
2. semautil /e get_cur_error_log
3. semautil /e get_bmc_error_code [Error Number]
```

# 4.2.8.1. Error Log

# Current Error Log

```shell
$ semautil /e get_cur_error_log
```

```txt
C:\Users\Adlink>semautil /e get_cur_error_log
ErrorNumber: 5572
Flags: 0xb
RestartEvent: 0xa0
PowerCycle: 6002
BootCount: 5431
Time: 31735 seconds
TotalOnTime: 82451 minutes
BIOS Sel: 0x3
Status: 0xb
CPUTemp: 39 C
BoardTemp: 39 C
```

# Error Log of the Position

Position 0 contains the most recent error log entry.

```txt
$ semautil /e get_error_log [Position (0-31)]
```

```txt
C:\Users\Adlink>semautil /e get_error_log 1
ErrorNumber: 5571
Flags: 0xd
RestartEvent: 0x70
PowerCycle: 6002
BootCount: 5431
Time: 31735 seconds
TotalOnTime: 82451 minutes
BIOS Sel: 0x3
Status: 0xd
CPUTemp: 39 C
BoardTemp: 39 C
```

# 4.2.8.2. BMC Error Code

To get the BMC Error code description of the provided Error number

```tcl
$ semautil /e get_bmc_error_code [Error number]
```

```batch
C:\Users\Adlink>semautil /e get_bmc_error_code 5572
5572 -> POWER_FAIL
```

# 4.2.9. BIOS Information

```txt
$ semautil /src
```

C:\Users\Adlink>semautil /src
```txt
- Get BIOS Source:
1. semautil /src get_src
2. semautil /src set_src bit-0 bit-1
3. semautil /src get_src_sts

Bit-0 Bit-1:
0 0 - By hardware configuration of currently selected BIOS
0 1 - Switch to Fail-Safe BIOS
1 0 - Switch to External BIOS (SPI0 on carrier)
1 1 - Switch to Internal BIOS (SPI0 on module)
```

# 4.2.9.1. BIOS selection status

Display the type of BIOS selected as PICMG BIOS or Dual BIOS and the state of external hardware jumper control signals.

```txt
$ semautil /src get_src_sts
```
C:\Users\Adlink>semautil /src get\_src\_sts

PICMG BIOS Selected.
```txt
Bit2 Bit1 Bit0
0 0 0 - *M0 Module SPI0 / C1 Carrier SPI1 (Standard BIOS)
0 0 1 - *C0 Carrier SPI0 / M1 Module SPI1 (Fail-Safe BIOS)
0 1 0 - Not PICMG Mode / Unknown
-> 0 1 1 - *M0/M1 (Standard BIOS
1 0 0 - Not Dual BIOS Mode / Unknown
1 0 1 - Switch to Fail - Safe BIOS
1 1 0 - Switch to External BIOS(SPI0 on carrier)
1 1 1 - Switch to Internal BIOS(SPI0 on module)
```

# 4.2.9.2. BIOS Boot Source Configuration

Set BIOS Boot Source mode
```tcl
$ semautil /src set_src [bit-0] [bit-1]
```

```batch
C:\Users\Adlink>semautil /src set_src 0 1
BIOS Boot source mode set successfully
```

Read BIOS Boot Source mode
```txt
$ semautil /src get_src
```

```txt
C:\Users\Adlink>semautil /src get_src
Bit0 Bit1
0 1 - Switch to Fail - Safe BIOS
```

# 4.2.10. UUID [Type 4]

```txt
$ semautil /c
```

```batch
C:\Users\Adlink>semautil /c
- UUID:
1. semautil /c guid_generate_write
2. semautil /c guid_read
```

4.2.10.1. Write New UUIDv4
```txt
$ semautil /c guid_generate_write
```

```batch
C:\Users\Adlink>semautil /c guid_generate_write
Generated GUID: {51A7E134-1C93-48EE-8288-03302D10D1B9}
GUID Written Successfully
```

4.2.10.2. Read UUIDv4
```txt
$ semautil /c guid_read
```

```batch
C:\Users\Adlink>semautil /c guid_read
Read Buffer : 0x51 0xA7 0xE1 0x34 0x1C 0x93 0x48 0xEE 0x82 0x88 0x03 0x30 0x2D 0x10 0xD1 0xB9
```

# 4.2.11. Smart Fan Control

This functionality is used to control the fan connected to the CPU or system.

Each fan controller supports 4 temperature trigger levels, each associated with a corresponding PWM value. Whenever a temperature trigger level is crossed, the fan speed is adjusted based on the configured PWM value for that level.

Note: Fan control functionality is supported only on certain boards, refer bit 18, 19, 26 and 27 of EC/BMC Capabilities for the fans available.

```asm
$ semautil /f

C:\Users\Adlink>semautil /f

-Smart FAN control:
1. semautil /f set_temp_points [FanID] [Level 1] [Level 2] [Level 3] [Level 4]
2. semautil /f set_pwm_points [FanID] [PWM Level 1] [PWM Level 2] [PWM Level 3] [PWM Level 4]
3. semautil /f get_temp_points [FanID]
4. semautil /f get_pwm_points [FanID]
5. semautil /f set_temp_source [FanID] [TempSrc]
6. semautil /f get_temp_source [FanID]
7. semautil /f get_mode [FanID]
8. semautil /f set_mode [FanID] [Mode]

CPU Fan TempSrc:
0 - CPU sensor
1 - Board sensor

System Fan1 TempSrc:
0 - CPU sensor
1 - Carrier sensor

FanID
0 : CPU fan
1 : System fan 1
2 : System fan 2
3 : System fan 3

Mode
0 : Auto
1 : Off
2 : On
3 : Soft
```

# 4.2.11.1. Temperature Set Points

Describes the temperature trigger level corresponding to the percentage of PWM trigger level (Maximum temperature set point = 100).

Set Temperature Trigger Levels
```tcl
$ semautil /f set_temp_points [FanID] [Level1] [Level2] [Level3] [Level4]
```

```batch
C:\Users\Adlink>semautil /f set_temp_points 0 10 30 40 50
```

```txt
Temperature levels set successfully
```

Read Temperature Trigger Levels
```txt
$ semautil /f get_temp_points [FanID]
```

```batch
C:\Users\Adlink>semautil /f get_temp_points 0
Fan ID: 0 (CPU Fan)
Level 1 : 10
Level 2 : 30
Level 3 : 40
Level 4 : 50
```

# 4.2.11.2. Temperature Source

Describes which temperature sensor will be used for calculating the PWM level of the selected fan.

• The temperature source for the CPU fan can be set to either the CPU sensor or the board sensor.
• The temperature source for System Fan 1 can be set to either the CPU sensor or the carrier sensor.

Set Temperature Source
```tcl
$ semautil /f set_temp_source [FanID] [TempSrc]
```

```batch
C:\Users\Adlink>semautil /f set_temp_source 0 1
Temperature source is set to 1 (Baseboard sensor)
```

Read Temperature Source
```txt
$ semautil /f get_temp_source [FanID]
```

```batch
C:\Users\Adlink>semautil /f get_temp_source 0
Current Temperature source is 1 (Baseboard sensor)
```

# 4.2.11.3. PWM Set Points

Describes the percentage of PWM trigger level corresponding to the temperature trigger level (Maximum PWM set point = 100).

Set PWM Trigger level
```tcl
$ semautil /f set_pwm_points [FanID] [PWMLevel1] [PWMLevel2] [PWMLevel3] [PWMLevel4]
```

```batch
C:\Users\Adlink>semautil /f set_pwm_points 0 30 45 60 80
PWM levels set successfully
```

Read Temperature Trigger Levels
```tcl
$ semautil /f get_pwm_points [FanID]
```

```batch
C:\Users\Adlink>semautil /f get_pwm_points 0
```

```txt
Fan ID: 0 (CPU Fan)
Level 1 : 30
Level 2 : 45
Level 3 : 60
Level 4 : 80
```

# 4.2.11.4. Fan Mode

SEMA supports 4 fan modes.

• Auto – the fan will be automatically controlled using the Trigger Settings described
Off – the fan is turned off completely
On – the fan runs at maximum RPM (PWM level 100%)
Soft – Auto mode with PWM Level Interpolation (i.e.) The PWM level is not adapted stepwise, but continuously.

Set Fan Mode
```txt
$ semautil /f set_mode [FanID] [Mode]
```

```batch
C:\Users\Adlink>semautil /f set_mode 0 1
FAN mode set successfully.
```

Get Fan Mode
```txt
$ semautil /f get_mode [FanID]
```

```batch
C:\Users\Adlink>semautil /f get_mode 0
Fan ID: 0 (CPU Fan)
Fan Mode: 1 (Off)
```

# 4.2.12. Backlight Control

To control the LVDS backlight panel connected to the EC/BMC.

Note: Backlight control is supported only on certain boards, refer bit 8 of EC/BMC Capabilities.

```powershell
$ semawtil /b
C:\Users\Adlink>semautil /b
- LVDS Backlight control:
1. semawtil /b set_bkl_value [ID] [Level (0-255)]
2. semawtil /b set_bkl_enable [ID] [0 - Disable or 1 - Enable]
3. semawtil /b get_bkl_value [ID]
4. semawtil /b get_bkl_enable [ID]
[ID] LCD
0 EAPI_ID_BACKLIGHT_1
1 EAPI_ID_BACKLIGHT_2
2 EAPI_ID_BACKLIGHT_3
```

# 4.2.12.1. LVDS Panel Status Control

# Enable/Disable the Backlight Panel

```txt
$ semautil /b set_bkl_enable [ID] [0 - Disable | 1 - Enable]
```

```batch
C:\Program Files\Adlink\SEMA\Application>semautil /b get_bkl_enable 0
Backlight ON
```

# Read the Backlight Panel Status

Display the ON/OFF status of the selected panel.

```txt
$ semautil /b get_bkl_enable [ID]
C:\Program Files\Adlink\SEMA\Application>semautil /b get_bkl_enable 0
Backlight ON
```

# 4.2.12.2. LVDS Panel Brightness Control

# Set Brightness

Set the backlight brightness (PWM) level of the specified panel. Maximum PWM level – 255

```tcl
$ semautil /b set_bkl_value [ID] [Level (0-255)]
```

```batch
C:\Program Files\Adlink\SEMA\Application>semautil /b set_bkl_value 0 100
Current backlight value is set to 100
```

# Read Brightness

Display the brightness PWM level

```htaccess
$ semautil /b get_bkl_value [ID]
```

```batch
C:\Program Files\Adlink\SEMA\Application>semautil /b get_bkl_value 0
Current backlight value is 100
```

# 4.2.13. Exception Description

Displays the Exception Codes returned by EC/BMC flags.

```txt
$ semautil /x get_excep_desc
```
C:\Users\Adlink>semautil /x get\_excep\_desc

```ocaml
00 -> NOERROR
02 -> NO_SUSCLK
03 -> NO_SLP_S5
04 -> NO_SLP_S4
05 -> NO_SLP_S3
06 -> BIOS_FAIL
07 -> RESET_FAIL
08 -> RESETIN_FAIL
09 -> NO_CB_PWROK
10 -> CRITICAL_TEMP
11 -> POWER_FAIL
12 -> VOLTAGE_FAIL
13 -> RSMRST_FAIL
14 -> NO_VDDQ_PG
15 -> NO_V1P05A_PG
16 -> NO_VCORE_PG
17 -> NO_SYS_GD
18 -> NO_V5SBY
19 -> NO_V3P3A
20 -> NO_V5_DUAL
21 -> NO_PWRSRC_GD
22 -> NO_P_5V_3V3_S0_PG
23 -> NO_SAME_CHANNEL
24 -> NO_PCH_PG
```

# 4.2.14. SMBus Access

This functionality is supported only on BMC-based boards.

To identify the devices connected to the SMBus of the hardware, refer to the hardware user manual.

```txt
$ semautil /smb
```

C:\Program Files\Adlink\SEMA\Application>semautil /smb
```txt
- SMBus:
1. semawtil /smb write_word [Addr] [Cmd] [data]
2. semawtil /smb read_word [Addr] [Cmd]
3. semawtil /smb write_byte [Addr] [Cmd] [data]
4. semawtil /smb read_byte [Addr] [Cmd]
```

# Test Environment

Module: LEC-AL

OS: Windows 10

Board BIOS revision: 5.05.10

BMC application revision: BMC LEC-AL 1v9 Jul 28 2021

BMC Bootloader revision: bl\_LEC-AL 4v2 May 19 2017 (c) ADLINK Technology Inc.

According LEC-AL user manual, the GPIO expander (PCA9535A) is connected at SMBus address 0x40 (8-bit address).

# 4.2.14.1. Read Operations

# Read Byte

To read 1 byte of data from the SMBus device

```txt
$ semautil /smb read_byte [Addr] [Cmd]
```

[Addr] - 7-bit SMBus slave address

[Cmd] - SMBus command

```batch
C:\Program Files\Adlink\SEMA\Application>semautil /smb read_byte 20 0x06
Read data: aa
```

# Read Word

To read 1 word (2 bytes) of data from the SMBus device

```txt
$ semautil /smb read_word [Addr] [Cmd]
```

```batch
C:\Program Files\Adlink\SEMA\Application>semautil /smb read_word 20 0x06
Read data:
00 : aa
01 : 00
```

# 4.2.14.2. Write Operations

# Write Byte

To write 1 byte of hexadecimal data to SMBus Device

```tcl
$ semautil /smb write_byte [Addr] [Cmd] [Data]
```

```batch
C:\Program Files\Adlink\SEMA\Application>semautil /smb write_byte 20 0x06 33
The SMBus Write Byte Transfer command is completed
```

# Write Word

To write 1 word (2 bytes) of hexadecimal data to the SMBus device

```tcl
$ semautil /smb write_word [Addr] [Cmd] [Data]
```

```batch
C:\Program Files\Adlink\SEMA\Application>semautil /smb write_word 20 0x06 11 22
The SMBus Write Word Transfer command is completed
```

To get the EAPI usage, refer to the SEMA EAPI Guide attached in the below link

Link: Technical Resources | ADLINK

# 5. Annexure

# 5.1. Restart Event

<table><tr><td>Code</td><td>Code name</td><td>Description</td></tr><tr><td>0x00</td><td>SEMA_SRE_UNKNOWN</td><td>Unknown reason of restart (shown only on first BMC power-up)</td></tr><tr><td>0x20</td><td>SEMA_SRE_SW_RESET</td><td>A reset by software caused the restart of the system</td></tr><tr><td>0x30</td><td>SEMA_SRE_HW_RESET</td><td>A reset by hardware caused the restart of the system (e.g.: Reset button)</td></tr><tr><td>0x40</td><td>SEMA_SRE_WATCHDOG</td><td>The watchdog has restarted the system</td></tr><tr><td>0x50</td><td>SEMA_SRE_BIOS_FAULT</td><td>Standard BIOS is corrupted -&gt; boot from Fail-Safe BIOS</td></tr><tr><td>0x60</td><td>SEMA_SRE_PWR_DOWN</td><td>The system was shut down (e.g. power button, ACPI shutdown)</td></tr><tr><td>0x70</td><td>SEMA_SRE_PWR_LOSS</td><td>The system was restarted after a power loss (e.g. external power supply instable or switched off while the system was running)</td></tr><tr><td>0x80</td><td>SEMA_SRE_PWR_CYCLE</td><td>The system is restarted after a power cycle (e.g. internal power supply has failed)</td></tr><tr><td>0x90</td><td>SEMA_SRE_VIN_DROP</td><td>The system is restarted after a voltage drop of the main input voltage</td></tr><tr><td>0xA0</td><td>SEMA_SRE_PWR_FAIL</td><td>The system is restarted after a power fail detection of an internal power supply circuit</td></tr><tr><td>0xB0</td><td>SEMA_SRE_CRIT_TEMP</td><td>The system was shut down by ACPI watchdog (CPU reached critical temperature)</td></tr><tr><td>0xC0</td><td>SEMA_SRE_WAKEUP</td><td>The system has received a wake event and resumes operation from a sleep</td></tr></table>

# 5.2. Accessing I2C in Linux using I2C-tools

# Test Environment:

Module: Express-DN7-C808

OS: Ubuntu 22.04 [Kernel 6.8.0-40-generic]

# Accessing EEPROM using i2c-tools

The 7-bit slave address for GPIO Expander [PCA9535] is 0x20.

i2cdetect: This tool is used to scan I2C buses and detect connected devices.

To scan I2C buses and detect connected devices -

```txt
$ sudo i2cdetect -l
```

To list the addresses of detected bus -

```erb
$ sudo i2cdetect -y &lt;Bus number&gt;
```

<table><tr><td colspan="4">adlink@adlink-cExpress-EL:~/Documents/sema-linux-bmc-4.3.3$ sudo i2cdetect -l</td></tr><tr><td>i2c-0</td><td>smbus</td><td>SMBus CMI adapter SMB0001:00</td><td>SMBus adapter</td></tr><tr><td>i2c-1</td><td>smbus</td><td>SMBus iSMT adapter at 7e7ff14000</td><td>SMBus adapter</td></tr><tr><td>i2c-2</td><td>smbus</td><td>SMBus I801 adapter at e000</td><td>SMBus adapter</td></tr><tr><td>i2c-3</td><td>i2c</td><td>Radeon i2c bit bus 0x90</td><td>I2C adapter</td></tr><tr><td>i2c-4</td><td>i2c</td><td>Radeon i2c bit bus 0x91</td><td>I2C adapter</td></tr><tr><td>i2c-5</td><td>i2c</td><td>Radeon i2c bit bus 0x92</td><td>I2C adapter</td></tr><tr><td>i2c-6</td><td>i2c</td><td>Radeon i2c bit bus 0x93</td><td>I2C adapter</td></tr><tr><td>i2c-7</td><td>i2c</td><td>Radeon i2c bit bus 0x94</td><td>I2C adapter</td></tr><tr><td>i2c-8</td><td>i2c</td><td>Radeon i2c bit bus 0x95</td><td>I2C adapter</td></tr><tr><td>i2c-9</td><td>i2c</td><td>Radeon i2c bit bus 0x96</td><td>I2C adapter</td></tr><tr><td>i2c-10</td><td>i2c</td><td>Radeon i2c bit bus 0x97</td><td>I2C adapter</td></tr></table>

<table><tr><td colspan="17">adlink@adlink-cExpress-EL:~/Documents/sema-linux-bmc-4.3.3$ sudo i2cdetect -y 2</td></tr><tr><td></td><td>0</td><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td><td>9</td><td>a</td><td>b</td><td>c</td><td>d</td><td>e</td><td>f</td></tr><tr><td>00:</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>08</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td></tr><tr><td>10:</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td></tr><tr><td>20:</td><td>20</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>28</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td></tr><tr><td>30:</td><td>30</td><td>--</td><td>--</td><td>--</td><td>--</td><td>35</td><td>UU</td><td>UU</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td></tr><tr><td>40:</td><td>--</td><td>--</td><td>--</td><td>--</td><td>44</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td></tr><tr><td>50:</td><td>UU</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td></tr><tr><td>60:</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td></tr><tr><td>70:</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr></table>

i2cdump: This tool reads and dumps the contents of an I2C device's registers. It is useful for extracting larger data sets from devices like EEPROMs, GPIOs.

```txt
$ sudo i2cdump -y &lt;Bus number&gt; &lt;Slave Address&gt;
```

This command dumps the contents of the device at address &lt;Slave address&gt; on &lt;Bus number&gt;

```txt
adlink@adlink-cExpress-EL: -$ sudo i2cdump -f -y 2 0x20
No size specified (using byte-data access)
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 0f ff 0f ff 00 00 0f 00 XX XX XX XX XX XX XX XX
10: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX
20: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX
30: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX
40: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX
50: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX
60: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX
70: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX
80: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX
90: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXX
a0: XX XX XX XX XX XX XXXXX
b0: XX XXX XXX XXX XXXXXX
c0: XXX XXX XXX XXX XXXXXX
d0: XXX XXX XXX XXX XXXXXX
e0: XXX XXX XXX XXX XXX XXXXXX
f0: XXX XXX XXX XXX XXX XXXXXX
```

i2cget and i2cset commands provide read and write access of a specific register of an I2C device

<table><tr><td colspan="2">Table 4. Command byte</td></tr><tr><td>Command</td><td>Register</td></tr><tr><td>0</td><td>Input port 0</td></tr><tr><td>1</td><td>Input port 1</td></tr><tr><td>2</td><td>Output port 0</td></tr><tr><td>3</td><td>Output port 1</td></tr><tr><td>4</td><td>Polarity Inversion port 0</td></tr><tr><td>5</td><td>Polarity Inversion port 1</td></tr><tr><td>6</td><td>Configuration port 0</td></tr><tr><td>7</td><td>Configuration port 1</td></tr></table>

```shell
adlink@adlink-cExpress-EL: -$ sudo i2cget -f -y 2 0x20 0x06
0x0f
adlink@adlink-cExpress-EL: -$ sudo i2cset -f -y 2 0x20 0x06 0x0e
adlink@adlink-cExpress-EL: -$ sudo i2cget -f -y 2 0x20 0x06
0x0e
```

# 6. FAQs & Troubleshooting

# 1. Permission Denied Error

Platform: Ubuntu

Error Details: Permission denied error while trying to use the commands

```txt
adlink@adlink-Default-string:~$ semautil /v get_voltage 0
Get EApi information failed
EApiBoardGetVoltageMonitor error 13, Permission denied
adlink@adlink-Default-string:~$
```

Solution: Execute the SEMA commands with root privileges (i.e.) use “sudo” in the beginning of the command

# 2. Fan control

Explain the fan modes. What should be the setting of the fan if we require constant rpm value.

# Fan modes:

• Auto – the fan will be automatically controlled using the Trigger Settings described
• Off – the fan is turned off completely
• On – the fan runs at maximum RPM (PWM level 100%)
• Soft – Auto mode with PWM Level Interpolation (i.e.) The PWM level is not adapted stepwise, but continuously.

Fan mode changed to “On” to get the constant rpm value.

# 3. Backlight Control

Whenever Backlight enable command is passed from Off state, the backlight of the panel is updated to default Brightness level 200.

# 4. I2C Control

How to view the slave devices connected to I2C in Windows?

Refer to 4.2.7.2. Device Probe section.

# 5. How to access I2C in BMC boards Linux?

Refer to 5.2. Accessing I2C in Linux using I2C-tools

# 6. SMBus Write Fail

Platform: Ubuntu

Error Details: Tried to access EEPROM in COM-HPC-cRLS using SMBus Write command and I2C tools. Both returned write failed.

```perl
root@COM-HPC-cRLS:~# i2cset -y 10 0x56 0x03
Error: Write failed

root@COM-HPC-cRLS:~# semawtil /smb write_byte 0x56 0 0x03
Get EApi information failed
Failed
```

Solution: Set the SPD Write disable option in BIOS to FALSE. Then try writing into the desired command.

# 7. GPIO Level Set Fail

Platform: Ubuntu

Error Details: SEMA utility can't set level under Ubuntu 20.04.6 LTS

Solution: The level of GPI pin cannot be changed. Only if the direction of the GPIO pin is in OUTPUT, the level of the GPIO pin can be changed.