Getting Started
Page 36
2.8.1.1
Accessing SMBus/I2C Devices via Generic Access using smb2_ctrl
The
smb2_ctrl
tool provides direct access to any SMBus/I2C device.
The tool provides two different operation modes:
Command Line Interface (CLI) Mode: The tool operates in this mode when you call
smb2_ctrl
only with the device name parameter, e.g.:
smb2_ctrl smb2_1
. Then you will
get a CLI that asks you for further actions.
Command Mode: Call
smb2_ctrl
with the device name parameter and at least the
action (i.e. the command) you want to perform. E.g.:
smb2_ctrl smb2_1 rb
Note: The command mode is useful to script the tool.
For a detailed description about all supported tool options, just call
smb2_ctrl
, e.g.:
Usage Examples
List all available SMB devices at SMBus instance
smb2_1
:
Access the board information EEPROM (SMB address
0xAC
) to read byte at offset 8:
Access the CPU board BMC (in this example at SMB address
0x9C
) to read out the
operating hours counter:
Access the CPU board BMC (in this example at SMB address
0x9C
) to set the upper
limit of the watchdog to 200 ms:
2.8.2
Managing RTC Time Adjustments
During the boot process, the CPU firmware gets the time from the system RTC (ERTC)
and sets the CRTC (Chipset Real-Time Clock) accordingly. In the next step, the operating
system (OS) gets the time from the CRTC and sets the system time accordingly. Now the
OS system time is updated independently of the CRTC via periodic clock interrupts. Thus,
over time (i.e. as the system runs), the system time may become out of sync with the
CRTC/ERTC time.
If the system time is adjusted (e.g. by the user), the ERTC time will not be automatically
adjusted by the time management, because the OS is not aware of the additional ERTC.
The ERTC time will not be updated and is out of date. During the next system boot, the
OS would use the outdated time.
MEN provides a dedicated ERTC driver to manage system time adjustments.
C:\MEN\ErtcSmb\Applications>
smb2_ctrl
>
smb2_ctrl smb2_1 list
>
smb2_ctrl smb2_1 rbd -a=0xac -o=0x8
>
smb2_ctrl smb2_1 rbk -a=0x9c -o=0x94
>
smb2_ctrl smb2_1 wwd -a=0x9c -o=0x14 -d=0x0002
See the MEN website for
Windows ERTC/SMB Support Package
.