Why the method of the firmware can't step in while there is no error and warning in compiling.

Hello dear all. I am compiling a firmware to merge the timer function into the nrf52-ble-app-uart-c-multilink firmware. The timer function is copied from ble_app_uart__saadc_timer_driven__scan_mode which in Github https://github.com/NordicPlayground/nRF52-ADC-examples/tree/master/ble_app_uart__saadc_timer_driven__scan_mode

The nrf52-ble-app-uart-c-multilink firmware is also from Github NordicPlayground https://github.com/NordicPlayground/nrf52-ble-app-uart-c-multilink.

I wanna to set up a BLE network with one central and multiple peripherals based on NUS. I need timer in the central to transfer data with every peripheral individually. But after I add code for timer into the nrf52-ble-app-uart-c-multilink, the timer doesn't work normally. There is no error and warning in compiling, but the "nrf_drv_timer_extended_compare" function cannot be step into. When debug the firmware, the function is skipped. What cause the problem? Any help will be appreciated. 

  • Hi 

    I would strongly suggest using an app_timer callback for this, rather than a dedicated TIMER module. 

    The app_timer is based on one of the RTC modules, but allows you to register multiple timers easily, and is considerably lower power than running a dedicated timer module. 

    They are also easier to configure, as you only need three parts. One line to define a new app_timer module, one line of code to create (init) it, and one line of code to start a new timer. 

    For more details please have a look at the documentation, here.

    Best regards
    Torbjørn 

Related