<?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>nPM1300 LEDs not recognized by CAF LED module - &amp;quot;No LEDs defined&amp;quot; error</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/117775/npm1300-leds-not-recognized-by-caf-led-module---no-leds-defined-error</link><description>I&amp;#39;m encountering an issue while trying to use the CAF LED module with the nPM1300 PMIC. Despite configuring the Device Tree, prj.conf, and led_state_def.h, I&amp;#39;m still getting a &amp;quot;No LEDs defined&amp;quot; error during compilation. I&amp;#39;d appreciate any help or insights</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 08 Jan 2025 09:31:25 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/117775/npm1300-leds-not-recognized-by-caf-led-module---no-leds-defined-error" /><item><title>RE: nPM1300 LEDs not recognized by CAF LED module - "No LEDs defined" error</title><link>https://devzone.nordicsemi.com/thread/517411?ContentTypeID=1</link><pubDate>Wed, 08 Jan 2025 09:31:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:00d13c9e-8339-4c06-b0ce-4a13493f9a45</guid><dc:creator>runsiv</dc:creator><description>&lt;p&gt;Thanks for the update. I will pass the feedback on&amp;nbsp;internally as I don&amp;#39;t see any reason why it should be be added&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Runar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nPM1300 LEDs not recognized by CAF LED module - "No LEDs defined" error</title><link>https://devzone.nordicsemi.com/thread/517389?ContentTypeID=1</link><pubDate>Wed, 08 Jan 2025 07:36:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fe404417-92e4-4ef9-b74f-7575c3099200</guid><dc:creator>Lowlanders</dc:creator><description>&lt;div class="mantine-Text-root mantine-15qlng1" style="margin-bottom:8px;margin-top:8px;"&gt;Hi, yes now I understand.&lt;br /&gt;The core issue was that the CAF LED module isn&amp;#39;t configured to work with the nPM1300&amp;#39;s specific LED driver. It expects either PWM or GPIO-based LEDs, but the nPM1300 uses its own unique LED driver.&lt;/div&gt;
&lt;div class="mantine-Text-root mantine-15qlng1" style="margin-bottom:8px;margin-top:8px;"&gt;While modifying the CAF LED implementation could be a solution, I&amp;#39;ve decided to build a solution using Zephyr directly instead. This approach will bypass the CAF LED module entirely and utilize Zephyr&amp;#39;s native LED APIs to interact with the nPM1300 LED driver.&lt;/div&gt;
&lt;div class="mantine-Text-root mantine-15qlng1" style="margin-bottom:8px;margin-top:8px;"&gt;It would still be beneficial if Nordic could update the LED module in future SDK versions to natively support the Nordic nPM1300 LED driver. This would simplify the integration of nPM1300 into projects using the CAF LED module for those who prefer to use it.&lt;br /&gt;&lt;br /&gt;Thanks&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nPM1300 LEDs not recognized by CAF LED module - "No LEDs defined" error</title><link>https://devzone.nordicsemi.com/thread/517387?ContentTypeID=1</link><pubDate>Wed, 08 Jan 2025 07:32:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d49fadf3-d978-4b0a-9cc1-45539c0f6170</guid><dc:creator>runsiv</dc:creator><description>&lt;p&gt;As Greg mentions above can you show the compiled DTS for the application?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It would also be in good to see how you get the device pointer&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Runar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nPM1300 LEDs not recognized by CAF LED module - "No LEDs defined" error</title><link>https://devzone.nordicsemi.com/thread/517323?ContentTypeID=1</link><pubDate>Tue, 07 Jan 2025 19:25:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9d6eae59-550d-4382-a342-0f1ed9016577</guid><dc:creator>caeg</dc:creator><description>&lt;p&gt;The condition of the assert in leds.c is:&lt;br /&gt;&lt;code&gt;DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT)&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;DT_DRV_COMPAT&lt;/code&gt; is #defined at the top of leds.c:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;#ifdef CONFIG_CAF_LEDS_PWM&lt;/code&gt;&lt;br /&gt;&lt;code&gt; #define DT_DRV_COMPAT pwm_leds&lt;/code&gt;&lt;br /&gt;&lt;code&gt;#elif defined(CONFIG_CAF_LEDS_GPIO)&lt;/code&gt;&lt;br /&gt;&lt;code&gt; #define DT_DRV_COMPAT gpio_leds&lt;/code&gt;&lt;br /&gt;&lt;code&gt;#else&lt;/code&gt;&lt;br /&gt;&lt;code&gt; #error &amp;quot;LED driver must be specified in configuration&amp;quot;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;#endif&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t see any signs that you&amp;#39;re using PWM LEDs so &lt;code&gt;DT_DRV_COMPAT&lt;/code&gt; should likely be &lt;code&gt;gpio_leds&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Search in your &lt;code&gt;&amp;lt;build_dir&amp;gt;/zephyr/zephyr.dts&lt;/code&gt; file for nodes with &lt;code&gt;compatible = &amp;quot;gpio-leds&amp;quot;&lt;/code&gt; -- does one exist and have &lt;code&gt;status = &amp;quot;okay&amp;quot;&lt;/code&gt;? That&amp;#39;s what the &lt;code&gt;DT_HAS_COMPAT_STATUS_OKAY&lt;/code&gt; macro is testing for.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nPM1300 LEDs not recognized by CAF LED module - "No LEDs defined" error</title><link>https://devzone.nordicsemi.com/thread/517294?ContentTypeID=1</link><pubDate>Tue, 07 Jan 2025 15:44:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c04875f2-0d0c-4737-be94-82d735e3cfe6</guid><dc:creator>Lowlanders</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;the version of ncs is v2.8.0.&lt;br /&gt;&lt;br /&gt;Yes there are the pull ups at SDA/SCL. The nPM1300 is working great.&lt;br /&gt;&lt;br /&gt;I can use the LEDs connected to the nPM1300 by using Zephyr&amp;#39;s LED driver.&lt;br /&gt;But with the CAF LED driver it seems not to work. I&amp;#39;ve just modified the nRF Desktop App.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;......... &lt;br /&gt;from C:/ncs/v2.8.0/nrf/subsys/caf/modules/leds.c:7:&lt;br /&gt;C:/ncs/v2.8.0/nrf/subsys/caf/modules/leds.c: In function &amp;#39;leds_init&amp;#39;:&lt;br /&gt;C:/ncs/v2.8.0/zephyr/include/zephyr/toolchain/gcc.h:87:36: error: static assertion failed: &amp;quot;No LEDs defined&amp;quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp; 87 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert((EXPR), &amp;quot;&amp;quot; MSG)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ^~~~~~~~~~~~~~&lt;br /&gt;C:/ncs/v2.8.0/nrf/subsys/caf/modules/leds.c:182:9: note: in expansion of macro &amp;#39;BUILD_ASSERT&amp;#39;&lt;br /&gt;&amp;nbsp; 182 |&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BUILD_ASSERT(DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) &amp;gt; 0, &amp;quot;No LEDs defined&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ^~~~~~~~~~~~&lt;br /&gt;[288/368] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/C_/ncs/v2.8.0/modules/hal/nordic/nrfx/drivers/src/nrfx_gpiote.c.obj&lt;br /&gt;ninja: build stopped: subcommand failed.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nPM1300 LEDs not recognized by CAF LED module - "No LEDs defined" error</title><link>https://devzone.nordicsemi.com/thread/517251?ContentTypeID=1</link><pubDate>Tue, 07 Jan 2025 14:02:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5895fbaa-30ee-4dcc-a7fc-d75bda33bd85</guid><dc:creator>runsiv</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I will look into your issue. On the first glance your overlay looks fine to me.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Do you have pull ups on the I2C pins?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It would also be great if you can post the entire build error and which version of NCS you are using. Just to save some time you can also upload your application if you are using the nrf5340dk and I can test on my end&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Runar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>