<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Lis3dh interrupt pins configuration</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/104448/lis3dh-interrupt-pins-configuration</link><description>Hello everyone! I&amp;#39;m trying to implement the usage of accelerometer LIS3DH on a custom board. My board has nRF52832 microcontroller as the brain and a few ICs for different parts of the device like a lithium-ion solar battery charger, a LDO voltage regulator</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 25 Apr 2024 13:59:26 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/104448/lis3dh-interrupt-pins-configuration" /><item><title>RE: Lis3dh interrupt pins configuration</title><link>https://devzone.nordicsemi.com/thread/480728?ContentTypeID=1</link><pubDate>Thu, 25 Apr 2024 13:59:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fb21ec2d-2614-4225-b0fa-ebfaff2fc4ec</guid><dc:creator>J0sh1101</dc:creator><description>&lt;p&gt;I am glad that I could help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Lis3dh interrupt pins configuration</title><link>https://devzone.nordicsemi.com/thread/480692?ContentTypeID=1</link><pubDate>Thu, 25 Apr 2024 12:37:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a596902c-8de8-47e3-abd9-f43c99ab513f</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Thanks for sharing!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Lis3dh interrupt pins configuration</title><link>https://devzone.nordicsemi.com/thread/480675?ContentTypeID=1</link><pubDate>Thu, 25 Apr 2024 12:00:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b3db3dc8-608e-415d-a479-0398ebb32a77</guid><dc:creator>J0sh1101</dc:creator><description>&lt;p&gt;Hi ,&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;I have been working with the lis3d and the lis2dh driver for some time now and from my point of view the driver does not support free fall or any tap functions.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;To make it work, as you pointed out a bit, you need to extend the switch(attr) for the function you want to implement (for example free-fall). Add a callback function with sensor_trigger_set(). This callback will be executed when the interrupt is being set from the lis accelerometer and do what you need in the functions. &lt;br /&gt;&lt;br /&gt;An online example can be found here, where the interrupt threshold is defined and the interrupt is waited for (no polling) :&amp;nbsp;&lt;a id="" href="https://github.com/circuitdojo/nrf9160-feather-examples-and-drivers/blob/v2.4.x/samples/tracker/src/motion/app_motion.c"&gt;https://github.com/circuitdojo/nrf9160-feather-examples-and-drivers/blob/v2.4.x/samples/tracker/src/motion/app_motion.c&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Here is the video from&amp;nbsp;Circuit Dojo, he explain it is in his video:&amp;nbsp;&lt;a href="https://www.youtube.com/watch?v=EhSgynt1lj8&amp;amp;list=PLJKv3qSDEE-lYuq5hMpJ_sSHQcuhO1S-P&amp;amp;index=10"&gt;https://www.youtube.com/watch?v=EhSgynt1lj8&amp;amp;list=PLJKv3qSDEE-lYuq5hMpJ_sSHQcuhO1S-P&amp;amp;index=10&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Here is the example, but simplified. If you update your main.c like this and update your prj.conf accordingly, then it should work. Now you have a good starting point for development.&lt;/p&gt;
&lt;p&gt;main:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;
#include &amp;lt;stdio.h&amp;gt;
#include &amp;lt;zephyr/kernel.h&amp;gt;
#include &amp;lt;zephyr/device.h&amp;gt;
#include &amp;lt;zephyr/drivers/sensor.h&amp;gt;


static void fetch_and_display(const struct device *sensor)
{
	static unsigned int count;
	struct sensor_value accel[3];
	struct sensor_value temperature;
	const char *overrun = &amp;quot;&amp;quot;;
	int rc = sensor_sample_fetch(sensor);

	++count;
	if (rc == -EBADMSG) {
		/* Sample overrun.  Ignore in polled mode. */
		if (IS_ENABLED(CONFIG_LIS2DH_TRIGGER)) {
			overrun = &amp;quot;[OVERRUN] &amp;quot;;
		}
		rc = 0;
	}
	if (rc == 0) {
		rc = sensor_channel_get(sensor,
					SENSOR_CHAN_ACCEL_XYZ,
					accel);
	}
	if (rc &amp;lt; 0) {
		printf(&amp;quot;ERROR: Update failed: %d\n&amp;quot;, rc);
	} else {
		printf(&amp;quot;#%u @ %u ms: %sx %f , y %f , z %f&amp;quot;,
		       count, k_uptime_get_32(), overrun,
		       sensor_value_to_double(&amp;amp;accel[0]),
		       sensor_value_to_double(&amp;amp;accel[1]),
		       sensor_value_to_double(&amp;amp;accel[2]));
	}

	if (IS_ENABLED(CONFIG_LIS2DH_MEASURE_TEMPERATURE)) {
		if (rc == 0) {
			rc = sensor_channel_get(sensor, SENSOR_CHAN_DIE_TEMP, &amp;amp;temperature);
			if (rc &amp;lt; 0) {
				printf(&amp;quot;\nERROR: Unable to read temperature:%d\n&amp;quot;, rc);
			} else {
				printf(&amp;quot;, t %f\n&amp;quot;, sensor_value_to_double(&amp;amp;temperature));
			}
		}

	} else {
		printf(&amp;quot;\n&amp;quot;);
	}
}

#ifdef CONFIG_LIS2DH_TRIGGER
static void trigger_handler(const struct device *dev,
			    const struct sensor_trigger *trig)
{
	fetch_and_display(dev);
}
#endif

int main(void)
{
	const struct device *const sensor = DEVICE_DT_GET_ANY(st_lis2dh);

	printf(&amp;quot;Let&amp;#39;s start.\n&amp;quot;);
	if (sensor == NULL) {
		printf(&amp;quot;No device found\n&amp;quot;);
		return 0;
	}
	if (!device_is_ready(sensor)) {
		printf(&amp;quot;Device %s is not ready\n&amp;quot;, sensor-&amp;gt;name);
		return 0;
	}

#if CONFIG_LIS2DH_TRIGGER
	{
		struct sensor_trigger trig;
		struct sensor_value attr;
		int rc;

		//trig.type = SENSOR_TRIG_DATA_READY; // data ready triggere every time the data is ready we got data. 
		//trig.chan = SENSOR_CHAN_ACCEL_XYZ;


		/* Set to 1.5G in m/s^2 */
    	attr.val1 = 0;
    	attr.val2 = (int32_t)(SENSOR_G * 1.3);

		rc = sensor_attr_set(sensor, SENSOR_CHAN_ACCEL_XYZ,
                         SENSOR_ATTR_SLOPE_TH, &amp;amp;attr);
    	if (rc &amp;lt; 0)
    	{
        	printf(&amp;quot;Cannot set slope threshold.&amp;quot;);
		}

		// Set trigger values 
    	trig.type = SENSOR_TRIG_DELTA;
    	trig.chan = SENSOR_CHAN_ACCEL_XYZ;

		rc = sensor_trigger_set(sensor, &amp;amp;trig, trigger_handler);
		if (rc != 0) {
			printf(&amp;quot;Failed to set trigger: %d\n&amp;quot;, rc);
			return 0;
		}

		printf(&amp;quot;Waiting for triggers\n&amp;quot;);
		while (true) {
			//fetch_and_display(sensor);
			k_sleep(K_MSEC(2000));
		}
	}
#else /* CONFIG_LIS2DH_TRIGGER */
	printf(&amp;quot;Polling at 0.5 Hz\n&amp;quot;);
	while (true) {
		fetch_and_display(sensor);
		k_sleep(K_MSEC(2000));
	}
#endif /* CONFIG_LIS2DH_TRIGGER */
}
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;prj.conf:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_STDOUT_CONSOLE=y
CONFIG_I2C=y
CONFIG_SENSOR=y
CONFIG_CBPRINTF_FP_SUPPORT=y


CONFIG_LIS2DH=y
CONFIG_LIS2DH_TRIGGER_GLOBAL_THREAD=y
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Peace out.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Lis3dh interrupt pins configuration</title><link>https://devzone.nordicsemi.com/thread/449916?ContentTypeID=1</link><pubDate>Wed, 11 Oct 2023 18:54:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:61397dac-9073-4ae2-8fb0-f0f87210a053</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;I don&amp;#39;t know why freefall is not supported, but in terms of how to enable both INT1 and INT2 you&amp;nbsp;first look at how only INT1 is used here:&lt;br /&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/main/boards/arm/thingy52_nrf52832/thingy52_nrf52832.dts#L184"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/main/boards/arm/thingy52_nrf52832/thingy52_nrf52832.dts#L184&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The only difference to support INT1 and INT2 would be to modify irq-gpios to add a second pin, e.g.:&lt;br /&gt;irq-gpios = &amp;lt;&amp;amp;gpio0 12 GPIO_ACTIVE_HIGH&amp;gt;,&amp;nbsp;&lt;span&gt;&amp;lt;&amp;amp;gpio0 13 GPIO_ACTIVE_HIGH&amp;gt;&lt;/span&gt;; /* INT1 pin 12, INT2 pin 13 */&lt;/p&gt;
&lt;p&gt;Here are the devictree bindings listed:&lt;br /&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/build/dts/api/bindings/sensor/st%2Clis2dh-i2c.html#dtbinding-st-lis2dh-i2c"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/build/dts/api/bindings/sensor/st%2Clis2dh-i2c.html#dtbinding-st-lis2dh-i2c&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Lis3dh interrupt pins configuration</title><link>https://devzone.nordicsemi.com/thread/449829?ContentTypeID=1</link><pubDate>Wed, 11 Oct 2023 12:55:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9dadb895-31f2-4bdb-91f2-9a7eefe54b15</guid><dc:creator>Pepe Sanches</dc:creator><description>&lt;p&gt;Hello Kenneth, I&amp;#39;ve been studying the driver and the sample code for lis2dh as you suggested.&lt;/p&gt;
&lt;p&gt;For what I found the driver doesn&amp;#39;t support freefall and a few other interrupt options I think...&lt;/p&gt;
&lt;p&gt;This is located in lis2dh.c for attribute configuration&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static int lis2dh_acc_config(const struct device *dev,
			     enum sensor_channel chan,
			     enum sensor_attribute attr,
			     const struct sensor_value *val)
{
	switch (attr) {
#ifdef CONFIG_LIS2DH_ACCEL_RANGE_RUNTIME
	case SENSOR_ATTR_FULL_SCALE:
		return lis2dh_acc_range_set(dev, sensor_ms2_to_g(val));
#endif
#ifdef CONFIG_LIS2DH_ODR_RUNTIME
	case SENSOR_ATTR_SAMPLING_FREQUENCY:
		return lis2dh_acc_odr_set(dev, val-&amp;gt;val1);
#endif
#if defined(CONFIG_LIS2DH_TRIGGER)
	case SENSOR_ATTR_SLOPE_TH:
	case SENSOR_ATTR_SLOPE_DUR:
		return lis2dh_acc_slope_config(dev, attr, val);
#endif
#ifdef CONFIG_LIS2DH_ACCEL_HP_FILTERS
	case SENSOR_ATTR_CONFIGURATION:
		return lis2dh_acc_hp_filter_set(dev, val-&amp;gt;val1);
#endif
	default:
		LOG_DBG(&amp;quot;Accel attribute not supported.&amp;quot;);
		return -ENOTSUP;
	}

	return 0;
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;You may see here, that any attribute that is not listed in the switch(attr) is managed as &amp;quot;not supported&amp;quot;.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Furthermore, looking in the lis2dh_trigger.c I found the functions that directly configure INT1 and INT2 pins. But I&amp;#39;m&amp;nbsp;unsure how to approach this change in the driver. And how to &amp;quot;wire&amp;quot; both interrups to outside the driver.&lt;/p&gt;
&lt;p&gt;What I mean is, in dts and overlay the options for lis2dh are anym-on-int1 and not much else. Do I need to add another option in dts file for INT2?&lt;/p&gt;
&lt;p&gt;I think I need more time studying this driver and&amp;nbsp;it&amp;#39;s interaction with the device tree.&lt;/p&gt;
&lt;p&gt;Any hint would be appreciated.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Lis3dh interrupt pins configuration</title><link>https://devzone.nordicsemi.com/thread/449483?ContentTypeID=1</link><pubDate>Tue, 10 Oct 2023 08:24:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5f5f8dd6-56f2-4a04-a0b4-55ad13094e25</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Sorry, you are right, looking at the zephyr/drivers/ensor/lis2dh/kconfig I can see that&amp;nbsp;&lt;span&gt;CONFIG_LIS2DH_TRIGGER is indirectly selected by either:&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;choice&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;LIS2DH_TRIGGER_MODE&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;prompt&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&amp;quot;Trigger mode&amp;quot;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;help&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Specify the type of triggering to be used by the driver.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;&lt;span&gt;config&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;LIS2DH_TRIGGER_NONE&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;bool&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&amp;quot;No trigger&amp;quot;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;&lt;span&gt;config&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;strong&gt;LIS2DH_TRIGGER_GLOBAL_THREAD&lt;/strong&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;bool&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&amp;quot;Use global thread&amp;quot;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;depends on&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;GPIO&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;select&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;LIS2DH_TRIGGER&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;&lt;span&gt;config&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;strong&gt;LIS2DH_TRIGGER_OWN_THREAD&lt;/strong&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;bool&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&amp;quot;Use own thread&amp;quot;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;depends on&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;GPIO&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;select&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;LIS2DH_TRIGGER&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;I suggest to study the driver and driver sample further, I don&amp;#39;t have the sensor myself so not able to try this myself.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Kenneth&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Lis3dh interrupt pins configuration</title><link>https://devzone.nordicsemi.com/thread/449407?ContentTypeID=1</link><pubDate>Mon, 09 Oct 2023 17:05:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3f291e31-8b01-4865-98da-bc62d63a55a0</guid><dc:creator>Pepe Sanches</dc:creator><description>&lt;p&gt;This is what happens when I try to add&amp;nbsp;&lt;span&gt;CONFIG_LIS2DH_TRIGGER=y in the proj.conf file.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1696870005755v2.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;And it doesn&amp;#39;t build anymore.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;This is the error that prompts when trying to build:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;Parsing C:/ncs/v2.1.0/zephyr/Kconfig
Loaded configuration &amp;#39;C:/Users/ig/Documents/GitHub/NFL2/boards/arm/horatech_hbl6232_nrf52832/horatech_hbl6232_nrf52832_defconfig&amp;#39;
Merged configuration &amp;#39;c:/Users/ig/Documents/GitHub/NFL2/prj.conf&amp;#39;

error: LIS2DH_TRIGGER (defined at drivers/sensor/lis2dh/Kconfig:38) is assigned in a configuration
file, but is not directly user-configurable (has no prompt). It gets its value indirectly from other
symbols. See http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_LIS2DH_TRIGGER and/or look up
LIS2DH_TRIGGER in the menuconfig/guiconfig interface. The Application Development Primer, Setting
Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be helpful
too.

CMake Error at C:/ncs/v2.1.0/zephyr/cmake/modules/kconfig.cmake:293 (message):
  command failed with return code: 1
Call Stack (most recent call first):
  C:/ncs/v2.1.0/zephyr/cmake/modules/zephyr_default.cmake:121 (include)
  C:/ncs/v2.1.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
  C:/ncs/v2.1.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
  CMakeLists.txt:5 (find_package)


-- Configuring incomplete, errors occurred!
FATAL ERROR: command exited with status 1: &amp;#39;C:\ncs\toolchains\v2.1.0\opt\bin\cmake.EXE&amp;#39; &amp;#39;-DWEST_PYTHON=C:\ncs\toolchains\v2.1.0\opt\bin\python.exe&amp;#39; &amp;#39;-Bc:\Users\ig\Documents\GitHub\NFL2\build&amp;#39; -GNinja -DBOARD=horatech_hbl6232_nrf52832 -DNCS_TOOLCHAIN_VERSION:STRING=NONE &amp;#39;-DBOARD_ROOT:STRING=c:/users/ig/documents/repos/npo-1;c:/users/ig/documents/github/nfl2;c:/users/ig/documents/github/nca7;c:/users/ig/documents/repos/nsr1&amp;#39; -DCONF_FILE:STRING=c:/Users/ig/Documents/GitHub/NFL2/prj.conf -DDTC_OVERLAY_FILE:STRING=c:/Users/ig/Documents/GitHub/NFL2/horatech_hbl6232_nrf52832.overlay &amp;#39;-Sc:\Users\ig\Documents\GitHub\NFL2&amp;#39;&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I tried looking in the url provided by the error but I don&amp;#39;t see that the&amp;nbsp;CONFIG_LIS2DH_TRIGGER=y&amp;nbsp;is used, or more like I&amp;#39;m not really sure what I&amp;#39;m looking for:&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_LIS2DH_TRIGGER"&gt;http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_LIS2DH_TRIGGER&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Another thing that happens also is that: (without&amp;nbsp;CONFIG_LIS2DH_TRIGGER=y)&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;struct sensor_value attr;
attr.val1 = acel_trigg_level(acel_data-&amp;gt;trigger_level_ths);
attr.val2 = 0;
int rc = sensor_attr_set(dev_acel, SENSOR_CHAN_ACCEL_XYZ, SENSOR_ATTR_SLOPE_TH, &amp;amp;attr);&lt;/pre&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family:inherit;"&gt;returns error -22 (invalid argument)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family:inherit;"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;attr.val1 = acel_trigg_level(acel_data-&amp;gt;trigger_level_dur);
attr.val2 = 0;
rc = sensor_attr_set(dev_acel, SENSOR_CHAN_ACCEL_XYZ, SENSOR_ATTR_SLOPE_DUR, &amp;amp;attr);&lt;/pre&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;returns error&amp;nbsp;&lt;/span&gt;&lt;span&gt;-134 (not supported)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;trig.type = SENSOR_TRIG_FREEFALL;
trig.chan = SENSOR_CHAN_ACCEL_XYZ;
rc = sensor_trigger_set(dev_acel, &amp;amp;trig, (sensor_trigger_handler_t)acel_trigg_ff);&lt;/pre&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;returns error -134 (not supported)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;I&amp;#39;m a bit lost to be honest.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;I looked at the sample code for lis2dh and used it as a base, but it is very changed from the sample code to meet&amp;nbsp;the task and mailbox system the code has.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Lis3dh interrupt pins configuration</title><link>https://devzone.nordicsemi.com/thread/449389?ContentTypeID=1</link><pubDate>Mon, 09 Oct 2023 14:54:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5b8fd11b-0cfa-4ffc-b807-29e54744f055</guid><dc:creator>Pepe Sanches</dc:creator><description>&lt;p&gt;Hello Kenneth, thank you for your reply.&lt;br /&gt;&lt;br /&gt;I&amp;#39;m sorry, I forgot to show the proj.conf.&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;# Stack
# CONFIG_CPLUSPLUS=y
CONFIG_MAIN_STACK_SIZE=2048
CONFIG_KERNEL_LOG_LEVEL_INF=y
CONFIG_NUM_PREEMPT_PRIORITIES=6
CONFIG_NUM_COOP_PRIORITIES=2
# CONFIG_NEWLIB_LIBC=y
# CONFIG_POSIX_API=y
CONFIG_THREAD_NAME=y
CONFIG_RESET_ON_FATAL_ERROR=y
CONFIG_HEAP_MEM_POOL_SIZE=1024
CONFIG_HWINFO=y

# GPIO
CONFIG_GPIO=y

# Watchdog
CONFIG_WATCHDOG=y
CONFIG_WDT_LOG_LEVEL_DBG=y
CONFIG_WDT_DISABLE_AT_BOOT=y
CONFIG_TASK_WDT=y
CONFIG_TASK_WDT_MIN_TIMEOUT=500

# Power Management
CONFIG_PM=y
CONFIG_PM_DEVICE=y
CONFIG_PM_DEVICE_RUNTIME=y

# NVS
CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_NVS=y
# CONFIG_NVS_LOG_LEVEL_DBG=y
CONFIG_MPU_ALLOW_FLASH_WRITE=y

# Bluetooth
CONFIG_BT=y
# CONFIG_BT_DEBUG_LOG=y
CONFIG_BT_DEBUG_LOG=y
CONFIG_BT_L2CAP_TX_BUF_COUNT=5
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_LONG_WQ_PRIO=6
CONFIG_BT_DEVICE_NAME_DYNAMIC=y
CONFIG_BT_DEVICE_NAME_MAX=30

# Logging
CONFIG_LOG=y
CONFIG_PRINTK=y
CONFIG_LOG_BACKEND_RTT=y
CONFIG_LOG_BACKEND_RTT_MODE_DROP=y
CONFIG_LOG_PRINTK=y
# CONFIG_LOG_PRINTK_MAX_STRING_LENGTH=256
CONFIG_LOG_BACKEND_RTT_MESSAGE_SIZE=256
# CONFIG_LOG_STRDUP_BUF_COUNT=64
# CONFIG_LOG_STRDUP_MAX_STRING=64
CONFIG_LOG_BACKEND_SHOW_COLOR=n
CONFIG_LOG_BACKEND_FORMAT_TIMESTAMP=n
CONFIG_LOG_PROCESS_THREAD_STACK_SIZE=1024
CONFIG_CBPRINTF_FP_SUPPORT=y
CONFIG_CONSOLE=n
CONFIG_USE_SEGGER_RTT=y
# CONFIG_RTT_CONSOLE=y
# CONFIG_UART_CONSOLE=n
CONFIG_GPIO_LOG_LEVEL_DBG=y
CONFIG_LOG_PROCESS_THREAD_SLEEP_MS=300

# UART
CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=n
CONFIG_UART_ASYNC_API=y

# LORA
CONFIG_SPI=y
# CONFIG_SPI_LOG_LEVEL_DBG=y
CONFIG_LORA=y
CONFIG_LORA_SX12XX=y
# CONFIG_LORA_LOG_LEVEL_DBG=y
# LORAWAN
CONFIG_LORAWAN=y
CONFIG_LORAMAC_REGION_AU915=y
# CONFIG_LORAWAN_LOG_LEVEL_DBG=y

# LIS3DH
CONFIG_I2C=y
# CONFIG_I2C_LOG_LEVEL_DBG=y
CONFIG_SENSOR=y
CONFIG_LIS2DH=y
CONFIG_LIS2DH_TRIGGER_GLOBAL_THREAD=y
CONFIG_LIS2DH_ODR_3=y
CONFIG_LIS2DH_ACCEL_RANGE_8G=y
CONFIG_LIS2DH_OPER_MODE_LOW_POWER=y
# CONFIG_SENSOR_LOG_LEVEL_DBG=y

# ADC
CONFIG_ADC=y

# FUOTA
# Enable mcumgr.
# CONFIG_MCUMGR=y
# # Enable most core commands.
# CONFIG_MCUMGR_CMD_IMG_MGMT=y
# CONFIG_MCUMGR_CMD_OS_MGMT=y
# CONFIG_MCUMGR_SMP_BT=y
# CONFIG_MCUMGR_SMP_BT_AUTHEN=n
# CONFIG_IMG_ERASE_PROGRESSIVELY=y
# # Ensure an MCUboot-compatible binary is generated.
# CONFIG_BOOTLOADER_MCUBOOT=y

# Hardcore
CONFIG_STACK_USAGE=y

&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I will look into it,&amp;nbsp;&lt;span&gt;CONFIG_LIS2DH_TRIGGER=y is not set in my current proj.conf&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Lis3dh interrupt pins configuration</title><link>https://devzone.nordicsemi.com/thread/449374?ContentTypeID=1</link><pubDate>Mon, 09 Oct 2023 13:46:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e424a105-a99f-4fbb-8445-82afca39dc44</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Maybe you are&amp;nbsp;missing&amp;nbsp;CONFIG_LIS2DH_TRIGGER=y , looking atht the lis2dh_driver_api this will expose the&amp;nbsp;trigger_set() api. Maybe take a look at the zephyr\samples\sensor\lis2dh project and zephyr\drivers\sensor\lis2dh if you haven&amp;#39;t already?&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>