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

nrf52832 rtc to timestamp

Hello,

I am using nRF52832 chip for freeRTOS project and using RTC2. I have SDK15.2. I want to have timestamp from RTC as hex format. I searched almost all forums but i have nothing.  I just found https://github.com/NordicPlayground/nrf5-calendar-example this example but i want to uptade automatically and don't want to update via bluetooth. Could you recommend me some examples or forum? 

Thanks

Parents
  • Hi

    Well, it seems like you have defined RTC2_IRQHandler multiple times in your project. Please find out which one you need for your project and remove the other one. What do you mean by "Then I change the header file, code just stop"? Where does it stop exactly, and how does it stop? Have you tried debugging to find out if you can see an error of some kind?

    Best regards,

    Simon

Reply
  • Hi

    Well, it seems like you have defined RTC2_IRQHandler multiple times in your project. Please find out which one you need for your project and remove the other one. What do you mean by "Then I change the header file, code just stop"? Where does it stop exactly, and how does it stop? Have you tried debugging to find out if you can see an error of some kind?

    Best regards,

    Simon

Children
  • Hi

    I deleted defined RTC2_IRQHandler in calendar header file and problem solved. 

    But code stops in this part :

    NRF_CLOCK->LFCLKSRC = CLOCK_LFCLKSRC_SRC_Xtal << CLOCK_LFCLKSRC_SRC_Pos;
    NRF_CLOCK->EVENTS_LFCLKSTARTED = 0;
    NRF_CLOCK->TASKS_LFCLKSTART = 1;

    When i comment here, code works but timestamp is false.

    I think its about hw. It does not have external clock. Is there any way to define internal clock?

    Best regards

Related