Other Parts Discussed in Thread: CC2650
Hi,
Not using the SCE.
I have a question about achieivng a semi parallel sampling sequence on the CC2650.
My constraints are that I have to sample 2 analog lines at a 50KHz (20us) rate and
that the 2 lines should be sampled aprox together, with atmost a 0.5us interval between them
I will need a limited amount of samples 64 to 100 and then stop.
My problem is that the ADC can handle only one input at a time and I have to mux the lines after each sample.
I understand that a GPTimer and the ADC triggered by this timer might do the job.
I would set the timer to trigger in 0.5us?, or less?, since it requires changing the mux as well in the ISR via AUXADCSelectInput, after each interrupt.
In order to achieve 50KHz(20us) rate in this setup(Timerr set to 0.5us) I would only capture the relevant samples in the ISR (every 40th, 41st
interrupt)?, since the ISR gets called every 0.5us and 40th, 41th ISR call would be 20us, 20.5us(50 KHz rate)
Given these constraints Is it doable at all?.
Is there a better way of doing this?.
Would appreciate advise if this can be done in another way. Maybe two timers. Or maybe setting a 20us timer and sampling twice?.
What mechanisims should I use so the ADC ISR has the highest priority, i.e. it isnt interrupted by other interrupts which can ruin the 64-100 samples at 50KHz sampling rate?.
Please note will be running the BLE stack as well, all the sampling time, will it interfere or be delayed?.
Thx
Tamir