Getting Started
20MC50M00 E5
2020-10-20
43
2.6.7 Accessing User LEDs
You can access the user LEDs through a register on the SMBus.
The standard Linux I2C tools give access to SMB registers.
Use the 7-bit SMB/I2C address to access a register.
» Find out the number of the SMBus where the user LED register is located on
MC50M.
» If you are unfamiliar with the standard Linux tools, please read the related applica-
tion note.
The following examples assume that the SMBus number is 1.
» Enable the LEDs:
» Turn the LEDs on:
» Read out the LED state:
» Set both LEDs back to their default dimmed state:
See Chapter CPU Module User LED and Ignition Watchdog for the register description.
See Chapter Accessing SMBus/I2C Devices using Standard Linux I2C Tools.
Access the Configuration Register on 0x03.
$ i2cset -y 1 0x20 0x03 0xcf b
Access the Data Register on 0x01.
$ i2cset -y 1 0x20 0x01 0xcf b
Access the Data Register on 0x00.
$ i2cget -y 1 0x20 0x00
$ i2cset -y 1 0x20 0x03 0xff b