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

FreeRTOS with BLE and ADC (nrf52)

Hi,

I'm looking for an example which combines FreeRTOS, BLE and ADC on nrf52 board(10040). I'm able to have FreeRTOS with BLE, FreeRTOS with ADC but not everything together.

I have a conflict in using timer. FreeRTOS clock is launch via nrf_drv_clock_init(). BLE uses app_timer functionnalities. And ADC needs a timer for ppi configuration. I don't understand how the differents timers can coexist. On the differents example I found in github, there is no config with all these constants defined :

#define CLOCK_ENABLED  //Used for FreeRTOS clock
#define TIMER_ENABLED   //Used to enabled Timer 0
#define TIMER3_ENABLED //Timer used for adc (via ppi)

Is anyone has an example. It could help me to understand my misunderstanding of the way it works.

Parents
  • With debugger, I've no error return on nrf function. It's at the moment to launch schedule task in FreeRTOS that vPortStartFirstTask( void ) that a signal handler appeared which reset the board and re-init the app. I'm not able to give more details about what append next. My debbugger doesn't provide more details. The BLE API is not called because the code is in a freertos task.

    If i tried to call directly ble_function, an error appeared in the function softdevice_handler_init() when sd_softdevice_enable() is called. The error is 4097. I didn't found any trace of this error. Do you know where it came from?

Reply
  • With debugger, I've no error return on nrf function. It's at the moment to launch schedule task in FreeRTOS that vPortStartFirstTask( void ) that a signal handler appeared which reset the board and re-init the app. I'm not able to give more details about what append next. My debbugger doesn't provide more details. The BLE API is not called because the code is in a freertos task.

    If i tried to call directly ble_function, an error appeared in the function softdevice_handler_init() when sd_softdevice_enable() is called. The error is 4097. I didn't found any trace of this error. Do you know where it came from?

Children
No Data
Related