<?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>Timer operation, uneven delays</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/82242/timer-operation-uneven-delays</link><description>Hello everyone, I combined work with a timer and an example from ble_app_aurt pca10040 s132, the problem is that the timer does not work evenly, yes, I know about the low priority of the timer, but this does not explain why delays of 182μs can last for</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 30 Nov 2021 17:09:28 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/82242/timer-operation-uneven-delays" /><item><title>RE: Timer operation, uneven delays</title><link>https://devzone.nordicsemi.com/thread/341373?ContentTypeID=1</link><pubDate>Tue, 30 Nov 2021 17:09:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:78db8971-bcb2-4abb-a058-92a8d2438134</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;&lt;br /&gt;I see a couple of potential issues with the sparse code you have supplied. First of all, you are not checking the error codes returned by SDK functions such as &lt;em&gt;ble_nus_data_send&lt;/em&gt;. I do not think that is the reason as to why you are seeing uneven timer interrupts, but it is in general not a good practice which certainly will spawn other issues later in your development.&lt;br /&gt;Furthermore it seems that you have an infinite for-loop in your uart_handler. This is also bad practice, because you will never return to the main context, and you will block all equal-to-or-lower priority interrupts in your program.&lt;br /&gt;&lt;br /&gt;Please fix these things, and provide more information / more of the code if this does not resolve your issues.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>