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

RTC initialization with softdevice

I am building my application up on the ant_scalable_encrypted_tx example. I want to use RTC too, for that I took an example code off of the rtc example.

The problem is that I am getting 0x1001 error code (which stands for "Incorrect interrupt configuration") from softdevice_handler_init() if I initialize soft device after the nrf_drv_rtc_init().

Second case, when I initialize RTC later (which should be the case anyway since SD starts the clock), the code gets hung up at the nrf_drv_rtc_tick_enable() where the interrupt is being enabled (of course it does not happen when the enable_irq flag is not set).

So there is something up with the interrupts, one blocks another? the configuration file has the RTC priority set to low (value 3). SDK is version 11 alpha.

Thanks in advance!

Parents
  • RTC0 is protected peripheral for softdevice. You can use RTC1 instead. When you call softdevice_handler_init which inturn enables the softdevice, check is made if any protected peripherals are being configured. Error code that you mentioned is returned when softdevice finds that application is using protected peripherals.

    your second question, that seems like a hardfault, because the driver is trying to touch protected peripheral. Like I said, use RTC1 instead.

Reply
  • RTC0 is protected peripheral for softdevice. You can use RTC1 instead. When you call softdevice_handler_init which inturn enables the softdevice, check is made if any protected peripherals are being configured. Error code that you mentioned is returned when softdevice finds that application is using protected peripherals.

    your second question, that seems like a hardfault, because the driver is trying to touch protected peripheral. Like I said, use RTC1 instead.

Children
Related