This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF5340-DK & CCS811 sensor, doesn't reach main()

Hi,

I'm working with the CCS811 sensor example from the `v1.5.1/zephyr/samples/sensor` folder and I managed to compile it successfully after modifying the files in the `ccs811/boards` directory. When I debug the solution, the debugger enters in continued execution mode and never reaches the main() function. Every time I hit  "Pause", the code always pauses in the same place, as it is shown in the following screen capture:

I'm using the nRF Connect SDK V1.5.1 (tried with V1.5.0 also). In the `ccs811/boards` folder I have two files:

nrf5340dk_nrf5340_cpuapp.overlay:

&i2c1 {
        status = "okay";
        sda-pin = <0>;
        scl-pin = <1>;

	/* Sparkfun Environment Combo uses second I2C address */
        ccs811: ccs811@5b {
                compatible = "ams,ccs811";
                reg = <0x5b>;
                label = "CCS811";
                irq-gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
                wake-gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
                reset-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
        };
};

And nrf5340dk_nrf5340_cpuapp.conf:

CONFIG_STDOUT_CONSOLE=y
CONFIG_SENSOR=y
CONFIG_CCS811=y
#CONFIG_CCS811_DRIVE_MODE_2=y
#CONFIG_CCS811_TRIGGER_GLOBAL_THREAD=y
#CONFIG_CCS811_TRIGGER_OWN_THREAD=y

Any hints about what could be the issue? Thanks in advance!

Related