This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TM4C123GH6PM: how to export a clock signal synched to Precision Internal Oscillator?

Other Parts Discussed in Thread: TM4C123GH6PM

On Tiva C (LaunchPad with TM4C123GH6PM), is it possible to obtain on an external pin a clock signal that is synchronized to (i.e. a divided version of) the clock generated by the Precision Internal Oscillator when the latter is not selected as the System Clock?

For example, "exporting" the system clock to a pin seems to be possible by configuring a PWM output from a general-purpose timer. But system clock is subject to change across deep sleep transitions.

The broader question: is it possible to export a clock signal that (a) can be used as the source for (any kind of a) timer, and (b) does not change across deep sleep transitions? A clock signal (the only one?) that fulfils both (a) and (b) is the Precision Internal Oscillator clock. It fulfils (a) since it can be set at the source for the SysTick timer and (b) since it can be configured to remain on during deep sleep. But can PI be exported via a pin?

Things attempted:
(1) abuse SSIClk. SSIClk can be tied to PI and is visible on an external pin (if transfer is continuous, i.e. tx fifo is never empty), so it does the job, except that the core needs to continuously create transmissions and thus cannot go to sleep, which is a show-stopper.
(2) use Main Oscillator only which is accessible at the crystal pins: does not fulfil (a) -- cannot clock any timer directly from it (not via System Clock) as far as I could find.

  • Alexei Colin said:
    is it possible to obtain on an external pin a clock signal that is synchronized to (i.e. a divided version of) the clock generated by the Precision Internal Oscillator when the latter is not selected as the System Clock?

     Your request is not so clear on what your clock use...

     Why not generating clock from an OCXO oscillator then feed it to processor instead?

     Too many details are missing to try help or answer to this question, please provide more details on what you wish to do.

  • Roberto Romano said:

    Why not generating clock from an OCXO oscillator then feed it to processor instead?

    That is item (2) in things attempted. I eliminated this approach since I could not get requirement (a) fulfilled: I could not find a timer which I could clock with the external oscillator input directly (not via System Clock). I cannot use System Clock to clock a timer because the System Clock changes its rate across deep sleep transitions, which means the timer ticks at different rates depending on which mode the processor is in.

    Thank you for replying. I am not sure what *relevant* details are missing. Here is an attempt to rephrase the question: is it possible to route the clock signal generated by Precision Internal Oscillator or a derivative thereof to a pin so that it can be used to clock other parts of the circuit that need to be synchronized to Precision Internal Osc.

  • Alexei Colin said:
    Thank you for replying. I am not sure what *relevant* details are missing. Here is an attempt to rephrase the question: is it possible to route the clock signal generated by Precision Internal Oscillator or a derivative thereof to a pin so that it can be used to clock other parts of the circuit that need to be synchronized to Precision Internal Osc.

     Alexei, I suppose when processor is in deep sleep mode also peripheral are in deep sleep otherwise they draw a relevant amount of power. By the way RTC and low frequency oscillator are active to wake up processor from deep sleep, this way you can save power when processor is not in use just keeping real time clock and alarm.


     Why you need have timers active on deep sleep? Timer are high frequency peripheral and draw power I am not using sleep on TIVA, I use extensively on MSP series to save power wake up few clock cycles then sleep again but timer also on this low power device are active just in simple sleep on deep sleep all but low power clock is dormant to save energy.

     What are your goal can help understand how to help you.

  • Hello Alexei

    Not on the TM4C123 devices. This feature is only available on the TM4C129 devices.

    Regards

    Amit

  • Alexei Colin said:
    ...is it possible to obtain on an external pin a clock signal that is synchronized to (i.e. a divided version of) the clock generated by the Precision Internal Oscillator when the latter is not selected as the System Clock?

    @ Amit,

    Poster's language is (I believe) quite good - quite specific - quite crafted.

    Response limited to, "this feature is available" does not (fully) convey the satisfaction of his complex question - imho...  (poster will judge - but appears a better response would attempt some illustration of technique/method to satisfy poster's goal - which appears to rise (beyond) a simple "feature"...)

    And - as a past marketing guy @ semi-firm - would not the listing of the, "how, where, why" the 129 "may succeed" - where the 123 "may not" - prove of much interest (and value) to many here - thus furthering 129 Sales?  (i.e. a "proper" answer kills "two birds - single stone"...imho)

    [edit 13:29 CST]  Note (now) that poster has, "filled in the blanks" - listing the 129's, "Precision Internal Osc." as able to clock the timers - along w/enhanced command/control of those timers.  Poster clearly "knows/appreciates" such - yet many here may not - and this expanded clarification may prove useful...  (Poster's opening listing of his requirement is far removed (spacially) from his (and your) response - all (now) brought together - here...)

  • Roberto, agreed with your comments about energy consumption. I should have said that what I am doing would not end up in a deployed application: I'm studying the sleep state transitions themselves. Hence, the need for a "universal" time reference that keeps ticking at same rate all the time -- the energy overhead this incurs is acceptable in my case.

    Amit, thanks for the pointer to TM4C129. Indeed, the GP timers can be clocked from PI there. And, the clock tree is much more flexible. Time to move to one of those.

  • @ Alexi,

    Believe yours to be among, "best ever detailed, precise, crafted posts" - very well done.  And you followed with equal clarity in response to Roberto's concern.

    Your most recent post - and mine - (minutes separated) "crossed" and I restated your objective - and then tried to weave the answer so that your issue - and its resolution - reside in one place...