I2C problems in SDK v2.6.0 on nRF5340DK

Enabling I2C support in the project leads to the infinite rebooting of the firmware. 

OS Windows 11, toolchain 2.6.0, SDK 2.6.0, VS code extensions, board file is nrf5340_nrf5340_cpuapp_ns. Easy way to reproduce:

1) Create the 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).

The issue looks similar to the one described in devzone.nordicsemi.com/.../i2c-issue-in-v2-6-0-sdk

Parents
  • Hello,

    I was able to reproduce this issue. It seems the problem occurs because logging is now enabled by default in TFM with UART1, which shares a peripheral ID with TWIM1 (see Peripherals with shared ID). This means that TWIM1 will be configured as a secure peripheral. A secure fault is triggered when the main app tries to initialize TWIM1.

    Please add the following symbols to your prj.conf to disable TFM logging and see if it fixes the problem:

    CONFIG_TFM_SECURE_UART=n
    CONFIG_TFM_LOG_LEVEL_SILENCE=y
    Best regards,
    Vidar
     
    Edit: I found this from the SDK v2.6.0 release notes:
    So, I think this explains why the issue started arising after v2.6.0.
    EDIT2: The course includes this note now:
Reply
  • Hello,

    I was able to reproduce this issue. It seems the problem occurs because logging is now enabled by default in TFM with UART1, which shares a peripheral ID with TWIM1 (see Peripherals with shared ID). This means that TWIM1 will be configured as a secure peripheral. A secure fault is triggered when the main app tries to initialize TWIM1.

    Please add the following symbols to your prj.conf to disable TFM logging and see if it fixes the problem:

    CONFIG_TFM_SECURE_UART=n
    CONFIG_TFM_LOG_LEVEL_SILENCE=y
    Best regards,
    Vidar
     
    Edit: I found this from the SDK v2.6.0 release notes:
    So, I think this explains why the issue started arising after v2.6.0.
    EDIT2: The course includes this note now:
Children
Related