<?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 configure several  saadc channels of nRF 52810</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/49921/how-to-configure-several-saadc-channels-of-nrf-52810</link><description>Hi, 
 I need to use 6 saadc channels to sample voltage on my project. The saadc channel 0 could be configured to connect different inputs(ANI0~AIN7).But I try to configue other saadc channel,it doesn&amp;#39;t work.I have no idea for that.There is my code and</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 18 Jul 2019 01:15:47 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/49921/how-to-configure-several-saadc-channels-of-nrf-52810" /><item><title>RE: how to configure several  saadc channels of nRF 52810</title><link>https://devzone.nordicsemi.com/thread/199098?ContentTypeID=1</link><pubDate>Thu, 18 Jul 2019 01:15:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:548a8b18-bf6b-429c-a1fd-5d8f40e7171d</guid><dc:creator>james</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;        uint32_t ba_err_code;
			 int16_t batteryTemp[4] = { 0 };
			 int32_t batteryLevel = 0;
			 uint8_t checkStatus = 0;
			 uint8_t batterPercentTemp;
			
			 //InitAdcChannel( ADC_CHANNEL_SIX, LOW_TEMPERATURE );
			 nrf_saadc_channel_config_t channel_config = 
       ADC_DEFAULT_CHANNEL_CONFIG_SE( NRF_SAADC_INPUT_AIN0 );
			 
			 nrf_saadc_channel_config_t channel_config1 = 
       ADC_DEFAULT_CHANNEL_CONFIG_SE( NRF_SAADC_INPUT_AIN1 );
			 
			 ba_err_code = nrf_drv_saadc_channel_init( 0, &amp;amp;channel_config );
			 APP_ERROR_CHECK(ba_err_code);
				
			 ba_err_code = nrf_drv_saadc_channel_init( 1, &amp;amp;channel_config1 );
				APP_ERROR_CHECK(ba_err_code);
			 
			 __ASM volatile (&amp;quot;nop&amp;quot;);
			 __ASM volatile (&amp;quot;nop&amp;quot;);
			 __ASM volatile (&amp;quot;nop&amp;quot;);
			 __ASM volatile (&amp;quot;nop&amp;quot;);
			 __ASM volatile (&amp;quot;nop&amp;quot;);
			 __ASM volatile (&amp;quot;nop&amp;quot;);
			 
			 ba_err_code = nrfx_saadc_sample_convert( 0, batteryTemp );
			 if( ba_err_code == NRFX_SUCCESS )
				{
					 ba_err_code = nrfx_saadc_sample_convert( 0, batteryTemp );
					 if( ba_err_code == NRFX_SUCCESS )
						{
							 batteryTemp[0] &amp;gt;&amp;gt;= ADC_BATTERY_SHIFT_BIT;
							 batteryLevel += batteryTemp[0];
							 ba_err_code = nrfx_saadc_sample_convert( 1, batteryTemp );
							 if( ba_err_code == NRFX_SUCCESS )
								{
									 batteryTemp[0] &amp;gt;&amp;gt;= ADC_BATTERY_SHIFT_BIT;
									 batteryLevel += batteryTemp[0];
								}
							 else
								{
									 checkStatus = 1;
								}
						}
					 else
						{
							checkStatus = 1;
						}
				}
			 else
				{
					 checkStatus = 1;
				}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to configure several  saadc channels of nRF 52810</title><link>https://devzone.nordicsemi.com/thread/198992?ContentTypeID=1</link><pubDate>Wed, 17 Jul 2019 13:09:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:91755523-2f5c-4e38-95a9-31795793cc17</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;Pretty sure that the SAADC example in the SDK uses 3 channels ... ?&lt;/p&gt;
&lt;p&gt;How to properly post source code:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/6470._5F00_Insert-Code-_2D00_-Nordic.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to configure several  saadc channels of nRF 52810</title><link>https://devzone.nordicsemi.com/thread/198978?ContentTypeID=1</link><pubDate>Wed, 17 Jul 2019 12:43:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f3f804dc-fb24-4a1e-98a3-1a3bb2753c9c</guid><dc:creator>james</dc:creator><description>&lt;p&gt;Thanks Simonr.Enjoy your days.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to configure several  saadc channels of nRF 52810</title><link>https://devzone.nordicsemi.com/thread/198975?ContentTypeID=1</link><pubDate>Wed, 17 Jul 2019 12:38:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:44d09194-c22a-42c7-be11-1246c26e6b75</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi James&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/NordicPlayground/nRF52-ADC-examples/tree/master/ble_app_uart__saadc_timer_driven__scan_mode"&gt;This GitHub example&lt;/a&gt; explains how to configure four different SAADC channels. Please use it as a template and modify it to work with your 6 channels.&lt;/p&gt;
&lt;p&gt;Due to the summer holidays in Norway, our support team is understaffed this week, and delayed replies must be expected. Sorry for the inconvenience!&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>