<?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>How to sample data with app_timer in IRQ but process outside interrupt?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/4995/how-to-sample-data-with-app_timer-in-irq-but-process-outside-interrupt</link><description>I want to process queued sensor data collected at a fixed interval (every 100ms) via TWI in the background/main loop. In the example ble_app_hrs , timer expiration callbacks run directly in the IRQ. 
 APP_TIMER_INIT(APP_TIMER_PRESCALER,
 APP_TIMER_MAX_TIMERS</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 08 Jan 2015 12:02:46 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/4995/how-to-sample-data-with-app_timer-in-irq-but-process-outside-interrupt" /><item><title>RE: How to sample data with app_timer in IRQ but process outside interrupt?</title><link>https://devzone.nordicsemi.com/thread/17620?ContentTypeID=1</link><pubDate>Thu, 08 Jan 2015 12:02:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b5423b25-4760-442d-8a6c-275604900911</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;For comments on that , look at &lt;a href="https://devzone.nordicsemi.com/question/24139/are-twi-transfers-of-twi_masterh-blocking/?answer=24161#post-id-24161"&gt;this thread&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to sample data with app_timer in IRQ but process outside interrupt?</title><link>https://devzone.nordicsemi.com/thread/17619?ContentTypeID=1</link><pubDate>Thu, 08 Jan 2015 03:11:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:70a55177-551e-4dc8-b7fa-bc2c792914d2</guid><dc:creator>la-ble</dc:creator><description>&lt;p&gt;are TWI calls safe to run in interrupt? or MUST they go in main loop?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to sample data with app_timer in IRQ but process outside interrupt?</title><link>https://devzone.nordicsemi.com/thread/17618?ContentTypeID=1</link><pubDate>Wed, 07 Jan 2015 11:50:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:13ab40a3-1abe-415b-b6d9-a0659bf8de59</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;As you have pointed out, the app_timer either use the scheduler for all timers or none. You could also mimic the functionality of the app_scheduler by simply setting a flag in your app_timer callback and poll for that flag in the main loop, i.e. when the flag is &amp;quot;true&amp;quot; you perform your TWI operation in main loop.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to sample data with app_timer in IRQ but process outside interrupt?</title><link>https://devzone.nordicsemi.com/thread/17617?ContentTypeID=1</link><pubDate>Mon, 05 Jan 2015 02:56:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cc84db43-3a04-4937-847a-9c915e26104b</guid><dc:creator>la-ble</dc:creator><description>&lt;p&gt;This post seems relevant: &lt;a href="https://devzone.nordicsemi.com/question/17526/examples-using-the-scheduler/"&gt;devzone.nordicsemi.com/.../&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>