hi everyone:
my english is so bad,i have a problem,
my program has been stuck in there,is it right crystal no vibration,the /hib pin floating influential? the capacitor is 22pf
thanks.
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.
hi everyone:
my english is so bad,i have a problem,
my program has been stuck in there,is it right crystal no vibration,the /hib pin floating influential? the capacitor is 22pf
thanks.
Hello Yuan,
That is correct. If the crystal is not mounted the use of external clock will cause the function to hang.
If the accuracy is not the problem, then you can use the internal hibernate oscillator as the clock source.
HibernateClockConfig(HIBERNATE_OSC_LFIOSC);
Regards
Amit
void init_RTC(void)
{
uint32_t g_ui32SysClock, ui32Len;
//
// Enable the hibernate module.
//
g_ui32SysClock = MAP_SysCtlClockFreqSet((SYSCTL_XTAL_25MHZ | SYSCTL_OSC_MAIN | SYSCTL_USE_PLL | SYSCTL_CFG_VCO_480), 120000000);
SysCtlPeripheralEnable(SYSCTL_PERIPH_HIBERNATE);
HibernateEnableExpClk(g_ui32SysClock);
//
// If the wake was not due to the above sources, then it was a system
// reset.
//
HibernateClockConfig(HIBERNATE_OSC_LOWDRIVE);
//
// Enable RTC mode.
//
HibernateRTCEnable();
//
// Configure the hibernate module counter to 24-hour calendar mode.
//
HibernateCounterMode(HIBERNATE_COUNTER_24HR);
IntMasterEnable();
init_setTime();
}
Hello Yuan,
It should be as follow if external crystal is not provided
g_ui32SysClock = MAP_SysCtlClockFreqSet((SYSCTL_XTAL_25MHZ | SYSCTL_OSC_MAIN | SYSCTL_USE_PLL | SYSCTL_CFG_VCO_480), 120000000);
SysCtlPeripheralEnable(SYSCTL_PERIPH_HIBERNATE);
HibernateClockConfig(HIBERNATE_OSC_LOWDRIVE);
HibernateEnableExpClk(g_ui32SysClock); // This is not required
...
Regards
Amit
hello Amit,
thanks,the accuracy is a problem,so i need the 32.768khz crystal,i want to know the /hib pin is a problem if it's floating
Hello Yuan,
If accuracy is the problem then you would need a 32768Hz crystal. Also please do make sure that you o through the TM4C129 System Design Guidelines for Crystal Selection and capacitor selection.
As for the /HIB pin, if it is not to be used in your design then you can keep it floating.
Regards
Amit
Hello Amit,
thanks for your patient,i don't how to do that,the capacitor we select 22pf,the data sheet is 12~ 24pf,so it't not a problem,the pins are fixed,neen't to set,so ....
Hello Yuan
Please go through the section 3.6.1.2 of the TM4C129 System Design Guidelines
http://www.ti.com/lit/an/spma056/spma056.pdf
The equations in this section along with the crystal selected (CL from the cyrstal spec) can be used to find if C1 and C2 values are correct or not.
Regards
Amit
Hello Yuan
Yes, the 22pF is correct by the equation for the above mentioned parameters.
Regards
Amit
Hello Amit,
now,i put the crystal replaced by oscillator,and can work normally,so I is it right ? can be considered oscillator problem?
now,i put the crystal replaced by oscillator,and can work normally,so I is it right ? can be considered crystal oscillator problem?
Hello Yuan
Yes, you can put the crystal now. Do make sure that
(a) The code is also updated to use the crystal and not the internal oscillator
(b) The capacitors are mounted as per the System Design Guidelines and routing guidelines adhered to before powering up the device.
Regards
Amit