- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Per this original thread that is now closed: Re: Pulse width measurement and time measurement
boont wrote:
This thread explained a little on the use of rtc_getRTCRawClock.
I didn't see any reference to this function in that thread... can anyone elaborate on the value returned by this function? Is the 48-bit clock counting ticks based on the 32kHz LPO (ie ~31us per tick)?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you configured and used an external 32K xtal (like the rtc_sample app does), then yes, RTC counts up this 32K rising edges. If you use the internal LPO instead (which is the default), then it counts the internal 128KHz LPO rising edges.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I was checking the API within the SDK and found the below:
void rtc_getRTCRawClock | ( | tRTC_REAL_TIME_CLOCK * | rtcClock | ) |
Reads current RTC value from hardware clock.
- Parameters
rtcClock Pointer to allocated RTC time structure into which the current time is to be copied into.
Is the above useful to you?
The requester in "Resetting RTC internal counter" has made some errors in his code, that's why.
What is the issue you are facing?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quite simply I'd like further clarification as to what is the hardware that generates this value read back from rtc_getRTCRawClock. Is it simply a 48-bit counter that increments every rising edge of the 32kHz clock?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
rtc_getRTCRawClock will read back the raw 48-bit clock although I'm not sure of the mechanics of it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you configured and used an external 32K xtal (like the rtc_sample app does), then yes, RTC counts up this 32K rising edges. If you use the internal LPO instead (which is the default), then it counts the internal 128KHz LPO rising edges.