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.

Trouble with 32-kHz oscillator on LM4F120H5QR



I have a problem with an 32-kHz oscillator (with external quartz). After start RTC (ROM_TimerRTCEnable(TIMER5_BASE)) I don't observe changing of timer value (I read value through ROM_TimerValueGet(TIMER5_BASE, TIMER_A)). If I looked at the osc pin of 32-kHz generator by oscilloscope I saw an absence of clock signal. Would I use some functions to start 32-kHz oscillator except my config (see below)?

ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER5);
ROM_TimerConfigure(TIMER5_BASE, TIMER_CFG_RTC);
ROM_TimerRTCEnable(TIMER5_BASE);

platform: Stellaris LM4F Launchpad, compiler IAR 6.50, latest version of Stellarisware.

 

  • Hi,

    How do you connect the external quartz? if connected to the dedicated pins, take into account these are for the hibernation module and have no connection with timer T5. To start it, you must enable the hibernation module - please read the chapter in the  user manual. 

    Note the hibernation module has a dedicated timer - maybe you do not want to use it, but instead to use only the oscillator - take care there is a dedicated output pin for 32 kHz, works only in particular conditions.

    Petrei 

  • Petrei, thanks a lot. I carefully re-read the datasheet and I have understood that I must apply an external 32-kHz source on CCP0 pin of my timer to provide a work in RTC mode instead of using hibernation module clock.

  • Dear Tankist,

    Could you provide your main source code?

    Best regards,

    Jo

  • I think it's not necessary to publish my source code because it very simple and not interesting). I made sure that it is impossible to use the internal 32-kHz oscillator as a  clock source for timers in RTC mode, and it was a main sence of the topic.

  • Hi Tankist,

    Which clocking source would you like to use in RTC mode?

    The internal 30-kHz oscillator oscillator provides an operational frequency of 30 kHz ± 50%. And it is intended for use during Deep-Sleep power-saving modes.

    So you need an external 32-kHz oscillator as real-time clock.

     Jo

  • Oh, I think I must close this topic. Answer I have already received some times ago).  But still sorry the clock 32 kHz not be used as to clock sources on timer - he begs for it.