<?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>Separate BLE Tx from SPI/I2C operation</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/21087/separate-ble-tx-from-spi-i2c-operation</link><description>I have an application that first reads ADC sensor data from a SPI device, then transmits out through BLE. I have a 4ms timer; once it times out 
 
 Read sensor data through SPI fuction calls 
 Put data inside a BLE packet and send it out by calling</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 18 Apr 2017 10:12:11 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/21087/separate-ble-tx-from-spi-i2c-operation" /><item><title>RE: Separate BLE Tx from SPI/I2C operation</title><link>https://devzone.nordicsemi.com/thread/82460?ContentTypeID=1</link><pubDate>Tue, 18 Apr 2017 10:12:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ed73f633-9901-48c4-a927-5b023508a281</guid><dc:creator>djqtsg</dc:creator><description>&lt;p&gt;A more safer way is to enable inactive notification only. When SW1_IRQHandler() is called, we are certain that radio is inactive; then I can make SPI calls.&lt;/p&gt;
&lt;p&gt;I set radio active flag to true after calling ble_nus_string_send().&lt;/p&gt;
&lt;p&gt;However, it didn&amp;#39;t help resolve ADC outlier problem, not even reduce. Maybe I need to look for something else.&lt;/p&gt;
&lt;p&gt;Thx anyway.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Separate BLE Tx from SPI/I2C operation</title><link>https://devzone.nordicsemi.com/thread/82459?ContentTypeID=1</link><pubDate>Tue, 18 Apr 2017 08:55:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ee876a32-e571-427c-b4ea-1b7f62e581aa</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;I can agree that it may seem a little fragile. To make sure that it works properly, the initialization of the radio notifications should be done right after the initialization of the softdevice: (sd_radio_notification_cfg_set documentation) *To ensure that the radio notification signal behaves in a consistent way, the radio&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;pre&gt;&lt;code&gt;   notifications must be configured when there is no protocol stack or other SoftDevice
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;pre&gt;&lt;code&gt;   activity in progress. It is recommended that the radio notification signal is
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;pre&gt;&lt;code&gt;   configured directly after the SoftDevice has been enabled.*
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Another, perhaps more complex option is to use the timeslot API.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Separate BLE Tx from SPI/I2C operation</title><link>https://devzone.nordicsemi.com/thread/82458?ContentTypeID=1</link><pubDate>Mon, 10 Apr 2017 06:32:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d4ccad18-f5f3-4b30-8a72-456b3e0e7adf</guid><dc:creator>djqtsg</dc:creator><description>&lt;p&gt;I thought to do similar thing.&lt;/p&gt;
&lt;p&gt;However, how can I make sure I would not miss SWI1_IRQHandler()? One missing call will mess up the state machine.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Separate BLE Tx from SPI/I2C operation</title><link>https://devzone.nordicsemi.com/thread/82457?ContentTypeID=1</link><pubDate>Fri, 07 Apr 2017 11:03:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6fdc7be2-129a-4ab5-b21d-a2bbb8b44c85</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;I&amp;#39;m not sure if the radio notification signal indicates active/nactive or indicates that there is a radio notification. But you know for sure that the first radio notification is &amp;quot;active&amp;quot;. I would therefore recommend you to just have a local statemachine (state variable) keeping the state of the radio notification.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Separate BLE Tx from SPI/I2C operation</title><link>https://devzone.nordicsemi.com/thread/82456?ContentTypeID=1</link><pubDate>Fri, 07 Apr 2017 07:26:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1fcb2a62-420f-4de0-91bd-3c3b14e4ee5e</guid><dc:creator>djqtsg</dc:creator><description>&lt;p&gt;I found this tutorial &lt;a href="https://devzone.nordicsemi.com/tutorials/14/radio-notification/"&gt;devzone.nordicsemi.com/.../&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It is not clear to me how to link radio active event to SWI1_IRQn.&lt;/p&gt;
&lt;p&gt;What if I want to be notified by both active and inactive event.&lt;/p&gt;
&lt;p&gt;radio_evt in SWI1_IRQHandler() is a bool variable: does true mean radio active, false mean inactive?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Separate BLE Tx from SPI/I2C operation</title><link>https://devzone.nordicsemi.com/thread/82455?ContentTypeID=1</link><pubDate>Tue, 04 Apr 2017 09:13:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6a1ec753-b3b8-4901-b78a-8ed79c0c4a36</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;To avoid to reading sensor data when the radio is active, you can use &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s132.sds%2Fdita%2Fsoftdevices%2Fs130%2Fradio_notif%2Fradio_notification.html&amp;amp;cp=2_3_0_0_10"&gt;radio notifications&lt;/a&gt; to notify the application when the radio is active and not active.&lt;/p&gt;
&lt;p&gt;If your device is in a connection, and it only sends one packet per connection interval, the radio will be turned off for quite some time for each connection interval.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>