<?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>NRF52833 BLE UART DATA ISSUE</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/68819/nrf52833-ble-uart-data-issue</link><description>Hello 
 
 I want to send saadc data over BLE as 100KSPS 
 #define SAADC_SAMPLES_IN_BUFFER 120 #define SAADC_SAMPLE_RATE 1200 /**&amp;lt; SAADC sample rate in us. */ 
 If, I set this code. 
 I calculated SPS like this. 
 SPS = 120 / (1200*10^-6) = 100 KSPS 
</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 26 Nov 2020 13:21:03 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/68819/nrf52833-ble-uart-data-issue" /><item><title>RE: NRF52833 BLE UART DATA ISSUE</title><link>https://devzone.nordicsemi.com/thread/282084?ContentTypeID=1</link><pubDate>Thu, 26 Nov 2020 13:21:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5709b0a8-5963-45cf-9bf3-e31cc20b3fd7</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote user=""]I want to send saadc data over BLE as 100KSPS[/quote]
&lt;p&gt;Which SoftDevice will you be using?&lt;br /&gt;Please have a look at &lt;a href="https://infocenter.nordicsemi.com/topic/sds_s140/SDS/s1xx/ble_data_throughput/ble_data_throughput.html"&gt;the Bluetooth Low Energy data throughput section&lt;/a&gt; in that particular SoftDevice&amp;#39;s documentation.&lt;br /&gt;Depending on the size of these transfers it might be infeasible to achieve the throughput you are after here.&lt;br /&gt;What is your required throughput?&lt;/p&gt;
[quote user=""]&lt;p&gt;I calculated SPS like this.&lt;/p&gt;
&lt;p&gt;SPS = 120 / (1200*10^-6) = 100 KSPS&lt;/p&gt;
&lt;p&gt;Q1) Am I calculate SPS right?&lt;/p&gt;[/quote]
&lt;p&gt;No, this is not correct if you are trying to calculate samples per second. SPS is not affected by the size of your allocated buffer.&lt;br /&gt;Instead, you use the frequency of the sampling to determine samples per second. So, if you are only sampling a single channel, with a sampling rate of 1200 µs, that leaves you with a SPS of 1/sample_rate = 833 SPS&lt;br /&gt;If you are using scan-mode you will need to account for the additional samples generated by multiplying this number with the number of enabled channels.&lt;br /&gt;You can read more about scan-mode ( multi channel sampling ) in &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fps_nrf52833%2Fsaadc.html"&gt;the SAADC documentation&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;When the buffer is filled, the DONE event is generated. Is this where you are queueing your data for sending over BLE? If so, you will need to compare your allocated sample buffer size with your SPS, to see how often the event will be generated, and thus how often data will be transferred.&lt;/p&gt;
[quote user=""]Actually. the received data SPS over BLE is about 4~5KSPS.[/quote]
&lt;p&gt;What connection parameters are you using for your transfer?&lt;/p&gt;
[quote user=""]I can receive over UART DATA&amp;nbsp; until 39SAMPLES.[/quote]
&lt;p&gt;I do not understand what you mean by 39SAMPLES, please elaborate.&lt;br /&gt;Please bear in mind that UART is a slow interface.&lt;/p&gt;
[quote user=""]How can I receive 120 Samples in 1200us??[/quote]
&lt;p&gt;Are you trying to get 120 samples in 1200 µs? If so, the sampling rate should be 10 µs, not 1200, this will also give you 100 kSPS.&amp;nbsp;&lt;br /&gt;Please keep in mind that you will need to decrease the TAQ of the SAADC, so that it has time to complete the samples at a sampling rate of 10 µs.&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>