zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
10.55k stars 6.46k forks source link

samples/boards/reel_board/mesh_badge fails booting with error in i2c_nrfx_twim #27547

Closed jonas-rem closed 4 years ago

jonas-rem commented 4 years ago

Describe the bug When building and flashing samples/boards/reel_board/mesh_badge I get following error after boot: <err> i2c_nrfx_twim: Concatenation buffer is too small

This issue could be related to #25867 and the reel-board device tree. When I provide a concat-buf-size in the reel-board dts file, the demo works for me without error. I randomly tested a buffer size of 2. I'm not sure if this is the right way to fix it and how big the buffer size must be minum.

diff --git a/boards/arm/reel_board/dts/reel_board.dtsi b/boards/arm/reel_board/dts/reel_board.dtsi
index 60cd533480..ca7afd624f 100644
--- a/boards/arm/reel_board/dts/reel_board.dtsi
+++ b/boards/arm/reel_board/dts/reel_board.dtsi
@@ -119,6 +119,7 @@ arduino_i2c: &i2c0 {
        clock-frequency = <I2C_BITRATE_FAST>;
        sda-pin = <26>;
        scl-pin = <27>;
+       concat-buf-size = <2>;
        mma8652fc@1d {
                compatible = "nxp,fxos8700","nxp,mma8652fc";

To Reproduce Steps to reproduce the behavior:

  1. west build -b reel_board_v2 samples/boards/reel_board/mesh_badge -p
  2. west flash
  3. seeing error in the boot log of the reel-board

Expected behavior Demo should boot without error.

Impact I2c communication fails in this demo and the demo does not work.

Logs and console output Booting Zephyr OS build zephyr-v2.3.0-1774-g34859d0d3e40

Starting Board Demo
Bluetooth initialized
Mesh initialized
Board started
[00:00:01.284,393] <inf> TI_HDC: Initialized device successfully
[00:00:01.294,982] <inf> fs_nvs: 8 Sectors of 4096 bytes
[00:00:01.294,982] <inf> fs_nvs: alloc wra: 0, fc0
[00:00:01.295,013] <inf> fs_nvs: data wra: 0, 34
[00:00:01.296,386] <inf> bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)
[00:00:01.296,386] <inf> bt_hci_core: HW Variant: nRF52x (0x0002)
[00:00:01.296,386] <inf> bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version9
[00:00:01.296,691] <inf> bt_hci_core: No ID address. App must call settings_load()
[00:00:01.300,811] <inf> bt_hci_core: Identity: ea:94:43:d6:38:b6 (random)
[00:00:01.300,811] <inf> bt_hci_core: HCI: version 5.2 (0x0b) revision 0x0000, manufacturer 1
[00:00:01.300,842] <inf> bt_hci_core: LMP: version 5.2 (0x0b) subver 0xffff
[00:00:01.280,944] <err> i2c_nrfx_twim: Concatenation buffer is too small
[00:00:01.280,975] <err> APDS9960: ALS low threshold not set
[00:00:01.280,975] <err> APDS9960: Failed to setup ambient light functionality
[00:00:01.280,975] <err> APDS9960: Failed to setup device!

Environment:

pabigot commented 4 years ago

Increasing priority to medium as this affects multiple sensors and any Nordic board using TWIM.