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

timing information

Hi,

  • I am running Keil uVision V5.23.0.0, debugging a 51822 using the J-LINK / J-TRACE interface built into the chips
  • My code uses SD110, SDK 7.2
  • I need to get ABSOLUTE timing info on my product
  • Ideally, something simple like a time-stamp from the PC at the start of a routine and another one when the routine ends would be GREAT!
  • I have tried SEVERAL different things to get this info, including:
    • using a ULINK 2
      • It seems this is just the same as using the built-in J-LINK interface and doesn't provide any more info that the native debug interface
    • including a debugger init file that, when called from break points set at the proper addresses, prints the number of states
      • However, this always just prints out 0 states....
      • watching the variable "states" shows only a 0x00
    • using the "PA" command from the command window...
      • ALL accesses come back with 0 hits...
  • I have looked through thousands of postings about how Trace could help but it seems as if it only works with an nRF52 device, not the nRF51 that I am using
    • AND it needs a ULINKpro to go with it

Can anyone please tell me how I can get this info from the Keil interface please?

Thanks!

  • I just realized that I HAVE tried this already (done SO many things...)

    I found the following from Ole Morten on on one of the conversations (devzone.nordicsemi.com/.../rtc0-rtc1-and-the-app_timer-with-softdevice):

    It is correct that the softdevice itself only requires RTC0, but as you've seen, some of the SDK modules use RTC1, most notably app_timer, which is again used by the connection parameters module.

    It is perfectly possible to build an application without app_timer, but it will require some modifications to the SDK modules that uses it. You should however note that the connection parameters module isn't strictly required, since you can send connection parameter update requests manually by using the softdevice API directly. All modules using app_timer are optional, and you can just avoid using them. It is of course also an option to modify app_timer to cope with both your needs while still maintaining an API that the other modules can use. Exactly how to solve this is an application choice.

    There isn't any way to run different timers with different priorities with the current app_timer implementation.

  • Could you clarify the purpose for this timing information?

    Is this

     1)

    Some general time keeping mechanism (e.g hour:minute:second: 12:30:09,  date:06.03.2018) running on the nRF51 that the your application needs? If this is running on the SoC, without input from some external source PC/phone, then the clock accuracy will depend on the accuracy of the crystal you have on the board. I.e RTC running on the 32.768 kHz crystal oscillator on the DK, will have 20 ppm accuracy. If you are using the 32.768 kHz RC oscillator, you will have 250/500 ppm accuracy.

    OR 2)

    You just want timestamps on the PC, created on the PC, when the nRF51 calls certain functions?

    Then you could just send data over UART, and the PC could generate the timestamps when it received the message. In the terminal software Termite, this would look something liks this:

Related