<?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>nRF52832 slow pulse low power counting</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/62640/nrf52832-slow-pulse-low-power-counting</link><description>Hello, 
 
 we are currently in the development of a low power, battery powered device that needs to count slow pulses (period between ~10ms and several seconds). 
 At the moment, we are using a competitor&amp;#39;s MCU, but we are considering nRF52832. 
 
 Our</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 17 Jun 2020 11:35:42 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/62640/nrf52832-slow-pulse-low-power-counting" /><item><title>RE: nRF52832 slow pulse low power counting</title><link>https://devzone.nordicsemi.com/thread/255502?ContentTypeID=1</link><pubDate>Wed, 17 Jun 2020 11:35:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:919f9aef-5005-44aa-8ae4-f510fae8c448</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;It is difficult to give a precise numerical number. It depends on the setup on your PCB. What power regulator you use, what peripherals you use, how you trigger the events to read out the pulse counter, and what peripheral you use to read it out. If you use BLE, then that is a whole other chapter, because you would need to add the radio activity on top of that.&lt;/p&gt;
&lt;p&gt;The TIMER peripheral doesn&amp;#39;t give the counter current in the &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/timer.html?cp=4_2_0_23_5#unique_1264102444" rel="noopener noreferrer" target="_blank"&gt;TIMER specification&lt;/a&gt;. I guess that would be because it doesn&amp;#39;t really do much, compared to when it is used in timer mode, because you don&amp;#39;t need the HFCLK running.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 slow pulse low power counting</title><link>https://devzone.nordicsemi.com/thread/255435?ContentTypeID=1</link><pubDate>Wed, 17 Jun 2020 08:37:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:25b94bf3-ef28-45b9-9dbf-a858aa31500b</guid><dc:creator>TobiasZ</dc:creator><description>&lt;p&gt;Hi Edvin,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;thank you for the advice, but my question was referring to a power consumption of a timer in counter mode.&lt;/p&gt;
&lt;p&gt;Do you have any info regarding this?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards!&lt;br /&gt;Tobias&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 slow pulse low power counting</title><link>https://devzone.nordicsemi.com/thread/255323?ContentTypeID=1</link><pubDate>Tue, 16 Jun 2020 15:04:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:14e25aac-c43d-4ce4-8c92-9dd094cb4a36</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello Tobias,&lt;/p&gt;
&lt;p&gt;I suggest you look into using PPI for this. Programmable Peripheral Interface is a way to set up your peripherals to do simple tasks, without involving the CPU.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t have an example doing exactly this, but I have an old examplle used for training purposes that sets up two PWM channels using a TIMER and GPIOTE with PPI to toggle pins in a PWM cycle (actually quite similar to what the pwm_library example from the SDK does, but this is a closer to metal approach).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;You can read a bit about the PPI here:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/ppi.html?cp=4_2_0_21#concept_sxf_21l_1s"&gt;https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/ppi.html?cp=4_2_0_21#concept_sxf_21l_1s&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;And here is the PWM PPI example I was talking about:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-f0488548b9c64cd4bd5654af451c35ba/ppi_5F00_double_5F00_channel_5F00_pwm.zip"&gt;devzone.nordicsemi.com/.../ppi_5F00_double_5F00_channel_5F00_pwm.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Please note that this was written for Keil in SDK14.0.0, but the main.c file should run in pretty much any SDK with any IDE, since it only uses the registers directly.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;What I was thinking was that you can use one PPI channel to detect (EEP) the HITOLO or LOTOHI events on a GPIO, and then use a TIMER in counter mode to perform the increments tasks (TEP).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Have a look at it. As mentioned, you can do this counting without including the CPU at all (after it is set up of course).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;You can then manually read out the count value from your TIMER registers.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>