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
  • Hi, The code you posted have nothing to do with BLE. Your initialization looks fine (fine in a way that it does not seem to conflict BLE) . Did you see if any of the function returned error here? When you apply above code , what do you mean by saying BLE does not work. Does it get stuck somewhere? I suggest you to start the debugger and run the program and stop to see where the execution is. I am guessing that BLE API is not called at all in this scenario because i do not see any hardware conflicts in your code snippet above.

Reply
  • Hi, The code you posted have nothing to do with BLE. Your initialization looks fine (fine in a way that it does not seem to conflict BLE) . Did you see if any of the function returned error here? When you apply above code , what do you mean by saying BLE does not work. Does it get stuck somewhere? I suggest you to start the debugger and run the program and stop to see where the execution is. I am guessing that BLE API is not called at all in this scenario because i do not see any hardware conflicts in your code snippet above.

Children
No Data
Related