Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Error: multiple definition of `RTC1_IRQHandler'

Hello there,

I am using the rtc2 in NRF52832 to interrupt at randomly generated time instances. Now, I am trying to integrate this functionality in a framework that uses the timers(1,2,3) and SoftDevice for BLE communication, but I am getting the following errors:

when I look for `RTC1_IRQHandler' in the project it appears defined in

Could you please help me to solve this issue?   

Thanks in advance.

Best wishes,

Dailys

Parents
  • Hi,

    RTC1 is not used by the SoftDevice (BLE stack), but it is used by the application timer which is used by virtually all SDK examples, and which you typically also want to use in your application. On the nRF52832 this leaves one RTC that can be used for other tasks.

    PS: The application timer allows you to create an arbitrary number of "soft" RTC timers based on RTC1, so without knowing what you need the RTC for it could be that you could simply use the app timer.

Reply
  • Hi,

    RTC1 is not used by the SoftDevice (BLE stack), but it is used by the application timer which is used by virtually all SDK examples, and which you typically also want to use in your application. On the nRF52832 this leaves one RTC that can be used for other tasks.

    PS: The application timer allows you to create an arbitrary number of "soft" RTC timers based on RTC1, so without knowing what you need the RTC for it could be that you could simply use the app timer.

Children
  • Hi Einar, 

    thanks for your answer. Since RTC0 and RTC1 are already used by the SoftDevice and the application timer( which are also included in the project), I was using RTC2 to avoid conflicts but i still have this error. 

    Is it possible to used nrfx_rtc drivers with the app_timer library and BLE? 

  • Hi,

    DAP said:
    Is it possible to used nrfx_rtc drivers with the app_timer library and BLE? 

    Yes, but then you must only enable the nRFX RTC driver for RTC2 (or rather not RTC0 nor RTC1). I do not know enough about your code but perhaps you have enabled NRFX_RTC1_ENABLED and/or RTC1_ENABLED in your sdk_config.h? (Then you would get nrfx_rtc_1_irq_handler which is maps to RTC1_IRQHandler).

Related