Skip to main content

← Back to AOM-3821

AOM-DB3500 SPI CN1&SPI SN2&CN2 I2C——I2C/SPI

Contents​

  • 1I2C Pin Header 1.1CN2_I2C 1.2CN4_I2C
  • 2SPI PIN Header 2.1SPI_CN1 2.2J5 2.3SPI_CN2 2.4J6

I2C Pin Header​

AOM-3821 has two I2C-PIN-Header channels. Using EG70 Test Board to read I2C flash. Using I2C0 as an example:

I2C-PIN-Header
I2C Number
I2C0
I2C1

CN2_I2C​

CN2 CN2 Connector Pin Definition
Pin
1
2
3
4
# i2cdetect -y 5
# i2ctransfer -y 5 w4@0x51 0x1f 0xf0 0x22 0x33
# i2ctransfer -y 5 w2@0x51 0x1f 0xf0 r2
0x22 0x33 

CN4_I2C​

CN4 CN4 Connector Pin Definition
Pin
1
2
3
4
# i2cdetect -y 3
# i2ctransfer -y 3 w4@0x51 0x1f 0xf0 0x22 0x33
# i2ctransfer -y 3 w2@0x51 0x1f 0xf0 r2
0x22 0x33

SPI PIN Header​

AOM-3821 has two SPI-PIN-Header channels. SPIs on AOM-DB3500 have multi-functions, change to SPI PIN Header.

SPI_CN1​

SPI_CN1 Connector Pin Definition
Pin
1
2
3
4
5
6
7
8

J5​

J5 SPI1_CS0# or SPI1_CS1# Select
Pin
1-2
2-3

SPI_CN2​

SPI_CN2 Connector Pin Definition
Pin
1
2
3
4
5
6
7
8

J6​

J6 SPI0_CS0# or SPI0_CS1# Select
Pin
1-2
2-3

Using EG70 Test Board to read SPI flash. Test one SPI port alternatively:

# cat /proc/mtd | grep –c mtd01

Test two SPI ports at the same time:

# cat /proc/mtd | grep -c mtd11

RK Tool  Test:

# /tools/test/adv/spi/spi_test.sh 0
# /tools/test/adv/spi/spi_test.sh 1