Upfate Hardware I2C page
This commit is contained in:
parent
1f9c5f49f1
commit
68b37ec7a4
8 changed files with 43 additions and 58 deletions
|
@ -1,6 +1,6 @@
|
|||
Helios64 provides 16 GPIOs via a 20-Pin header (P5). Those GPIOs are provided via an 16-bit IO Expander [PCA9655E](http://www.onsemi.com/PowerSolutions/product.do?id=PCA9655E) connected to I2C bus 2.
|
||||
|
||||

|
||||

|
||||
|
||||
## Pinout
|
||||
|
||||
|
|
|
@ -1,39 +1,26 @@
|
|||
## I2C Overview
|
||||
|
||||
Helios64 support I2C bus for the low-speed communication between devices like microcontrollers, EEPROMs, A/D and D/A converters, I/O interface and other similar peripherals in embedded systems.
|
||||
In order to communicate with each I2C slave device you will need an address and communication scenario.
|
||||
|
||||
Please take caution of the reserved address when you use the I2C interface, below is the reseved address list:
|
||||
|
||||
Slave Address | R/W Bit | Description
|
||||
--------------|---------|-------------------
|
||||
000 0000 | 0 | General call address
|
||||
000 0000 | 1 | START byte(1)
|
||||
000 0001 | X | CBUS address(2)
|
||||
000 0010 | X | Reserved for different bus format (3)
|
||||
000 0011 | X | Reserved for future purposes
|
||||
000 01XX | X | Hs-mode master code
|
||||
111 10XX | X | 10-bit slave addressing
|
||||
111 11XX | X | Reserved for future purposes
|
||||
|
||||
Helios64 supports I2C bus for low-speed communication between devices like microcontrollers, EEPROMs, A/D and D/A converters, I/O interfaces and other similar peripherals. In order to communicate with each I2C slave device you will need an address and communication scenario.
|
||||
|
||||
## I2C bus on Helios64 / RK3399
|
||||
|
||||
The I2C controller on RK3399 support following features:
|
||||
The I2C controller on RK3399 supports following features:
|
||||
|
||||
- 9 on-chip I2C controllers
|
||||
- Multi-master I2C operation
|
||||
- Support 7bits and 10bits address mode
|
||||
- Serial 8bits oriented and bidirectional data transfers can be made
|
||||
- Software programmable clock frequency
|
||||
- Data on the I2C-bus can be transferred at rates of up to 100 kbit/s in the Standardmode, up to 400 kbit/s in the Fast-mode or up to 1 Mbit/s in Fast-mode Plus.
|
||||
- Data on the I2C-bus can be transferred at rates of up to 100 kbit/s in the Standardmode, up to 400 kbit/s in the Fast-mode or up to 1 Mbit/s in Fast-mode Plus
|
||||
|
||||
|
||||
## Internal Bus (system reserved, NOT for user application)
|
||||
**Note:** In the implementation we divided the I2C controller into 2 categories:
|
||||
|
||||
In the implementation, we divide the I2C controller into 2 category.
|
||||
The first implementation is for system (internal bus) and the other one is for user application (external).
|
||||
Below figure describe the I2C Map inside the board:
|
||||
* Internal Bus, reserved for the system
|
||||
* Externel Bus, allocated for user application
|
||||
|
||||
## Internal Bus
|
||||
|
||||
!!! Warning
|
||||
Theses buses and addresses should not be accessed directly by user. Incorrect configuration can damage the board.
|
||||
|
||||
Bus 0:
|
||||
|
||||
|
@ -43,7 +30,6 @@ RK808-D | 0x1b | |
|
|||
SYR837 | 0x40 | |
|
||||
SYR838 | 0x41 | |
|
||||
|
||||
|
||||
Bus 2:
|
||||
|
||||
Slave | Address | Description|
|
||||
|
@ -57,36 +43,46 @@ Slave | Address | Description|
|
|||
------- | ------ |------ |
|
||||
FUSB302 | 0x22 | |
|
||||
|
||||
Above bus number and also including bus number 1,3,5 are reserved for system use, therefore not accessible to the user.
|
||||
|
||||
!!! Warning
|
||||
This bus number and address should not be accessed directly by user. Incorrect configuration can damaged the board!
|
||||
Above list also includes buses number 1,3,5 which are reserved for system use, therefore not accessible to the user.
|
||||
|
||||
## External Bus
|
||||
|
||||
Helios64 exposed Bus number 7 and 8 of the I2C in **P2** and **P1** pinout, respectively.
|
||||
This I2C bus can be connected to the external devices.
|
||||
Helios64 exposes Bus number 7 and 8 respectively on **P2** and **P1** headers.
|
||||
|
||||
As described on below figure of I2C (pin header number *3* and *4*), user can access the device at bus number 7.
|
||||
For the UEXT (pin header number *5* and *6*), user can access the device at bus number 8.
|
||||
All the I2C buses on the board are using voltage level of 3.3V. Note that Helios64 is integrated with level translator and pull up resistor.
|
||||
|
||||
All the I2C bus in the board are using voltage level of 3.3V, please notice Helios64 is integrated with level translator and pull up resistor.
|
||||
Please take caution of the reserved address when you use the I2C interface, below is the reserved address list:
|
||||
|
||||
### I2C at P1 Header
|
||||
Slave Address | R/W Bit | Description
|
||||
--------------|---------|-------------------
|
||||
000 0000 | 0 | General call address
|
||||
000 0000 | 1 | START byte(1)
|
||||
000 0001 | X | CBUS address(2)
|
||||
000 0010 | X | Reserved for different bus format (3)
|
||||
000 0011 | X | Reserved for future purposes
|
||||
000 01XX | X | Hs-mode master code
|
||||
111 10XX | X | 10-bit slave addressing
|
||||
111 11XX | X | Reserved for future purposes
|
||||
|
||||
Helios64 board exposes the SoC I2C Bus 1, on header **P1**. Below is the header pin-out.
|
||||
### I2C Header (P1)
|
||||
|
||||

|
||||
Helios64 board exposes I2C Bus 8 on header P1.
|
||||
|
||||
This I2C device working with 3 pin bus (SDA, SCK, and GND), and also in band addressing.
|
||||
We can use a 7 bit addressing to distinguish every device, but some address is reserved for the internal communication of the Helios64 board.
|
||||

|
||||
|
||||
### I2C at UEXT
|
||||
This I2C device works with 3 pin bus (SDA, SCL, and GND), and also in band addressing. Below is the header pin-out:
|
||||
|
||||
The I2C header bus also can be found at UEXT connector (can be found at **P2** header at the the board [overview](/helios64/hardware/overview) page) on the header number 5 and 6.
|
||||
Below is the detail description of the UEXT connector:
|
||||

|
||||
|
||||

|
||||
### UEXT Header (P2)
|
||||
|
||||
The I2C Bus 7 can be found on the UEXT header (P2).
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
Below is the full pinout of the UEXT header:
|
||||
|
||||
Pin No | Description
|
||||
--------|-------------
|
||||
|
@ -103,22 +99,16 @@ Pin No | Description
|
|||
|
||||
## Usage under Linux
|
||||
|
||||
### External bus block device under linux
|
||||
|
||||
Below table describe the external bus of I2C under Linux,
|
||||
Below table list the I2C external bus device name as detected under Linux:
|
||||
|
||||
Bus number | Device Block | Description |
|
||||
-----------|--------------|--------------|
|
||||
7 | /dev/i2c-7 | |
|
||||
8 | /dev/i2c-8 | |
|
||||
|
||||
|
||||
### Checking the I2C Communication under linux
|
||||
|
||||
In order to communicate with the I2C devices, first we need to identify the I2C bus.
|
||||
By performing scan you can see wether system detect the devices.
|
||||
|
||||
We can follow this step to perform the scanning process:
|
||||
In order to communicate with the I2C devices, first we need to identify the I2C bus. By performing scan you can see whether the system can detect device.
|
||||
|
||||
1. Install the Linux i2c tools.
|
||||
|
||||
|
@ -142,9 +132,4 @@ root@helios64:~# i2cdetect -y 8
|
|||
70: -- -- -- -- -- -- -- --
|
||||
```
|
||||
|
||||
Here we can see there is a device detected at the address 0x3c. If you have connected more than just one I2C device on the **P1** header, there will be more device with different address detected on the bus.
|
||||
|
||||
|
||||
### Application example
|
||||
|
||||
We have demonstrated the use of I2C bus of our board in the OLED application, as shown in the [I2C(OLED)](/helios4/i2c/) page you can communicate to the external device by using the external I2C bus.
|
||||
Here we can see there is a device detected at the address 0x3c. If you have connected more than just one I2C device on the **P1** header, there will be more devices with different addresses detected on the bus.
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 11 KiB |
BIN
docs/helios64/img/i2c/i2c.jpg
Normal file
BIN
docs/helios64/img/i2c/i2c.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 61 KiB |
BIN
docs/helios64/img/i2c/i2c_pinout.jpg
Normal file
BIN
docs/helios64/img/i2c/i2c_pinout.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 10 KiB |
Binary file not shown.
Before Width: | Height: | Size: 6.1 KiB |
BIN
docs/helios64/img/i2c/uext.jpg
Normal file
BIN
docs/helios64/img/i2c/uext.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 61 KiB |
BIN
docs/helios64/img/i2c/uext_pinout.jpg
Normal file
BIN
docs/helios64/img/i2c/uext_pinout.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
Loading…
Add table
Reference in a new issue