Hello,
I'm using BL654 module (nrf52840 inside); SDK15; softdevice s140; IAR.
In my projects I'm using peripherals: I2C(TWI), SPI. Project based on ble_app_uart example (most of sdk_config.h are default, exept TWI/SPI instances and timer3)
My goal is to add sampling data from 4 analog input channels:
Channel 1 - input 0;
Channel 2 - input 5;
Channel 3 - input 4;
Channel 4 - input 7;
My code for SAADC:
Main(removed stuff with TWI and SPI):
Problem:
Channel's position numbers doest match their positions in output. And sometimes hopping in arrays...
For example, I'm shorting AIN0 (channel #1) to GND and thats what I see under debug:
AIN5 (channel #2):
AIN4 (channel #3):
AIN7 (channel #4):
And one more things I would like to ask:
Since TIMER0 is used by softdevice, I'm using TIMER3 for SAADC. Am I correct that in saadc_sampling_event_init() I shoud compare events/adresses for TIMER3?
Regards