While debugging this code https://github.com/Rallare/fw-nrfconnect-nrf/blob/nrf9160_samples/samples/nrf9160/adc/src/main.c using nrf9160dk getting error "device_get_binding ADC_0 failed"
Compiling successfully.
Can anyone please suggest a solution?
While debugging this code https://github.com/Rallare/fw-nrfconnect-nrf/blob/nrf9160_samples/samples/nrf9160/adc/src/main.c using nrf9160dk getting error "device_get_binding ADC_0 failed"
Compiling successfully.
Can anyone please suggest a solution?
Hi!
Have you modified the name of the overlay file? <nrf9160_pca10090> is the old version of the board name, so if you're building for the current board name (nrf9160dk_nrf9160), the overlay file with its current name won't be included in the build, i.e the ADC note won't be set to "okay" and the device binding fails.
Best regards,
Heidi
HI,
Yes I have already modified the name of overlay file to nrf9160dk_nrf9160ns.
Regards
Shahajas
Okay. Please describe all the modifications you've made to the sample or it will be hard to help you .
Have you for instance changed the board names in the if statement on lines 17 through 20?
I have modified line 19 to CONFIG_BOARD_NRF9160_PCA10090NS.
added #define CONFIG_BOARD_NRF9160_PCA10090NS at 16 line.
Changed the name of overlay file to nrf9160dk_nrf9160ns.
change at line 46 - static s16_t m_sample_buffer[BUFFER_SIZE]; to static uint16_t m_sample_buffer[BUFFER_SIZE];
These are the changes i have done .
it shows a warning (assignment discards 'const' qualifies from pointer target type [-wdiscarded-qualifiers] ) at line 89
Which NCS tag are you building this on? When getting it to run on master, I had to modify quite a bit more than what you describe.