<?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>Low power led indication like pwm using rtc timers</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/72903/low-power-led-indication-like-pwm-using-rtc-timers</link><description>Hello, 
 My device based on ble uart app with nrf52832 operating with 2 AA batteries. It has 4 LEDs and 4 buttons. 4 LEDs are always on for indication but when a button is pressed, a LED associated with it will be highlighted(brighter than normal status</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 17 Mar 2021 18:24:28 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/72903/low-power-led-indication-like-pwm-using-rtc-timers" /><item><title>RE: Low power led indication like pwm using rtc timers</title><link>https://devzone.nordicsemi.com/thread/300514?ContentTypeID=1</link><pubDate>Wed, 17 Mar 2021 18:24:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9fec4b6d-414c-4446-a2e6-94df92365202</guid><dc:creator>jalan</dc:creator><description>&lt;p&gt;Edvin, Thanks for your reply and I also agree with the idea to control at a time for all leds.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Low power led indication like pwm using rtc timers</title><link>https://devzone.nordicsemi.com/thread/300428?ContentTypeID=1</link><pubDate>Wed, 17 Mar 2021 13:23:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4c8ea69f-da7b-4ab5-a9a4-f8b118ed9384</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;We don&amp;#39;t have any official examples generating a PWM using the app_timer, unfortunately.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I would suggest you look into the app_pwm module used in SDK\examples\peripheral\pwm_library, and change out the timer being used with an RTC or the app_timer. This example uses PPI, which you should use. At least if you intend to use other peripherals, or the Bluetooth Low Energy stack, you would want the PWM to be able to handle other interrupts, which is why the PPI will do all the toggling of the gpios. Then you don&amp;#39;t need to wait for the CPU, which may be busy with another interrupt, to be able to process the timer interrupt and toggle the pins.&lt;/p&gt;
&lt;p&gt;Although I agree that it would use less power in your diagram, I see no reason not to just set all pins to active from 0 to 10ms, and then inactive from 10 to 40ms. The reason for this is that then you can use one event (the timer reset) to set all pins high, and one event to turn them back off, instead of setting up a whole lot of PPI handles for each of the pins.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>