I2C issue in v2.6.0 SDK

Hello,

So I had a project for Sparkfun nRF9160 Thing plus on toolchain/SDK v2.5.2. Today I noticed that v2.6.0 is out and decided to upgrade. I used basic cellular udp sample to get the lowest Thing Plus baseline current and noticed something strange. So I needed to put any used peripheral in suspended state. Since there is an onboard accelerometer which needed some additional configuring in .overlay file  naturally in main() I tried to suspend the i2c the device used. When I enabled `CONFIG_I2C=y` in .conf file project built just fine but after programming I checked the current profile which had strange pattern so I enabled serial output and noticed that application constantly resets itself. 
The output it gives:

E: ***** BUS FAULT *****
E: Precise data bus error
E: BFAR Address: 0x0
E: r0/a1: 0x0001b120 r1/a2: 0x00d00000 r2/a3: 0x00000000
E: r3/a4: 0x0000000c r12/ip: 0x00000001 r14/lr: 0x000181b5
E: xpsr: 0x81000000
E: Faulting instruction address (r15/pc): 0x0000bfdc
E: >>> ZEPHYR FATAL ERROR 25: Unknown error on CPU 0
E: Current thread: 0x2000ca18 (unknown)
E: Resetting system

So I just wanted to point out, that there is something broken in v2.6.0. I reverted back to 2.5.2 and everything runs smoothly. 

To replicate this issue:

1) Upgrade toolchain and SDK version to 2.6.0 in VS code;

2) Create a new application based on cellular UDP sample;

3) Enable serial output in `proj.conf` and also arr "CONFIG_I2C=y";

4) After building and programming, you should get the same output

Here is the generated support information:

For help and support, visit the Nordic DevZone at https://devzone.nordicsemi.com/.

{
  "platform": {
    "os": "win32",
    "osVersion": "Windows 10 Enterprise",
    "osKernel": "10.0.19045",
    "vscode": "1.87.2",
    "electron": "27.3.2",
    "node": "v18.17.1"
  },
  "system": {
    "date": "2024-03-14T10:21:25.812Z",
    "vscodeRoot": "c:\\Users\\andrisku\\AppData\\Local\\Programs\\Microsoft VS Code\\resources\\app",
    "nrfConnectForDesktopInstalled": true,
    "vscodeUptime": "00:09:56",
    "osUptime": "03:32:53",
    "cpu": "13th Gen Intel(R) Core(TM) i7-1355U"
  },
  "workspace": {
    "name": "udp",
    "workspaceFile": null,
    "folders": [
      "c:\\Users\\andrisku\\Desktop\\nrf_workspace\\udp"
    ]
  },
  "sdks": [
    {
      "version": "v2.6.0",
      "path": "c:\\ncs\\v2.6.0"
    },
    {
      "version": "v2.5.2",
      "path": "c:\\ncs\\v2.5.2"
    },
    {
      "version": "v2.5.0",
      "path": "c:\\Users\\andrisku\\Desktop\\west-workspace\\chester-sdk"
    }
  ],
  "activeBuild": "c:\\Users\\andrisku\\Desktop\\nrf_workspace\\udp\\build",
  "apps": [
    {
      "workspace": "c:\\Users\\andrisku\\Desktop\\nrf_workspace\\udp",
      "uri": "c:\\Users\\andrisku\\Desktop\\nrf_workspace\\udp",
      "buildConfigurations": [
        {
          "id": "c:\\Users\\andrisku\\Desktop\\nrf_workspace\\udp\\build",
          "name": "build",
          "boardId": "sparkfun_thing_plus_nrf9160_ns",
          "type": "Zephyr",
          "isChild": false,
          "isStale": false,
          "taskBindings": {
            "build": [],
            "pristineBuild": [],
            "flash": [],
            "eraseAndFlash": []
          }
        }
      ]
    }
  ],
  "topdir": "c:\\ncs\\v2.6.0",
  "workspaceState": "freestanding-ready",
  "toolchains": [
    {
      "version": "2.6.0",
      "path": "c:\\ncs\\toolchains\\cf2149caf2"
    },
    {
      "version": "2.5.2",
      "path": "c:\\ncs\\toolchains\\c57af46cb7"
    }
  ],
  "connectedDevices": [
    {
      "serialNumber": "000960065539"
    }
  ],
  "deviceProvider": "nrfutil",
  "tools": {
    "C:\\ncs\\toolchains\\cf2149caf2\\opt\\zephyr-sdk\\arm-zephyr-eabi\\bin\\arm-zephyr-eabi-gcc.exe": "0.16.5",
    "C:\\Program Files\\SEGGER\\JLink_V794e\\JLink.exe": "7.94e",
    "C:\\Program Files\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\nrfjprog.exe": "10.24.0",
    "nrfutil": "Not found",
    "C:\\ncs\\toolchains\\cf2149caf2\\opt\\bin\\cmake.exe": "3.21.0",
    "C:\\ncs\\toolchains\\cf2149caf2\\opt\\bin\\Scripts\\west.exe": "1.2.0",
    "C:\\ncs\\toolchains\\cf2149caf2\\opt\\bin\\python.exe": "3.9.13",
    "C:\\ncs\\toolchains\\cf2149caf2\\opt\\bin\\ninja.exe": "1.10.2",
    "C:\\ncs\\toolchains\\cf2149caf2\\opt\\bin\\gperf.exe": "3.1",
    "C:\\ncs\\toolchains\\cf2149caf2\\opt\\bin\\dtc.exe": "1.4.7",
    "C:\\ncs\\toolchains\\cf2149caf2\\opt\\bin\\gn.exe": "2154",
    "C:\\ncs\\toolchains\\cf2149caf2\\mingw64\\bin\\git.exe": "2.37.3.windows.1",
    "gdbPath": "c:\\ncs\\toolchains\\cf2149caf2\\opt\\zephyr-sdk\\arm-zephyr-eabi\\bin\\arm-zephyr-eabi-gdb.exe"
  },
  "nrfutil": {
    "nrfutil-device": {
      "version": "2.0.0",
      "binPath": "c:\\Users\\andrisku\\.vscode\\extensions\\nordic-semiconductor.nrf-connect-2024.2.214-win32-x64\\platform\\nrfutil\\bin\\nrfutil-device"
    },
    "nrfutil-toolchain-manager": {
      "version": "0.14.1",
      "binPath": "c:\\Users\\andrisku\\.vscode\\extensions\\nordic-semiconductor.nrf-connect-2024.2.214-win32-x64\\platform\\nrfutil\\bin\\nrfutil-toolchain-manager"
    }
  },
  "environment": {
    "westEnv": {
      "ELECTRON_RUN_AS_NODE": "1",
      "HOME": "C:\\Users\\andrisku",
      "HOMEDRIVE": "V:",
      "HOMEPATH": "\\",
      "PATH": "C:\\ncs\\toolchains\\cf2149caf2;C:\\ncs\\toolchains\\cf2149caf2\\mingw64\\bin;C:\\ncs\\toolchains\\cf2149caf2\\bin;C:\\ncs\\toolchains\\cf2149caf2\\opt\\bin;C:\\ncs\\toolchains\\cf2149caf2\\opt\\bin\\Scripts;C:\\ncs\\toolchains\\cf2149caf2\\opt\\nanopb\\generator-bin;C:\\ncs\\toolchains\\cf2149caf2\\opt\\zephyr-sdk\\aarch64-zephyr-elf\\bin;C:\\ncs\\toolchains\\cf2149caf2\\opt\\zephyr-sdk\\x86_64-zephyr-elf\\bin;C:\\ncs\\toolchains\\cf2149caf2\\opt\\zephyr-sdk\\arm-zephyr-eabi\\bin;C:\\ncs\\toolchains\\cf2149caf2\\opt\\zephyr-sdk\\riscv64-zephyr-elf\\bin;c:\\Users\\andrisku\\.vscode\\extensions\\nordic-semiconductor.nrf-connect-2024.2.214-win32-x64\\platform\\nrfutil\\lib\\nrfutil-toolchain-manager;C:\\WINDOWS\\CCM\\;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\WINDOWS\\system32\\config\\systemprofile\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Program Files (x86)\\Adaptiva\\AdaptivaClient\\bin\\x32;C:\\Program Files (x86)\\Adaptiva\\AdaptivaClient\\bin\\x64;C:\\Program Files (x86)\\IDEMIA\\AWP\\Dlls;C:\\Program Files\\IDEMIA\\AWP\\Dlls;C:\\Program Files (x86)\\eParaksts Token Signing\\;C:\\Program Files\\Gemalto\\Classic Client\\BIN;C:\\Program Files (x86)\\Gemalto\\Classic Client\\BIN;C:\\Program Files\\PuTTY\\;C:\\ncs\\v2.5.2\\toolchain\\bin;C:\\Program Files\\SEGGER\\JLink;C:\\Users\\andrisku\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python312\\Scripts;C:\\Program Files\\CMake\\bin;C:\\Program Files\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\;C:\\Program Files (x86)\\GNU Arm Embedded Toolchain\\10 2021.10\\bin;C:\\Program Files\\Git\\cmd;C:\\Users\\andrisku\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\andrisku\\AppData\\Local\\Programs\\Microsoft VS Code\\bin",
      "ZEPHYR_BASE": "c:\\ncs\\v2.6.0\\zephyr",
      "ZEPHYR_TOOLCHAIN_VARIANT": "zephyr",
      "ZEPHYR_SDK_INSTALL_DIR": "C:\\ncs\\toolchains\\cf2149caf2\\opt\\zephyr-sdk",
      "PYTHONPATH": "C:\\ncs\\toolchains\\cf2149caf2\\opt\\bin;C:\\ncs\\toolchains\\cf2149caf2\\opt\\bin\\Lib;C:\\ncs\\toolchains\\cf2149caf2\\opt\\bin\\Lib\\site-packages"
    },
    "inherited": {
      "ELECTRON_RUN_AS_NODE": "1",
      "HOME": "C:\\Users\\andrisku",
      "HOMEDRIVE": "V:",
      "HOMEPATH": "\\",
      "Path": "C:\\WINDOWS\\CCM\\;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\WINDOWS\\system32\\config\\systemprofile\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Program Files (x86)\\Adaptiva\\AdaptivaClient\\bin\\x32;C:\\Program Files (x86)\\Adaptiva\\AdaptivaClient\\bin\\x64;C:\\Program Files (x86)\\IDEMIA\\AWP\\Dlls;C:\\Program Files\\IDEMIA\\AWP\\Dlls;C:\\Program Files (x86)\\eParaksts Token Signing\\;C:\\Program Files\\Gemalto\\Classic Client\\BIN;C:\\Program Files (x86)\\Gemalto\\Classic Client\\BIN;C:\\Program Files\\PuTTY\\;C:\\ncs\\v2.5.2\\toolchain\\bin;C:\\Program Files\\SEGGER\\JLink;C:\\Users\\andrisku\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python312\\Scripts;C:\\Program Files\\CMake\\bin;C:\\Program Files\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\;C:\\Program Files (x86)\\GNU Arm Embedded Toolchain\\10 2021.10\\bin;C:\\Program Files\\Git\\cmd;C:\\Users\\andrisku\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\andrisku\\AppData\\Local\\Programs\\Microsoft VS Code\\bin",
      "PATH": "C:\\WINDOWS\\CCM\\;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\WINDOWS\\system32\\config\\systemprofile\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Program Files (x86)\\Adaptiva\\AdaptivaClient\\bin\\x32;C:\\Program Files (x86)\\Adaptiva\\AdaptivaClient\\bin\\x64;C:\\Program Files (x86)\\IDEMIA\\AWP\\Dlls;C:\\Program Files\\IDEMIA\\AWP\\Dlls;C:\\Program Files (x86)\\eParaksts Token Signing\\;C:\\Program Files\\Gemalto\\Classic Client\\BIN;C:\\Program Files (x86)\\Gemalto\\Classic Client\\BIN;C:\\Program Files\\PuTTY\\;C:\\ncs\\v2.5.2\\toolchain\\bin;C:\\Program Files\\SEGGER\\JLink;C:\\Users\\andrisku\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python312\\Scripts;C:\\Program Files\\CMake\\bin;C:\\Program Files\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\;C:\\Program Files (x86)\\GNU Arm Embedded Toolchain\\10 2021.10\\bin;C:\\Program Files\\Git\\cmd;C:\\Users\\andrisku\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\andrisku\\AppData\\Local\\Programs\\Microsoft VS Code\\bin"
    },
    "toolchainPath": "c:\\ncs\\toolchains\\cf2149caf2",
    "toolchainBinPath": "c:\\ncs\\toolchains\\cf2149caf2\\opt\\zephyr-sdk\\arm-zephyr-eabi\\bin",
    "toolchainVersion": "2.6.0"
  },
  "terminal": {
    "defaultProfile": null
  },
  "config": {
    "nordic-semiconductor.nrf-connect": {
      "topdir": "C:\\ncs\\v2.6.0",
      "toolchain": {
        "path": "C:\\ncs\\toolchains"
      },
      "ozonePath": "C:\\Program Files\\SEGGER\\Ozone\\Ozone.exe",
      "applications": [],
      "applicationOptions": {},
      "kconfig": {
        "interface": "kconfig"
      },
      "west": {
        "env": {
          "$base": "terminal"
        }
      },
      "boardRoots": [
        "C:\\ncs\\v2.6.0\\zephyr\\boards\\arm"
      ],
      "taskBindings": {},
      "buildTerminal": {
        "condensedProgress": true
      },
      "debugging": {
        "flash": true,
        "bindings": {},
        "justMyCode": true
      },
      "activeAppFollowActiveEditor": true,
      "deviceProvider": "",
      "flash": {
        "softreset": false,
        "erase": true,
        "recover": false
      },
      "enableTelemetry": false,
      "thirdpartyIntegration": {},
      "toolchainManager": {
        "indexURL": null,
        "installDirectory": ""
      },
      "nrfutil": {
        "home": "C:\\Users\\andrisku\\.nrfutil"
      },
      "defaultOpenAction": "ask"
    },
    "nordic-semiconductor.nrf-terminal": {
      "terminalMode": "character"
    }
  },
  "extensions": {
    "internal": {
      "nordic-semiconductor.nrf-connect": {
        "version": "2024.2.214",
        "path": "c:\\Users\\andrisku\\.vscode\\extensions\\nordic-semiconductor.nrf-connect-2024.2.214-win32-x64",
        "isActive": true
      },
      "nordic-semiconductor.nrf-terminal": {
        "version": "2024.2.78",
        "path": "c:\\Users\\andrisku\\.vscode\\extensions\\nordic-semiconductor.nrf-terminal-2024.2.78",
        "isActive": true
      },
      "nordic-semiconductor.nrf-devicetree": {
        "version": "2024.2.418",
        "path": "c:\\Users\\andrisku\\.vscode\\extensions\\nordic-semiconductor.nrf-devicetree-2024.2.418",
        "isActive": true
      },
      "nordic-semiconductor.nrf-kconfig": {
        "version": "2024.2.71",
        "path": "c:\\Users\\andrisku\\.vscode\\extensions\\nordic-semiconductor.nrf-kconfig-2024.2.71",
        "isActive": true
      }
    },
    "external": {
      "marus25.cortex-debug": null,
      "ms-vscode.cpptools": "1.19.8",
      "ms-vscode.js-debug": "1.87.0",
      "ms-vscode.js-debug-companion": "1.1.2",
      "ms-vscode.vscode-js-profile-table": "1.0.8",
      "ms-vscode.cmake-tools": "1.17.17",
      "ms-vscode.cpptools-extension-pack": "1.3.0",
      "ms-vscode.cpptools-themes": "2.0.0",
      "trond-snekvik.gnu-mapfiles": "1.1.0",
      "twxs.cmake": "0.0.17"
    }
  }
}

Hope this helps you to solve the issue! 

Regards,

Andris

Parents Reply
  • Yes, Windows 11, toolchain 2.6.0, SDK 2.6.0, VS code extensions, nrf5340_nrf5340_cpuapp_ns. Easy way to reproduce:

    1) Create new application from blinky sample, build, flash, the LED is blinking.

    2) Add string CONFIG_I2C=y to the prj.conf. Build, flash, LED is turned off all the time.

    With toolchain 2.5.2 and SDK 2.5.2 everything is working (not only this simple sample, but I2C communication itself).

Children
Related