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.

Is there a way to check if an external clock is working before trying to use it?

We are working through high temperature issues.  We can reach a lock up condition and started to consider what happens when you switch to the external clock that may no longer be working.

Is there a way to check if an external clock is working before trying to use it?

This does not help when the clock stops working when you are already using it, but in the case when you power on and the external clock is not working is what we are considering.

  • Anecdotal at best - and not strictly a, "real answer" - but perhaps of some value.

    Using a competitor's M4 - and at times, somewhat, "beyond" upper temperature spec (btw - outside of our control) - we also had to, "power-up."  Like you - sometimes our MCU would, "fail to start" - and we were forced to develop, "some improved strategy."  Via extensive time in, "shake/bake" chamber we learned that starting up @ slowest speeds - and only then gradually increasing the MCU's speed - and then testing/confirming - could we achieve higher MCU speed. 

    Do note that lower MCU system clock speed most always (perhaps always) achieved successful, high temperature operation.  Further - not all MCU functional performance degraded at the same rate - or amount - based upon elevated temperature device operation.  As a general rule - it may make sense to employ higher MCU system clock speeds only as/when really needed!   (our tests were conducted upon 10 devices - across 2-3 date codes/batches)

    These MCUs did provide a mechanism to confirm the validity of our targeted external clock.  While uncertain about those here - do believe that a similar ability exists.  In our case - we employed some "indirection" to achieve the best confirmation of correct external clock behavior...

    Note a related (power) post today, http://e2e.ti.com/support/microcontrollers/tiva_arm/f/908/t/304061.aspx in which vendor's Sue Cozart describes ramifications imposed by system clock > 40MHz.

    Do applaud your sensitivity to such issues - prior to product, "release."

    Update: Over lunch - found/recalled that we employed an exernal, "clock monitor" circuit - fed via the external MCU clock pin's (low-Z output) - with the monitor's output "fed back" to the MCU.  (care required to not disturb the MCU-xtal osc. circuit)

    Note that (at least present w/in StellarisWare) there exist several clock and pll "verification" functions.  Strangely - many/most of these are said to support only the oldest/original, "Sandstorm-class" devices.  (i.e. LM3S: 6xx, 8xx,10x) 

  • cb1_mobile said:
    Note that (at least present w/in StellarisWare) there exist several clock and pll "verification" functions.  Strangely - many/most of these are said to support only the oldest/original, "Sandstorm-class" devices.  (i.e. LM3S: 6xx, 8xx,10x)

    I wrote code for this over a month ago using what appears to be a good reference to SysCtlMOSCVerificationSet.  It is declared in the header file.  It does not appear to be defined in the library.  The function is mentioned in a paragraph in the TivaWare under the general description of the SysCtl module, but has not hyperlinks to a section giving a full description.  I just got around to compiling it and get an unresolved symbol linker error.

    It looks like I can just set the CVAL and/or MOSCIM bits in the MOSCCTL myself using HWREG.

    But why has the function been left out of TivaWare?  It makes me wonder if the feature is being deprecated, especially considering your sandstorm class comment above.