From 23c6debc63ea067d79f9099428ffc1f1cba46e57 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Thu, 25 Jan 2018 13:33:09 -0600 Subject: [PATCH] configs/flipnclick-sam3x: Update README and comments to discuss I2C access on all mikroBUS connectors. --- configs/flipnclick-sam3x/README.txt | 28 +++++++++++++++++++++++ configs/flipnclick-sam3x/include/board.h | 29 ++++++++++++++++++++++++ 2 files changed, 57 insertions(+) diff --git a/configs/flipnclick-sam3x/README.txt b/configs/flipnclick-sam3x/README.txt index 6f28689505..bdfab6df68 100644 --- a/configs/flipnclick-sam3x/README.txt +++ b/configs/flipnclick-sam3x/README.txt @@ -15,6 +15,7 @@ Contents - Buttons and LEDs - Serial Consoles - SPI + - I2C - Loading Code - Flip&Click SAM3X-specific Configuration Options - Configurations @@ -154,6 +155,33 @@ SPI MISO SPI0_MISO PA25 MISO SPI0_MISO PA25 MOSI SPI0_MOSI PA26 MOSI SPI0_MOSI PA26 +I2C +=== + + I2C0 is available on pins D16-D17 of the Arduino Shield connectors where + you would expect then. The SPI connector is configured as follows: + + Pin Label J1 Board Signal SAM3X + --- ----- -- ------------ ----- + D16 SCL1 8 I2C0_SCL PA17 + D17 SDA1 7 I2C0_SDA PA18 + + I2C0 and I2C1 are also available on the mikroBUS Click connectors (in + addition to 5V and GND). The connectors A and B share I2C0 with the + Arduino shield connector. Connectors C and D both connect to I2C1: + + MikroBUS A: MikroBUS B: + Pin Board Signal SAM3X Pin Board Signal SAM3X + ---- ------------ ----- ---- ------------ ------- + SCL I2C0_SCL PA17 SCL I2C0_SCL PA17 + SDA I2C0_SDA PA1 SDA I2C0_SDA PA18 + + MikroBUS C: MikroBUS D: + Pin Board Signal SAM3X Pin Board Signal SAM3X + ---- ------------ ----- ---- ------------ ------- + SCL I2C1_SCL PB13 SCL I2C1_SCL PB13 + SDA I2C1_SDA PB12 SDA I2C1_SDA PB12 + Loading Code ============ diff --git a/configs/flipnclick-sam3x/include/board.h b/configs/flipnclick-sam3x/include/board.h index dd72568d78..fe0246747d 100644 --- a/configs/flipnclick-sam3x/include/board.h +++ b/configs/flipnclick-sam3x/include/board.h @@ -295,4 +295,33 @@ #define GPIO_SPI0_SPCK GPIO_SPI0_SPCK_1 +/* I2C (aka TWI): + * + * I2C0 is available on pins D16-D17 of the Arduino Shield connectors where + * you would expect then. The SPI connector is configured as follows: + * + * Pin Label J1 Board Signal SAM3X + * --- ----- -- ------------ ----- + * D16 SCL1 8 I2C0_SCL PA17 + * D17 SDA1 7 I2C0_SDA PA18 + * + * I2C0 and I2C1 are also available on the mikroBUS Click connectors (in + * addition to 5V and GND). The connectors A and B share I2C0 with the + * Arduino shield connector. Connectors C and D both connect to I2C1: + * + * MikroBUS A: MikroBUS B: + * Pin Board Signal SAM3X Pin Board Signal SAM3X + * ---- ------------ ----- ---- ------------ ------- + * SCL I2C0_SCL PA18 SCL I2C0_SCL PA18 + * SDA I2C0_SDA PA17 SDA I2C0_SDA PA17 + * + * MikroBUS C: MikroBUS D: + * Pin Board Signal SAM3X Pin Board Signal SAM3X + * ---- ------------ ----- ---- ------------ ------- + * SCL I2C1_SCL PB13 SCL I2C1_SCL PB13 + * SDA I2C1_SDA PB12 SDA I2C1_SDA PB12 + * + * There are no alternative pin selections for TWI0 and TWI1. + */ + #endif /* __CONFIGS_FLIPNCLICK_SAM3X_INCLUDE_BOARD_H */