adding certain configurations such as i2c stops console printing on nrf5340 sdk 2.6.1

Hello,
I've been trying to start few blank projects on sdk 2.6.1 and I noticed that some configurations stop the console output including CONFIG_I2C=y.

I even tried the simple hello world sample, with and without the i2c configuration, and I confirmed that adding the configuration cause the console to stop printing. so I went ahead and tried the ti,hdc sensor sample and I got the same issue.

I am not sure if this is a known issue but if anyone was able to resolve it please let me know.

thank you for your time,

Kalbani,

  • this seems to only happen when building with cpuapp_ns

  • I even tried the simple hello world sample, with and without the i2c configuration

    Not sure what you meant without I2C configuration, sounded as if the out of the box sample is not working so trying it out. Tried without I2C on a non secure build and it seems to work ok

    And the Serial output also seems is ok.

    Adding CONFIG_I2C=y in prj.conf needs us to initialize the device tree for I2C instance and its pinctrl properly otherwise it build gives a hardfault in pinctrl_nrf.c->pinctrl_configure_pins because you did not set the pinctrl configs for the I2C that needed to be used for this sample. Set the I2C1 instance properly that seem to be enabled (in .config CONFIG_NRFX_TWIM=y CONFIG_NRFX_TWIM1=y are set).

    Seems like in non secure builds it is a bit restrictive on peripheral access which is a good thing as trying to use I2C without properly setting it in device tree seems like a mistake.

Related