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

nRF52 saadc with softdevice

Hello, I have tried to combine saadc with softdevice, but having errors during compiling. I have copied .c and .h files from saadc example to ble_hrs example, but having following errors:

compiling nrf_drv_saadc.c...
..\..\..\nrf_drv_saadc.c(32): error:  #20: identifier "SAADC_CONFIG_RESOLUTION" is undefined
  static const nrf_drv_saadc_config_t m_default_config = nRF_DRV_SAADC_DEFAULT_CONFIG;
..\..\..\nrf_drv_saadc.c(32): error:  #20: identifier "SAADC_CONFIG_OVERSAMPLE" is undefined
  static const nrf_drv_saadc_config_t m_default_config = nRF_DRV_SAADC_DEFAULT_CONFIG;
..\..\..\nrf_drv_saadc.c(32): error:  #20: identifier "SAADC_CONFIG_IRQ_PRIORITY" is undefined
  static const nrf_drv_saadc_config_t m_default_config = nRF_DRV_SAADC_DEFAULT_CONFIG;
..\..\..\nrf_drv_saadc.c: 0 warnings, 3 errors
compiling nrf_drv_timer.c...
..\..\..\nrf_drv_timer.c(25): error:  #94-D: the size of an array must be greater than zero
  static nrf_timer_event_handler_t m_timer_event_handlers[TIMER_COUNT];
..\..\..\nrf_drv_timer.c(26): error:  #94-D: the size of an array must be greater than zero
  static nrf_drv_timer_cb_t        m_cb[TIMER_COUNT];
..\..\..\nrf_drv_timer.c(27): error:  #94-D: the size of an array must be greater than zero
  static void*                     mp_contexts[TIMER_COUNT];
..\..\..\nrf_drv_timer.c(39): error:  #29: expected an expression
  };
..\..\..\nrf_drv_timer.c(29): error:  #1514: an empty initializer is invalid for an array with unspecified bound
  static const nrf_drv_timer_config_t m_default_config[] = {
..\..\..\nrf_drv_timer.c(311): warning:  #177-D: function "nrf_drv_timer_interrupt_handle" was declared but never referenced
  static void nrf_drv_timer_interrupt_handle(NRF_TIMER_Type * p_reg, uint32_t timer_id)
..\..\..\nrf_drv_timer.c: 1 warning, 5 errors
".\_build\nrf58232_xxaa_s132.axf" - 9 Error(s), 1 Warning(s).

Please help to figure out this problem or any other better way to have saadc function with softdevice. Thanks!

Parents Reply Children
Related