diff --git a/3-advertisements/zephyr/advertise_bme280/nrf52840dk_nrf52840.overlay b/3-advertisements/zephyr/advertise_bme280/nrf52840dk_nrf52840.overlay index 2c5eea9..5e5587d 100644 --- a/3-advertisements/zephyr/advertise_bme280/nrf52840dk_nrf52840.overlay +++ b/3-advertisements/zephyr/advertise_bme280/nrf52840dk_nrf52840.overlay @@ -10,6 +10,23 @@ * Device address 0x76 is assumed. Your device may have a different * address; check your device documentation if unsure. */ +&pinctrl { + i2c0_default: i2c0_default { + group1 { + psels = , + ; + }; + }; + + i2c0_sleep: i2c0_sleep { + group1 { + psels = , + ; + low-power-enable; + }; + }; +}; + &i2c0 { status = "okay"; bme280@76 { diff --git a/3-advertisements/zephyr/advertise_bme280/nrf52840dongle_nrf52840.overlay b/3-advertisements/zephyr/advertise_bme280/nrf52840dongle_nrf52840.overlay index 2c5eea9..5e5587d 100644 --- a/3-advertisements/zephyr/advertise_bme280/nrf52840dongle_nrf52840.overlay +++ b/3-advertisements/zephyr/advertise_bme280/nrf52840dongle_nrf52840.overlay @@ -10,6 +10,23 @@ * Device address 0x76 is assumed. Your device may have a different * address; check your device documentation if unsure. */ +&pinctrl { + i2c0_default: i2c0_default { + group1 { + psels = , + ; + }; + }; + + i2c0_sleep: i2c0_sleep { + group1 { + psels = , + ; + low-power-enable; + }; + }; +}; + &i2c0 { status = "okay"; bme280@76 { diff --git a/4-connections/zephyr/peripheral_bme280/nrf52840dk_nrf52840.overlay b/4-connections/zephyr/peripheral_bme280/nrf52840dk_nrf52840.overlay index 2c5eea9..5e5587d 100644 --- a/4-connections/zephyr/peripheral_bme280/nrf52840dk_nrf52840.overlay +++ b/4-connections/zephyr/peripheral_bme280/nrf52840dk_nrf52840.overlay @@ -10,6 +10,23 @@ * Device address 0x76 is assumed. Your device may have a different * address; check your device documentation if unsure. */ +&pinctrl { + i2c0_default: i2c0_default { + group1 { + psels = , + ; + }; + }; + + i2c0_sleep: i2c0_sleep { + group1 { + psels = , + ; + low-power-enable; + }; + }; +}; + &i2c0 { status = "okay"; bme280@76 { diff --git a/4-connections/zephyr/peripheral_bme280/nrf52840dongle_nrf52840.overlay b/4-connections/zephyr/peripheral_bme280/nrf52840dongle_nrf52840.overlay index 2c5eea9..5e5587d 100644 --- a/4-connections/zephyr/peripheral_bme280/nrf52840dongle_nrf52840.overlay +++ b/4-connections/zephyr/peripheral_bme280/nrf52840dongle_nrf52840.overlay @@ -10,6 +10,23 @@ * Device address 0x76 is assumed. Your device may have a different * address; check your device documentation if unsure. */ +&pinctrl { + i2c0_default: i2c0_default { + group1 { + psels = , + ; + }; + }; + + i2c0_sleep: i2c0_sleep { + group1 { + psels = , + ; + low-power-enable; + }; + }; +}; + &i2c0 { status = "okay"; bme280@76 { diff --git a/5-security/zephyr/peripheral_bme280_secure_l2/nrf52840dk_nrf52840.overlay b/5-security/zephyr/peripheral_bme280_secure_l2/nrf52840dk_nrf52840.overlay index 2c5eea9..5e5587d 100644 --- a/5-security/zephyr/peripheral_bme280_secure_l2/nrf52840dk_nrf52840.overlay +++ b/5-security/zephyr/peripheral_bme280_secure_l2/nrf52840dk_nrf52840.overlay @@ -10,6 +10,23 @@ * Device address 0x76 is assumed. Your device may have a different * address; check your device documentation if unsure. */ +&pinctrl { + i2c0_default: i2c0_default { + group1 { + psels = , + ; + }; + }; + + i2c0_sleep: i2c0_sleep { + group1 { + psels = , + ; + low-power-enable; + }; + }; +}; + &i2c0 { status = "okay"; bme280@76 { diff --git a/5-security/zephyr/peripheral_bme280_secure_l2/nrf52840dongle_nrf52840.overlay b/5-security/zephyr/peripheral_bme280_secure_l2/nrf52840dongle_nrf52840.overlay index 2c5eea9..5e5587d 100644 --- a/5-security/zephyr/peripheral_bme280_secure_l2/nrf52840dongle_nrf52840.overlay +++ b/5-security/zephyr/peripheral_bme280_secure_l2/nrf52840dongle_nrf52840.overlay @@ -10,6 +10,23 @@ * Device address 0x76 is assumed. Your device may have a different * address; check your device documentation if unsure. */ +&pinctrl { + i2c0_default: i2c0_default { + group1 { + psels = , + ; + }; + }; + + i2c0_sleep: i2c0_sleep { + group1 { + psels = , + ; + low-power-enable; + }; + }; +}; + &i2c0 { status = "okay"; bme280@76 { diff --git a/ERRATA.rst b/ERRATA.rst index 68509ba..693dcda 100644 --- a/ERRATA.rst +++ b/ERRATA.rst @@ -19,7 +19,7 @@ Chapter 3: Broadcasting data with advertisements * page 77: The sentence beginning with "if you look up its definition" should start with a capital letter: "If you look up its definition". * page 78: The sentence "The ``BT_LE_ADV_PARAM`` macro is another helper macro:" shouldn't be in the code block, but on a normal line, referring to the rest of the code block. * page 82: Connect pin 0.26 of the nRF52840 Dongle to SDA and 0.27 to SCL. -* page 84: Remove the definitions ``sda-pin``, ``scl-pin``, and ``label`` from the devicetree overlay. The nRF52840 Dongle's devicetree has already defined an I²C bus with SDA pin 0.26 and SCL pin 0.27. The same holds for the nRF52840 Development Kit's devicetree overlay. This is fixed in the code in this repository. The sentences "This overlay defines a BME280 sensor on the I²C bus with SDA pin 31 and SCL pin 29, with address 0x76. So, with this overlay, you can use the BME280 sensor connected to pins 0.31 (SDA) and 0.29 (SCL)." should read "This overlay defines a BME280 sensor on the I²C bus 0, which by default assigns SDA to pin 0.26 and SCL to pin 0.27, with address 0x76. So, with this overlay, you can use the BME280 sensor connected to pins 0.26 (SDA) and 0.27 (SCL)." +* page 84: Remove the definitions ``sda-pin``, ``scl-pin``, and ``label`` from the devicetree overlay and add Pin Control definitions to change the default pins of the I²C bus to 0.31 (SDA) and 0.29 (SDA). This is fixed in the code in this repository. ****************************************** Chapter 7: Reverse engineering BLE devices