<?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>nrf52832 PPI  SAADC  Oversample,sample rate up to 250hz</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/68441/nrf52832-ppi-saadc-oversample-sample-rate-up-to-250hz</link><description>I am using SAADC and PPI to sample 2 channels data with oversample,when I set timer tick 5ms,the sample rate is 200hz and the system works well,now I want to improve the sample rete,So I change the timer tick to 2ms,the sample rate is 500hz.but I tested</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 04 Dec 2020 00:41:22 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/68441/nrf52832-ppi-saadc-oversample-sample-rate-up-to-250hz" /><item><title>RE: nrf52832 PPI  SAADC  Oversample,sample rate up to 250hz</title><link>https://devzone.nordicsemi.com/thread/283219?ContentTypeID=1</link><pubDate>Fri, 04 Dec 2020 00:41:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b461c223-fb09-459e-beac-ea743242aa6a</guid><dc:creator>Coder_hope</dc:creator><description>&lt;p&gt;I am using keil,I will try this ,thank you&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 PPI  SAADC  Oversample,sample rate up to 250hz</title><link>https://devzone.nordicsemi.com/thread/283007?ContentTypeID=1</link><pubDate>Thu, 03 Dec 2020 09:16:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a5fdc456-b372-42cf-b774-1eaa9dbbad1a</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;The TIMER instance addresses are listed in&amp;nbsp;&lt;a title="  Registers  " href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/timer.html?cp=4_2_0_23_4#topic"&gt;Registers&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Your debugging environment should have a way to read the peripheral&amp;#39;s registers, or at least arbitrary memory addresses.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;What IDE are you using?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 PPI  SAADC  Oversample,sample rate up to 250hz</title><link>https://devzone.nordicsemi.com/thread/282780?ContentTypeID=1</link><pubDate>Wed, 02 Dec 2020 03:16:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:79463d82-2302-4232-9718-6d8e08f3a709</guid><dc:creator>Coder_hope</dc:creator><description>&lt;p&gt;How to read TIMER registers ？I unusually do not config register to init..&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 PPI  SAADC  Oversample,sample rate up to 250hz</title><link>https://devzone.nordicsemi.com/thread/280571?ContentTypeID=1</link><pubDate>Wed, 18 Nov 2020 11:21:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8cbf3fd0-0c7f-4ae7-98bb-46c95e2174dd</guid><dc:creator>haakonsh</dc:creator><description>[quote user="MonkeyProgrammer"]I have defined&amp;nbsp;&amp;nbsp;NRFX_SAADC_CONFIG_OVERSAMPLE&amp;nbsp; = 8[/quote]
&lt;p&gt;&amp;nbsp;aah the default configs, yes, that should be correct then.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Can you read the TIMER registers after you&amp;#39;ve started it?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 PPI  SAADC  Oversample,sample rate up to 250hz</title><link>https://devzone.nordicsemi.com/thread/280548?ContentTypeID=1</link><pubDate>Wed, 18 Nov 2020 09:39:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9421b7c9-ce0f-4315-ab04-7de9c484a483</guid><dc:creator>Coder_hope</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;void ECG8233_saadc_sampling_event_enable(void)
{
    ret_code_t err_code = nrf_drv_ppi_channel_enable(m_ppi_channel);

    APP_ERROR_CHECK(err_code);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I use this function to start SAADC sample after&amp;quot; ECG8233_saadc_sampling_event_init&amp;quot; ，&lt;/p&gt;
&lt;p&gt;I have defined&amp;nbsp;&amp;nbsp;NRFX_SAADC_CONFIG_OVERSAMPLE&amp;nbsp; = 8,,I checked&amp;nbsp;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/structnrfx__saadc__config__t.html"&gt;nrfx_saadc_config_t&lt;/a&gt;&lt;span&gt;&amp;nbsp;,&amp;nbsp;the oversample is configed to 8 (256X)。&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 PPI  SAADC  Oversample,sample rate up to 250hz</title><link>https://devzone.nordicsemi.com/thread/280543?ContentTypeID=1</link><pubDate>Wed, 18 Nov 2020 09:18:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f6b7baf1-634c-4d59-bf08-efeb372bb328</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;When debugging peripherals you need to read the content of the peripheral&amp;#39;s &lt;a title="  Registers  " href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/saadc.html?cp=4_2_0_36_10#topic"&gt;Registers&lt;/a&gt;&amp;nbsp;and compare them with what you&amp;#39;d expect them to be according to&amp;nbsp;their documentation.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;In your&amp;nbsp;case you&amp;#39;re missing a part the SAADC configuration and this would be easy to find from reading the &lt;a title="  OVERSAMPLE  " href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/saadc.html?cp=4_2_0_36_10_38#register.OVERSAMPLE"&gt;OVERSAMPLE&lt;/a&gt;&amp;nbsp;register as it will be 0x00000000 = No oversampling in your case. See&amp;nbsp;&lt;a title="nrfx_saadc_init" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/group__nrfx__saadc.html?cp=7_1_6_8_0_30_1_17#gaea61b5b166bda57cf9daa1d11617f92d"&gt;nrfx_saadc_init&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/structnrfx__saadc__config__t.html"&gt;nrfx_saadc_config_t&lt;/a&gt;&amp;nbsp;API docs.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Can you share the code that triggers the SAADC&amp;#39;s start task?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 PPI  SAADC  Oversample,sample rate up to 250hz</title><link>https://devzone.nordicsemi.com/thread/280491?ContentTypeID=1</link><pubDate>Wed, 18 Nov 2020 01:45:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c29a1640-5d6c-42fc-90ae-a29262f49699</guid><dc:creator>Coder_hope</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;void ECG8233_saadc_init(void)
{
	ret_code_t err_code;
	nrf_saadc_channel_config_t channel_ECG_config =
    NRF_DRV_SAADC_DEFAULT_CHANNEL_CONFIG_DIFFERENTIAL(ECG_8233_ADC_PIN_IN,ECG_8233_ADC_REF_PIN_IN);
	channel_ECG_config.gain = NRF_SAADC_GAIN1_4;
	channel_ECG_config.burst = NRF_SAADC_BURST_ENABLED;

    nrf_saadc_channel_config_t channel_VBAT_config =
            NRF_DRV_SAADC_DEFAULT_CHANNEL_CONFIG_SE(BAT_VOL_ADC_PIN_IN);
	channel_VBAT_config.burst = NRF_SAADC_BURST_ENABLED;	

    err_code = nrf_drv_saadc_init(NULL, saadc_callback); 
    APP_ERROR_CHECK(err_code);	
	

    err_code = nrf_drv_saadc_channel_init(0, &amp;amp;channel_ECG_config);
    APP_ERROR_CHECK(err_code);
	//ADC  BatteryLevel config
	nrf_delay_ms(10);
    err_code = nrf_drv_saadc_channel_init(1, &amp;amp;channel_VBAT_config);
    APP_ERROR_CHECK(err_code);

	err_code = nrf_drv_saadc_buffer_convert(m_buffer_pool, SAMPLES_IN_BUFFER);
    APP_ERROR_CHECK(err_code);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;this is the rest&amp;nbsp; of SAADC related&amp;nbsp;code,ECG signal&amp;nbsp; and battery voltage, this is saadc config&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;// &amp;lt;0=&amp;gt; 8 bit 
// &amp;lt;1=&amp;gt; 10 bit 
// &amp;lt;2=&amp;gt; 12 bit 
// &amp;lt;3=&amp;gt; 14 bit 

#ifndef NRFX_SAADC_CONFIG_RESOLUTION
#define NRFX_SAADC_CONFIG_RESOLUTION 3  //1:10bit
#endif

// &amp;lt;o&amp;gt; NRFX_SAADC_CONFIG_OVERSAMPLE  - Sample period
 
// &amp;lt;0=&amp;gt; Disabled 
// &amp;lt;1=&amp;gt; 2x 
// &amp;lt;2=&amp;gt; 4x 
// &amp;lt;3=&amp;gt; 8x 
// &amp;lt;4=&amp;gt; 16x 
// &amp;lt;5=&amp;gt; 32x 
// &amp;lt;6=&amp;gt; 64x 
// &amp;lt;7=&amp;gt; 128x 
// &amp;lt;8=&amp;gt; 256x 

#ifndef NRFX_SAADC_CONFIG_OVERSAMPLE
#define NRFX_SAADC_CONFIG_OVERSAMPLE 8//8
#endif
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 PPI  SAADC  Oversample,sample rate up to 250hz</title><link>https://devzone.nordicsemi.com/thread/280324?ContentTypeID=1</link><pubDate>Tue, 17 Nov 2020 11:21:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7cba8f75-2910-46d7-8477-4328b7e7fe63</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;Can you share the rest of your SAADC-related code?&lt;br /&gt;&lt;br /&gt;I suggest you enter a debug session and read the value of the&amp;nbsp;&lt;a title="  BITMODE  " href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/timer.html?cp=4_2_0_23_4_4#register.BITMODE"&gt;BITMODE&lt;/a&gt;,&amp;nbsp;&lt;a title="  PRESCALER  " href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/timer.html?cp=4_2_0_23_4_5#register.PRESCALER"&gt;PRESCALER&lt;/a&gt;, and&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/timer.html?cp=4_2_0_23_4_6#register.CC-0"&gt;CC[x]&lt;/a&gt;&amp;nbsp;register.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;That will tell us whether the TIMER is triggering the SAADC&amp;#39;s sample task when we expect it to.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>