<?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>My NRF52811 Custome board not working as my application.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/52360/my-nrf52811-custome-board-not-working-as-my-application</link><description>Hello, 
 1) I am using the PCA10040 to program a nrf52811 chip on a custom board with SDK 15.3.0. 
 2) I&amp;#39;m using the example ble_app_uart_pca10040_s112 on uKeilV5 
 3) Initially i tried to flash Softdevice and application using nRFgo Studio, 
 but when</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 21 Oct 2019 11:42:29 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/52360/my-nrf52811-custome-board-not-working-as-my-application" /><item><title>RE: My NRF52811 Custome board not working as my application.</title><link>https://devzone.nordicsemi.com/thread/215902?ContentTypeID=1</link><pubDate>Mon, 21 Oct 2019 11:42:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7aae4675-7bf3-4510-b089-029a6aec3c64</guid><dc:creator>mandha_amarr</dc:creator><description>&lt;p&gt;Thank you jimmy Wong.&lt;/p&gt;
&lt;p&gt;My problem is solved.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: My NRF52811 Custome board not working as my application.</title><link>https://devzone.nordicsemi.com/thread/211801?ContentTypeID=1</link><pubDate>Wed, 25 Sep 2019 12:04:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:74ffd773-5c6f-46ba-88fe-0a6551deb5dc</guid><dc:creator>mandha_amarr</dc:creator><description>&lt;p&gt;Hi jimmy Wong,&lt;/p&gt;
&lt;p&gt;Thank you for response, I downloaded that code which you given link and then i run it. It is running and giving Four channel&amp;nbsp;&lt;/p&gt;
&lt;p&gt;ADC data. Like below&amp;nbsp;&lt;/p&gt;
&lt;p&gt;ADC event number: 0&lt;br /&gt;ADC Value 348&lt;br /&gt;ADC Value 695&lt;br /&gt;ADC Value 347&lt;br /&gt;ADC Value 695&lt;br /&gt;ADC event number: 1&lt;br /&gt;ADC Value 348&lt;br /&gt;ADC Value 696&lt;br /&gt;ADC Value 348&lt;br /&gt;ADC Value 695&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;But it is running once only after pressing&amp;nbsp; reset button. it is not running &lt;span&gt;continuously&amp;nbsp;&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;I want to read the ADC values continuously with some delay, Is it possible to do that in your suggested code.&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: My NRF52811 Custome board not working as my application.</title><link>https://devzone.nordicsemi.com/thread/211575?ContentTypeID=1</link><pubDate>Tue, 24 Sep 2019 14:12:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:69c3f170-2867-40c2-9fc1-5eb320fa70c1</guid><dc:creator>Jimmy Wong</dc:creator><description>&lt;p&gt;HI,&lt;/p&gt;
&lt;p&gt;YOu can refer to the example on&amp;nbsp;&lt;a href="https://github.com/NordicPlayground/nRF52-ADC-examples/tree/master/ble_app_uart__saadc_timer_driven__scan_mode"&gt;https://github.com/NordicPlayground/nRF52-ADC-examples/tree/master/ble_app_uart__saadc_timer_driven__scan_mode&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: My NRF52811 Custome board not working as my application.</title><link>https://devzone.nordicsemi.com/thread/211554?ContentTypeID=1</link><pubDate>Tue, 24 Sep 2019 13:02:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:047a297b-6032-48c8-b9ec-164275ea4894</guid><dc:creator>mandha_amarr</dc:creator><description>&lt;p&gt;Hi jimmy,&lt;/p&gt;
&lt;p&gt;Sorry for late replay. Present i am using PCA10040 Board for developing my application.&lt;/p&gt;
&lt;p&gt;As per my application i want to use Four ADC Channels (AIN0-AIN3) in NRF52832 From Four channels&lt;/p&gt;
&lt;p&gt;Two channels(AIN0 &amp;amp;AIN1) for reading two external batteries voltages and reamining two(AIN2 and AIN3)&lt;/p&gt;
&lt;p&gt;for reading external peripheral voltages.&amp;nbsp; From four ADC&lt;/p&gt;
&lt;p&gt;channels i&amp;nbsp; configured one ADC for for reading one external peripheral voltage like below attached source&lt;/p&gt;
&lt;p&gt;code.&lt;/p&gt;
&lt;p&gt;I think NRF52832 using one Buffer for serving to all four adc channels. am i right or wrong?&lt;/p&gt;
&lt;p&gt;But my aim is to use multiple ADCs&amp;nbsp; channels, How can i approch to do this? please suggest me.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;
void saadc_init(void)
{
    ret_code_t err_code;

    nrf_saadc_channel_config_t channel_config =
    NRF_DRV_SAADC_DEFAULT_CHANNEL_CONFIG_SE(NRF_SAADC_INPUT_AIN0);  //0.6v for vdd
	  
	
    channel_config.reference = NRF_SAADC_REFERENCE_VDD4; 
	
    err_code = nrf_drv_saadc_init(NULL, saadc_event_handler);  //This is the function call for ADC Default configuration
    APP_ERROR_CHECK(err_code);

    err_code = nrf_drv_saadc_channel_init(0, &amp;amp;channel_config);
    APP_ERROR_CHECK(err_code);

    err_code = nrf_drv_saadc_buffer_convert(m_buffer_pool[0],SAMPLES_IN_BUFFER);
    APP_ERROR_CHECK(err_code);

	   
	
    err_code = nrf_drv_saadc_buffer_convert(m_buffer_pool[1],SAMPLES_IN_BUFFER);
    APP_ERROR_CHECK(err_code);
		
		
}

void saadc_event_handler(nrf_drv_saadc_evt_t const * p_event)
{
   if (p_event-&amp;gt;type == NRF_DRV_SAADC_EVT_DONE)
   {
      ret_code_t err_code;
		 
		 
		    err_code = nrf_drv_saadc_buffer_convert(p_event-&amp;gt;data.done.p_buffer, SAMPLES_IN_BUFFER);
        APP_ERROR_CHECK(err_code);

        int i;
        

        for (i = 0; i &amp;lt; SAMPLES_IN_BUFFER; i++)
        {
	    	int neg_buffer = p_event-&amp;gt;data.done.p_buffer[i];
					
			if(neg_buffer &amp;lt; 0)
			{
				neg_buffer = 0;
				printf(&amp;quot;ADC Value = %d \r\n&amp;quot;, neg_buffer); //amarr
				p_event-&amp;gt;data.done.p_buffer[i] = 0;
			}
			else
			{		   	
				printf(&amp;quot;ADC Value = %d \r\n&amp;quot;, p_event-&amp;gt;data.done.p_buffer[i]); //amarr
			}
        }
        m_adc_evt_counter++;
	 }	 
	 else
	 {
	   printf(&amp;quot;saadc_event_handler else condition: %d \n&amp;quot;, p_event-&amp;gt;type); 
	 }
}

void timer_handler(nrf_timer_event_t event_type, void * p_context)
{

}


void saadc_sampling_event_init(void)
{
    ret_code_t err_code;
    err_code = nrf_drv_ppi_init();
    APP_ERROR_CHECK(err_code);
	
	  nrf_drv_timer_config_t timer_cfg = NRF_DRV_TIMER_DEFAULT_CONFIG;
	  timer_cfg.bit_width = NRF_TIMER_BIT_WIDTH_32;
	
	  err_code = nrf_drv_timer_init(&amp;amp;m_timer, &amp;amp;timer_cfg, timer_handler);
	  APP_ERROR_CHECK(err_code);
		
	 /* setup m_timer for compare event every 400ms */
    uint32_t ticks = nrf_drv_timer_ms_to_ticks(&amp;amp;m_timer, 400);
	  	
		 nrf_drv_timer_extended_compare(&amp;amp;m_timer,
                                   NRF_TIMER_CC_CHANNEL0,
                                   ticks,
                                   NRF_TIMER_SHORT_COMPARE0_CLEAR_MASK,
                                   false);
    nrf_drv_timer_enable(&amp;amp;m_timer);

    uint32_t timer_compare_event_addr = nrf_drv_timer_compare_event_address_get(&amp;amp;m_timer,
                                                                                NRF_TIMER_CC_CHANNEL0);
    uint32_t saadc_sample_task_addr   = nrf_drv_saadc_sample_task_get();

    /* setup ppi channel so that timer compare event is triggering sample task in SAADC */
    err_code = nrf_drv_ppi_channel_alloc(&amp;amp;m_ppi_channel);
    APP_ERROR_CHECK(err_code);

    err_code = nrf_drv_ppi_channel_assign(m_ppi_channel,
                                          timer_compare_event_addr,
                                          saadc_sample_task_addr);
    APP_ERROR_CHECK(err_code);
}


void saadc_sampling_event_enable(void)
{
    ret_code_t err_code = nrf_drv_ppi_channel_enable(m_ppi_channel);

    APP_ERROR_CHECK(err_code);
}





int main(void)
{
   
    uart_init();
    
    timers_init();
    buttons_leds_init(&amp;amp;erase_bonds);
    power_management_init();
    ble_stack_init();
    gap_params_init();
    gatt_init();
    services_init();
    advertising_init();
    conn_params_init();
	  
	  
	  
    // Start execution.
    advertising_start();

    saadc_init();  
	saadc_sampling_event_init(); 
    saadc_sampling_event_enable(); 
			
	  nrf_delay_ms(3000);
		
    // Enter main loop.
while(1)
{
	
}

&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: My NRF52811 Custome board not working as my application.</title><link>https://devzone.nordicsemi.com/thread/210959?ContentTypeID=1</link><pubDate>Fri, 20 Sep 2019 13:31:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eceb7cf0-29da-49e7-8c37-2c9d971225f8</guid><dc:creator>Jimmy Wong</dc:creator><description>&lt;p&gt;HI,&lt;br /&gt;&lt;br /&gt;Yes, you can use the PCA10040 debug out to program your target board given VDD = 3.0V.&lt;/p&gt;
&lt;p&gt;YOu can use the Segger Embedded studio instead of KEIL for running the example.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: My NRF52811 Custome board not working as my application.</title><link>https://devzone.nordicsemi.com/thread/210777?ContentTypeID=1</link><pubDate>Thu, 19 Sep 2019 16:48:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1ecea54c-054c-45e5-bbfb-a447dba8f20d</guid><dc:creator>mandha_amarr</dc:creator><description>&lt;p&gt;Thank you Jimmy wong,&lt;/p&gt;
&lt;p&gt;Can i use PCA10040 board as JLink programmer for my custom board which having NRF52811 SoC. I go through your shared link and downloaded and unzip it. but i&amp;nbsp; cannot open in keil as a project.&amp;nbsp; can you please suggest me how to use it?&lt;/p&gt;
&lt;p&gt;Thank you&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: My NRF52811 Custome board not working as my application.</title><link>https://devzone.nordicsemi.com/thread/210750?ContentTypeID=1</link><pubDate>Thu, 19 Sep 2019 14:18:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2b089f82-90a9-44df-9ee6-e3e56cb78b0e</guid><dc:creator>Jimmy Wong</dc:creator><description>&lt;p&gt;HI,&amp;nbsp;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;This is the example of the S140v7.0.1 wih NRF52811.&lt;br /&gt;&lt;br /&gt;&lt;a href="https://github.com/jimmywong2003/nrf52811-ble-long-range-demo"&gt;https://github.com/jimmywong2003/nrf52811-ble-long-range-demo&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>