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

BLE Connect Events Cause Delays in App_Timer and PPI

I was using TIMER1 PPI and GPIOTE to setup a PWM signal on a GPIO line. This PWM will start and stop after 1 seconds. I used led.c to based my code. I was starting the Timer1 when the BLE_CONNECT_EVT came in but noticed that the PWM signal was locked up for about 4-5seconds before turning off. It worked fine if I trigger the PWM start on a button push, or system start-up. But if I used it at BLE_CONNECT_EVT, everything locks up. I re-tested with only using app_timers to blink and LED on the same CONNECT event, and same the thing happens. Since I use an app_timer to control both led and buzzer, the root cause may be app-timers. Has anyone encountered this?

Thanks guys

p.s. I'm not using the scheduler for any of my timers.

Parents
  • I got a response from Nordic that I thought I'd post here in case anyone else found this issue. Apparently this is recently discovered bug. This affects App Timers you wish to start/stop within close time proximity to BLE_CONNECT and BLE_DISCONNECT events. A work around is to use the scheduler to setup the start/stops of these app timers. This ensures that the proper functions run in the expected order. I have not had any problems since implementing this fix. Thanks as always for the great support Nordic!

Reply
  • I got a response from Nordic that I thought I'd post here in case anyone else found this issue. Apparently this is recently discovered bug. This affects App Timers you wish to start/stop within close time proximity to BLE_CONNECT and BLE_DISCONNECT events. A work around is to use the scheduler to setup the start/stops of these app timers. This ensures that the proper functions run in the expected order. I have not had any problems since implementing this fix. Thanks as always for the great support Nordic!

Children
No Data
Related