mirror of https://github.com/ARMmbed/mbed-os.git
Added Teensy3.1 32KHz MCU loading capacitors.
External loading capacitors not fitted to the Teensy3.1 PCB, Added 20pF MCU loading capacitors for 32KHz crystal.pull/957/head
parent
e027a8e224
commit
2dfb1b743f
|
@ -31,7 +31,13 @@ void rtc_init(void) {
|
|||
init();
|
||||
|
||||
// Enable the oscillator
|
||||
#if defined (TARGET_K20D50M)
|
||||
RTC->CR |= RTC_CR_OSCE_MASK;
|
||||
#else
|
||||
// Teensy3.1 requires 20pF MCU loading capacitors for 32KHz RTC oscillator
|
||||
/* RTC->CR: SC2P=0,SC4P=1,SC8P=0,SC16P=1,CLKO=0,OSCE=1,UM=0,SUP=0,SPE=0,SWR=0 */
|
||||
RTC->CR |= RTC_CR_OSCE_MASK |RTC_CR_SC16P_MASK | RTC_CR_SC4P_MASK;
|
||||
#endif
|
||||
|
||||
//Configure the TSR. default value: 1
|
||||
RTC->TSR = 1;
|
||||
|
|
Loading…
Reference in New Issue