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

Can I use nRF51822 to generate system time ?

Hey guys,

  1. I need to record many time interval ?, can i generate system time and use it to record all of my time intervals?
  2. If I want to send all of the time intervals to App via BLE, how could I do ?

Best regards,

Billy

Parents
  • You can implement your own system time by starting TIMER1/TIMER2 or RTC1 when the system starts. Using RTC1 might be good selection but it will have a overflow every 582 hours if you use the prescaler of (2^12 -1).

    If you use TIMER1 or TIMER2 then those will keep HFCLK enabled in sleep modes making your power go up.

    1. there is no system time function in SDK or C library that uses nrf clocks. You have to implement your own

    2. use one of examples like ble_app_hrs and use that service to send your tailored data to APP. There are many tutorials/blogs and documentation in devzone to give you a kickstart.

  • You cannot use Timer0 as it is used by softdevice. Check the softdevice specifications to see what peripherals are reserved by it and hence cannot be used application. You can also only use IRQ priority 1 and 3 (APP_PRIORITY_HIGH and APP_PRIORITY_LOW) with the timers when softdevice is enabled. There is another way to use highest priority if you use TimeSlot API.

Reply Children
No Data
Related