<?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>ADC on nRF9160 DK - Example code problems</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/45296/adc-on-nrf9160-dk---example-code-problems</link><description>Hi, 
 I am trying to get the ADC up and running on the nRF9160 DK. I had a look for example code and the latest I found was here. 
 https://github.com/Rallare/fw-nrfconnect-nrf/tree/nrf9160_samples/samples/nrf9160/adc/src 
 Can anyone suggest an alternative</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 30 Mar 2019 14:21:37 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/45296/adc-on-nrf9160-dk---example-code-problems" /><item><title>RE: ADC on nRF9160 DK - Example code problems</title><link>https://devzone.nordicsemi.com/thread/179340?ContentTypeID=1</link><pubDate>Sat, 30 Mar 2019 14:21:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ae31b95d-a0c9-4a81-b7ee-62e1b76e155a</guid><dc:creator>RodWatt</dc:creator><description>&lt;p&gt;That worked perfectly! Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ADC on nRF9160 DK - Example code problems</title><link>https://devzone.nordicsemi.com/thread/178898?ContentTypeID=1</link><pubDate>Thu, 28 Mar 2019 11:33:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5ec61bc4-b558-4093-99cb-e55db7fb7365</guid><dc:creator>Martin Lesund</dc:creator><description>&lt;p&gt;Hi Rod,&lt;br /&gt;I am sorry for the confusion.&lt;br /&gt;I was able to replicate the issue. There is an issue in the adc sample, but it is a quick fix.&lt;/p&gt;
&lt;p&gt;Please change in main.c line 19 to:&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_BOARD_NRF9160_PCA10090&lt;strong&gt;NS&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;and in prj.conf file add:&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_MAIN_STACK_SIZE&lt;/span&gt;&lt;span&gt;=4096&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Then you should be able to run the sample.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ADC on nRF9160 DK - Example code problems</title><link>https://devzone.nordicsemi.com/thread/178780?ContentTypeID=1</link><pubDate>Wed, 27 Mar 2019 17:50:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ce0f9cde-6e5e-4d19-92d8-e27ca0c56917</guid><dc:creator>RodWatt</dc:creator><description>&lt;p&gt;Hi Martin, I am pretty sure I have this set up OK, I cant be sure as Im away on business away from my development machine at this minute but will check on my return. If not, I will reinstall&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Rod&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ADC on nRF9160 DK - Example code problems</title><link>https://devzone.nordicsemi.com/thread/178281?ContentTypeID=1</link><pubDate>Tue, 26 Mar 2019 10:01:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:93249a01-8f50-47b9-ae84-e5e1b519cb3b</guid><dc:creator>Martin Lesund</dc:creator><description>&lt;p&gt;Hi Rod,&lt;/p&gt;
&lt;p&gt;Have you&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/44879/build-nrf-connect-sdk-project-via-command-line" rel="noopener noreferrer" target="_blank"&gt; sourced the zephyr-env.sh&lt;/a&gt; in the &lt;a href="https://github.com/NordicPlayground/fw-nrfconnect-zephyr"&gt;https://github.com/NordicPlayground/fw-nrfconnect-zephyr&lt;/a&gt;&amp;nbsp;repo, since it looks like compiler struggles with finding the definitions which are in &lt;a href="https://github.com/NordicPlayground/fw-nrfconnect-zephyr/tree/master/ext/hal/nordic/nrfx/mdk"&gt;https://github.com/NordicPlayground/fw-nrfconnect-zephyr/tree/master/ext/hal/nordic/nrfx/mdk&lt;/a&gt;&amp;nbsp;file.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;You should have&lt;a href="https://devzone.nordicsemi.com/tutorials/b/getting-started/posts/getting-started-with-nrf9160-dk#h44sjqflj6za11q29mz1a3y9y31ix0c08" rel="noopener noreferrer" target="_blank"&gt; this structure:&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-91a257c17c4145999f86e0b16b180464/pastedimage1553594373847v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ADC on nRF9160 DK - Example code problems</title><link>https://devzone.nordicsemi.com/thread/178202?ContentTypeID=1</link><pubDate>Mon, 25 Mar 2019 21:04:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f03d76bc-23e6-4296-a2c8-a93bec26c3d3</guid><dc:creator>RodWatt</dc:creator><description>&lt;p&gt;Hi Martin,&lt;/p&gt;
&lt;p&gt;Sorry, Im missing something obvious here, so obvious I can&amp;#39;t see it!&lt;/p&gt;
&lt;p&gt;I have copied the source for the secure boot as above, and try to compile using..&lt;/p&gt;
&lt;p&gt;&lt;span&gt;cmake -GNinja -DBOARD=nrf9160_pca10090 ..&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;then, when I run ninja, I get...&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Watts-MacBook-Pro:build Watt$ ninja&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;[26/105] Building C object CMakeFiles/app.dir/src/main.c.obj&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;FAILED: CMakeFiles/app.dir/src/main.c.obj&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;ccache /Users/Watt/gnuarmemb/bin/arm-none-eabi-gcc -DBUILD_VERSION=v1.14.0-rc1-1246-g959abdf1c9c9 -DKERNEL -DNRF9160_XXAA -D_FORTIFY_SOURCE=2 -D__ZEPHYR__=1 -I/Users/Watt/zephyrproject/zephyr/kernel/include -I/Users/Watt/zephyrproject/zephyr/arch/arm/include -I/Users/Watt/zephyrproject/zephyr/include -I/Users/Watt/zephyrproject/zephyr/include/drivers -Izephyr/include/generated -I/Users/Watt/zephyrproject/zephyr/soc/arm/nordic_nrf/nrf91 -I/Users/Watt/zephyrproject/zephyr/soc/arm/nordic_nrf/include -I/Users/Watt/zephyrproject/zephyr/lib/libc/minimal/include -I/Users/Watt/zephyrproject/zephyr/ext/hal/cmsis/Include -I/Users/Watt/zephyrproject/zephyr/ext/hal/nordic/nrfx -I/Users/Watt/zephyrproject/zephyr/ext/hal/nordic/nrfx/drivers/include -I/Users/Watt/zephyrproject/zephyr/ext/hal/nordic/nrfx/hal -I/Users/Watt/zephyrproject/zephyr/ext/hal/nordic/nrfx/mdk -I/Users/Watt/zephyrproject/zephyr/ext/hal/nordic/. -isystem /Users/Watt/gnuarmemb/bin/../lib/gcc/arm-none-eabi/7.3.1/include -isystem /Users/Watt/gnuarmemb/bin/../lib/gcc/arm-none-eabi/7.3.1/include-fixed -Os -nostdinc -g -Wall -Wformat -Wformat-security -Wno-format-zero-length -imacros /Users/Watt/SD_Connect/ncs/nrf/samples/nrf9160/secure_boot/build/zephyr/include/generated/autoconf.h -ffreestanding -Wno-main -fno-common -mthumb -mcpu=cortex-m33 -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-strict-overflow -Wno-pointer-sign -Wno-unused-but-set-variable -fno-reorder-functions -fno-defer-pop -Werror=implicit-int -Wpointer-arith -ffunction-sections -fdata-sections -mabi=aapcs -march=armv8-m.main+dsp -mcmse -std=c99 -MD -MT CMakeFiles/app.dir/src/main.c.obj -MF CMakeFiles/app.dir/src/main.c.obj.d -o CMakeFiles/app.dir/src/main.c.obj &lt;span class="Apple-converted-space"&gt;&amp;nbsp; &lt;/span&gt;-c ../src/main.c&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;../src/main.c: In function &amp;#39;secure_boot_config_peripherals&amp;#39;:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;../src/main.c:305:26: error: &amp;#39;NRF_GPIO&amp;#39; undeclared (first use in this function); did you mean &amp;#39;NRF_GPIOTE&amp;#39;?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;NRFX_PERIPHERAL_ID_GET(NRF_GPIO), 0);&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;^&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;../src/main.c:83:23: note: in definition of macro &amp;#39;NRFX_PERIPHERAL_ID_GET&amp;#39;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="Apple-converted-space"&gt;&amp;nbsp; &lt;/span&gt;(uint8_t)((uint32_t)(base_addr) &amp;gt;&amp;gt; 12)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;^~~~~~~~~&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;../src/main.c:305:26: note: each undeclared identifier is reported only once for each function it appears in&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;NRFX_PERIPHERAL_ID_GET(NRF_GPIO), 0);&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;^&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;../src/main.c:83:23: note: in definition of macro &amp;#39;NRFX_PERIPHERAL_ID_GET&amp;#39;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="Apple-converted-space"&gt;&amp;nbsp; &lt;/span&gt;(uint8_t)((uint32_t)(base_addr) &amp;gt;&amp;gt; 12)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;^~~~~~~~~&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;../src/main.c: In function &amp;#39;secure_boot_jump&amp;#39;:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;../src/main.c:377:13: warning: Macro is deprecated&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="Apple-converted-space"&gt;&amp;nbsp; &lt;/span&gt;u32_t *vtor_ns = (u32_t *)FLASH_AREA_IMAGE_0_NONSECURE_OFFSET_0;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;^~~~~~~~~~~~~~~~~~~~~&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;[35/105] Building C object zephyr/CMakeFiles/zephyr.dir/drivers/timer/nrf_rtc_timer.c.obj&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;ninja: build stopped: subcommand failed.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Watts-MacBook-Pro:build Watt$&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I guess I&amp;#39;m pointing to an old .h file&amp;nbsp;&lt;/span&gt;somewhere?&lt;/p&gt;
&lt;p&gt;So, then I tried using your .hex file.I was able to program the board successfully with secure boot.&lt;/p&gt;
&lt;p&gt;When I try to build the ads code, I get more errors&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Watts-MacBook-Pro:build Watt$ ninja&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;[121/128] Building C object CMakeFiles/app.dir/src/main.c.obj&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;FAILED: CMakeFiles/app.dir/src/main.c.obj&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;ccache /Users/Watt/gnuarmemb/bin/arm-none-eabi-gcc -DBUILD_VERSION=v1.14.0-rc1-1246-g959abdf1c9c9 -DKERNEL -DNRF9160_XXAA -DNRF_TRUSTZONE_NONSECURE -D_FORTIFY_SOURCE=2 -D__ZEPHYR__=1 -I/Users/Watt/zephyrproject/zephyr/kernel/include -I/Users/Watt/zephyrproject/zephyr/arch/arm/include -I/Users/Watt/zephyrproject/zephyr/include -I/Users/Watt/zephyrproject/zephyr/include/drivers -Izephyr/include/generated -I/Users/Watt/zephyrproject/zephyr/soc/arm/nordic_nrf/nrf91 -I/Users/Watt/zephyrproject/zephyr/soc/arm/nordic_nrf/include -I/Users/Watt/zephyrproject/zephyr/lib/libc/minimal/include -I/Users/Watt/zephyrproject/zephyr/ext/hal/cmsis/Include -I/Users/Watt/zephyrproject/zephyr/ext/hal/nordic/nrfx -I/Users/Watt/zephyrproject/zephyr/ext/hal/nordic/nrfx/drivers/include -I/Users/Watt/zephyrproject/zephyr/ext/hal/nordic/nrfx/hal -I/Users/Watt/zephyrproject/zephyr/ext/hal/nordic/nrfx/mdk -I/Users/Watt/zephyrproject/zephyr/ext/hal/nordic/. -I/Users/Watt/zephyrproject/zephyr/subsys/net/lib/sockets/. -isystem /Users/Watt/gnuarmemb/bin/../lib/gcc/arm-none-eabi/7.3.1/include -isystem /Users/Watt/gnuarmemb/bin/../lib/gcc/arm-none-eabi/7.3.1/include-fixed -Os -nostdinc -g -Wall -Wformat -Wformat-security -Wno-format-zero-length -imacros /Users/Watt/Documents/Switch_That/Nordic_Semi_Code/ADC_Test/build/zephyr/include/generated/autoconf.h -ffreestanding -Wno-main -fno-common -mthumb -mcpu=cortex-m33 -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-strict-overflow -Wno-pointer-sign -Wno-unused-but-set-variable -fno-reorder-functions -fno-defer-pop -Werror=implicit-int -Wpointer-arith -ffunction-sections -fdata-sections -mabi=aapcs -march=armv8-m.main+dsp -std=c99 -MD -MT CMakeFiles/app.dir/src/main.c.obj -MF CMakeFiles/app.dir/src/main.c.obj.d -o CMakeFiles/app.dir/src/main.c.obj &lt;span class="Apple-converted-space"&gt;&amp;nbsp; &lt;/span&gt;-c ../src/main.c&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;../src/main.c:36:10: error: &amp;#39;ADC_GAIN&amp;#39; undeclared here (not in a function); did you mean &amp;#39;ADC_GAIN_8&amp;#39;?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="Apple-converted-space"&gt;&amp;nbsp; &lt;/span&gt;.gain = ADC_GAIN,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;^~~~~~~~&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;ADC_GAIN_8&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;../src/main.c:37:15: error: &amp;#39;ADC_REFERENCE&amp;#39; undeclared here (not in a function); did you mean &amp;#39;ADC_REF_VDD_1&amp;#39;?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="Apple-converted-space"&gt;&amp;nbsp; &lt;/span&gt;.reference = ADC_REFERENCE,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;^~~~~~~~~~~~~&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;ADC_REF_VDD_1&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;../src/main.c:38:22: error: &amp;#39;ADC_ACQUISITION_TIME&amp;#39; undeclared here (not in a function); did you mean &amp;#39;ADC_ACQ_TIME&amp;#39;?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="Apple-converted-space"&gt;&amp;nbsp; &lt;/span&gt;.acquisition_time = ADC_ACQUISITION_TIME,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;^~~~~~~~~~~~~~~~~~~~&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;ADC_ACQ_TIME&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;../src/main.c:39:16: error: &amp;#39;ADC_1ST_CHANNEL_ID&amp;#39; undeclared here (not in a function)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="Apple-converted-space"&gt;&amp;nbsp; &lt;/span&gt;.channel_id = ADC_1ST_CHANNEL_ID,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;^~~~~~~~~~~~~~~~~~&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;../src/main.c:41:20: error: &amp;#39;ADC_1ST_CHANNEL_INPUT&amp;#39; undeclared here (not in a function); did you mean &amp;#39;ADC_1ST_CHANNEL_ID&amp;#39;?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="Apple-converted-space"&gt;&amp;nbsp; &lt;/span&gt;.input_positive = ADC_1ST_CHANNEL_INPUT,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;^~~~~~~~~~~~~~~~~~~~~&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;ADC_1ST_CHANNEL_ID&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;../src/main.c: In function &amp;#39;adc_sample&amp;#39;:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;../src/main.c:56:17: error: &amp;#39;ADC_RESOLUTION&amp;#39; undeclared (first use in this function)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;.resolution = ADC_RESOLUTION,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;^~~~~~~~~~~~~~&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;../src/main.c:56:17: note: each undeclared identifier is reported only once for each function it appears in&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;ninja: build stopped: subcommand failed.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Watts-MacBook-Pro:build Watt$&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Again, looks&amp;nbsp;like eIm pointing to an&amp;nbsp;&lt;/span&gt;incorrect .h file?&lt;/p&gt;
&lt;p&gt;I went through the errors and replaced the definitions .n the adc code, for example, replaced&amp;nbsp;&lt;span&gt;ADC_1ST_CHANNEL_INPUT with&amp;nbsp;ADC_1ST_CHANNEL_ID. I can get the code to build but get the bus error again, but I guess Im just working&amp;nbsp;round the main problem of my include files?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Sorry for being stupid here, Im a h/w guy trying to&amp;nbsp;make&amp;nbsp;it in a s/w world!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Rod&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ADC on nRF9160 DK - Example code problems</title><link>https://devzone.nordicsemi.com/thread/178101?ContentTypeID=1</link><pubDate>Mon, 25 Mar 2019 12:43:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6616eb04-78c9-4c99-b58d-a724ddd05c52</guid><dc:creator>RodWatt</dc:creator><description>&lt;p&gt;Hey Martin, thank you for the speedy reply, I will try this (hopefully) later today and let you know, Regards,&lt;/p&gt;
&lt;p&gt;Rod&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ADC on nRF9160 DK - Example code problems</title><link>https://devzone.nordicsemi.com/thread/178095?ContentTypeID=1</link><pubDate>Mon, 25 Mar 2019 12:34:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:56ecf2da-f013-44af-bb52-438618f2f47b</guid><dc:creator>Martin Lesund</dc:creator><description>&lt;p&gt;Hi Rod,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you look in the &lt;a href="https://github.com/Rallare/fw-nrfconnect-nrf/commit/0e5d440ed4a7e12722a289cd88590ad92baf8238" rel="noopener noreferrer" target="_blank"&gt;commit &lt;/a&gt;for the secure_boot in that repo you can see that there has been &lt;a href="https://github.com/Rallare/fw-nrfconnect-nrf/blob/nrf9160_samples/samples/nrf9160/secure_boot/src/main.c#L338" rel="noopener noreferrer" target="_blank"&gt;added three lines.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;	/* Configure SAADC as non-secure */
	secure_boot_config_peripheral(
		NRFX_PERIPHERAL_ID_GET(NRF_SAADC_S), 0);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;If you add that and reflash you should be good.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;Also adding the precompiled .hex if you have any issues:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-91a257c17c4145999f86e0b16b180464/secure_5F00_boot.hex"&gt;devzone.nordicsemi.com/.../secure_5F00_boot.hex&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Use &lt;a href="https://www.nordicsemi.com/Software-and-Tools/Development-Tools/nRF5-Command-Line-Tools" rel="noopener noreferrer" target="_blank"&gt;nrfjprog &lt;/a&gt;to flash the file, with the command: nrfjprog --program secure_boot.hex -f nrf91 --sectorerase -r --verify&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>