beautypg.com

3 instruction to access smbus (ubuntu), 4 limitations – Hatteland Display 13 inch - HD 13T21 MMC (Widescreen, Inte Ato CPU) User Manual

Page 6

background image

DOC101200-2_AIPC_API_Registers_SMBus_Linux[1].docx - rev 03 – 2013-12-03 - Created by:6923

Page 6 of 6

Hatteland Display AS, Åmsosen, N-5578 Nedre Vats, Norway

Tel: (+47) 4814 2200 - [email protected] - www.hatteland-display.com

All intellectual properties belong to Hatteland Display AS

2 Notes

The following registers must be set at boot to be able to use all functions:
Command Device

Address

R/#W Register

Address

Input Data

output

AIPC_ CFG0_W

0x20

0

0x06

0xFF

AIPC_ CFG1_W*

0x20 0 0x07

0x8F

*All output pins are defined as high by default. To avoid any undesired behavior please set the output

level low before defining the pins as outputs.

3 Instruction to access SMBus (Ubuntu)

This instruction is showing how to access the introduced Registers on SMBus Device.

The test environment is Ubuntu 12.04 LTS 32bit.

1. Connect with Internet, and start with a terminal

2. Install i2c-tools (www.lm-sensors.org)

sudo apt-get install i2c-tools

3. Probe i2c Modules

sudo modprobe i2c-dev

sudo modprobe i2c-i801

4. Set value of output pins low (Sets AIPC_K2, AIPC_HS1 and AIPC_HS2 low)

sudo i2cset –y 6 0x20 0x03 0x00 b

5. Initialize the AIPC_CFG0_W and AIPC_CFG1_W

sudo i2cset –y 6 0x20 0x06 0xFF b

sudo i2cset –y 6 0x20 0x07 0x8F b

6. Then start configure the register according to the address in the previous list

Example:

 Read “BUZZER_EN”

sudo i2cget –y 6 0x48 0x28 b

 Write “BUZZER_EN”

sudo i2cset –y 6 0x48 0x28 0x01 b

4 Limitations

A delay of 100ms must be added after every command.
Failure to do so may cause the SMBus to lock up.

A full power cycle is required to recover the SMBus when locked.

This manual is related to the following products: