This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Reading ADC in nRF52840

Hi,

I am new to development with Nordic chips. I am using nRF52840-DK (SES,nRF5_SDK_15.3.0_59ac345) to read analog input on ADC pin AIN0. I want to continuously read the adc after pairing is established and then broadcast the data over Bluetooth. In order to achieve my objective, I am trying to run ble_app_hrs example by combining the SAADC example with it. Is this approach correct.

When I compile my program using SES, I am getting the following error in nrfx_timer.h(line 74). I don't get this error if run the these examples individually.

'NRFX_TIMER0_INST_IDX' undeclared here (not in a function); did you mean 'NRFX_TIMER_INSTANCE'?

Thanks,

Jagbir

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/**
* Copyright (c) 2014 - 2019, Nordic Semiconductor ASA
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form, except as embedded into a Nordic
* Semiconductor ASA integrated circuit in a product or a software update for
* such product, must reproduce the above copyright notice, this list of
* conditions and the following disclaimer in the documentation and/or other
* materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX