<?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>Sensor API in Zephyr adding new sensor (howto) on the example LSM6DS33</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/98363/sensor-api-in-zephyr-adding-new-sensor-howto-on-the-example-lsm6ds33</link><description>Hello, I would love to know what are the steps what should I add, what should I change and what are good practice, when it comes to adding new sensor driver. It would be great if there would be some todo list what and when should be added. Perfectly with</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 05 Apr 2023 08:03:32 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/98363/sensor-api-in-zephyr-adding-new-sensor-howto-on-the-example-lsm6ds33" /><item><title>RE: Sensor API in Zephyr adding new sensor (howto) on the example LSM6DS33</title><link>https://devzone.nordicsemi.com/thread/419170?ContentTypeID=1</link><pubDate>Wed, 05 Apr 2023 08:03:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c71628f8-e4c0-4406-9b74-ad3e38688b3b</guid><dc:creator>Raoul</dc:creator><description>&lt;p&gt;No problem, happy Easter!&lt;/p&gt;
&lt;p&gt;Raoul&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sensor API in Zephyr adding new sensor (howto) on the example LSM6DS33</title><link>https://devzone.nordicsemi.com/thread/419168?ContentTypeID=1</link><pubDate>Wed, 05 Apr 2023 07:56:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:149baeb8-7ea6-4c8e-addc-321f8ac6d5e8</guid><dc:creator>pawelkocwa</dc:creator><description>&lt;p&gt;Hello Raoul,&lt;/p&gt;
&lt;p&gt;Thank you for your answer!&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Paweł&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sensor API in Zephyr adding new sensor (howto) on the example LSM6DS33</title><link>https://devzone.nordicsemi.com/thread/419105?ContentTypeID=1</link><pubDate>Tue, 04 Apr 2023 18:26:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b5d254e3-cb5f-4ced-ba2d-83cd8981f810</guid><dc:creator>Raoul</dc:creator><description>&lt;p&gt;Hi Pawel,&lt;/p&gt;
&lt;p&gt;If you want a summary of how to get started, my colleague has share that here:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/66230/how-to-add-new-i2c-based-sensor-device-to-ncs-v1-3-0-zephyr-drivers-sensor"&gt;How to add new i2c based sensor device to ncs\v1.3.0\zephyr\drivers\sensor&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;However the process is slightly different depending on whether you would like to add the driver to the Zephyr tree (modifying the repository) or as an out-of-tree driver. This guide to adding out of tree drivers seems excellent: &lt;a href="https://blog.golioth.io/adding-an-out-of-tree-sensor-driver-to-zephyr/"&gt;https://blog.golioth.io/adding-an-out-of-tree-sensor-driver-to-zephyr/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;As a starting point, note that Zephyr has &lt;a href="https://github.com/nrfconnect/sdk-zephyr/tree/main/drivers/sensor/lsm6dso"&gt;built in drivers for the LSM6DSO&lt;/a&gt;, which seems to be a variant of the same chip, except 2 generations newer. There&amp;#39;s also an associated sample for it: &lt;a href="https://docs.zephyrproject.org/latest/samples/sensor/lsm6dso/README.html"&gt;https://docs.zephyrproject.org/latest/samples/sensor/lsm6dso/README.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I also found a user-made driver for the LSM6DS3 on GitHub, which you might be able to reuse: &lt;a href="https://github.com/iwasz/example-zephyr-module"&gt;https://github.com/iwasz/example-zephyr-module&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It seems that the LSM6DS3 and LSM6DS33 share an identical MEMS core, I assume they will be very similar to interface with.&lt;/p&gt;
&lt;p&gt;Finally, I would like to share the following two links with details on Zephyr driver development:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.zephyrproject.org/how-to-build-drivers-for-zephyr-rtos/"&gt;https://www.zephyrproject.org/how-to-build-drivers-for-zephyr-rtos/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=o-f2qCd2AXo"&gt;https://www.youtube.com/watch?v=o-f2qCd2AXo&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Raoul&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>