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

High ADC sampling NRF51 Development kit

Hi,

I have an NRF 51 DK and vs. 11 of the SDK and just recently learned how to write some basic code and now I am trying to learn how to use ADC on NRF51. I am trying to sample signals at a frequency of at least 1kHz (1ms). I am trying to use the NRF_DRV_ADC_DEFAULT_CONFIG setting, but it says the ADC_CONFIG_IRQ_PRIORTY is undeffined. When I look at the ADC example in the SDK, it does not have the same issue and I included the nrf_drv_adc.h file.

Also what is the -> symbol represent in the ADC example.

Parents
  • Hi,

    ADC_CONFIG_IRQ_PRIORTY is defined in nrf_drv_config.h, which is normally placed under your_project\config. You can just copy the one from the ADC example. If ADC_ENABLE is defined as 1, ADC_CONFIG_IRQ_PRIORITY will be defined.

    About the -> symbol, it is the normal syntax for accessing variables in a structure via a pointer, see for example this tutorial on structures and pointers.

    Ole

Reply
  • Hi,

    ADC_CONFIG_IRQ_PRIORTY is defined in nrf_drv_config.h, which is normally placed under your_project\config. You can just copy the one from the ADC example. If ADC_ENABLE is defined as 1, ADC_CONFIG_IRQ_PRIORITY will be defined.

    About the -> symbol, it is the normal syntax for accessing variables in a structure via a pointer, see for example this tutorial on structures and pointers.

    Ole

Children
Related