<?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>PPI and timer glitches</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/126568/ppi-and-timer-glitches</link><description>I have a problem with timer 3 of nrf52820. 
 It concerns a trailing edge dimmer implementation based on timer 3. A gpiote is used to sync the zero crossing. 
 
 I use ppi to clear a pin on CC[2] and to set on CC[3] . The timer is cleared (also through</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 19 Jan 2026 09:09:15 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/126568/ppi-and-timer-glitches" /><item><title>RE: PPI and timer glitches</title><link>https://devzone.nordicsemi.com/thread/558968?ContentTypeID=1</link><pubDate>Mon, 19 Jan 2026 09:09:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:877b5382-8b15-4265-a3c4-94cbcb2953c5</guid><dc:creator>valentinbaldwin</dc:creator><description>&lt;p&gt;Hello @ &lt;a href="https://skeletal-shenanigans.com"&gt;skeletal shenanigans&lt;/a&gt;, you are missing the compare event because CC is updated too late. When dimpush &amp;lt; ~128, TIMER3 has already counted past the new CC value after the PPI CLEAR, so the COMPARE event does not occur for that cycle. Result: the pin stays low for one full 10 ms period, then recovers next cycle. This is expected nRF52 behavior.&lt;/p&gt;
&lt;p&gt;I think you should ensure CC is written before the timer starts counting (or atomically with CLEAR), or clamp the minimum CC value (e.g. &amp;ge;150 ticks), or stop/clear the timer before updating CC.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>