Hi,
I am trying to program an NRF51 DK to read ADC signals at 1kHz with a S130 soft device. I am completely new to programming MCUs and would you recommend using keil or mbed for this sort of project?
Hi,
I am trying to program an NRF51 DK to read ADC signals at 1kHz with a S130 soft device. I am completely new to programming MCUs and would you recommend using keil or mbed for this sort of project?
It will depend on the timing requirement. The ADC function in mbed is blocking (it will start the ADC and then wait for it to be finished by actively pulling the end event). Worst case the ADC sample will be delayed by the maximum length of the BLE interrupts. With the SDK you can set up a TIMER and PPI to trigger the ADC automatically every millisecond. This means that the ADC sample will not be delayed. The CPU can read the ADC value anywhere between the samples. Take a look at the adc example and the ppi example in the SDK. The task address of the ADC start task can be retrieved with:
nrf_adc_task_address_get(NRF_ADC_TASK_START);
Let me know if you need any more help setting up the ADC.