This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
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

Time from power on to connect with master / slave

Hello, I am new to nRF51822, and trying to make a simple application for master - slave data transfer. I want to know how Much time passes from the start of the device until the connection to the master \ slave.

What are possible solutions to this issue? Maybe measure the time until a breakpoint is reached in debug mode or use some api timer function?

P.S. sry for any mistakes, english isn't my native language

  • If I am understanding your question properly, you want to know how much time elapses from the time the slave starts running to when a master connects to it. One way to do it would be to start the Real Time Counter (RTC) when the slave initializes, set a breakpoint where a connection occurs and check the counter value in the RTC in the debugger.

    Even with no prescaler it takes 512 seconds for the COUNTER to roll over if I recall correctly. The only tricky thing would be if the RTC continues to run when a breakpoint is hit. In which case, stash the counter into a global variable and check that with the debugger instead.

Related