Example #1
0
/*
** RTC configuration function
*/
static void RTCSetupAndEnable(void)
{
    /* Performing the System Clock configuration for RTC. */
    RTCModuleClkConfig();

    /* Disabling Write Protection for RTC registers.*/
    RTCWriteProtectDisable(SOC_RTC_0_REGS);

    /* Selecting Internal Clock source for RTC. */
    RTC32KClkSourceSelect(SOC_RTC_0_REGS, RTC_INTERNAL_CLK_SRC_SELECT);

    /* Enabling RTC to receive the Clock inputs. */
    RTC32KClkClockControl(SOC_RTC_0_REGS, RTC_32KCLK_ENABLE);

    /* Enable the RTC module. */
    RTCEnable(SOC_RTC_0_REGS);

    /* Dummy: Programming calendar information in the Calendar registers. */
    RTCCalendarSet(SOC_RTC_0_REGS, 0x29111000 | RTC_DOTW_MON);

    /* Dummy: Programming the time information in the Time registers. */
    RTCTimeSet(SOC_RTC_0_REGS, (0x08473100 | RTC_ANTE_MERIDIEM));

    /* Set the 32KHz counter to run. */
    RTCRun(SOC_RTC_0_REGS);

    /* Enabling RTC interrupts. Configuring RTC to interrupt every second.*/
    RTCIntTimerEnable(SOC_RTC_0_REGS, RTC_INT_EVERY_SECOND);

    /* Enabling the system interrupt in AINTC for RTC. */
    IntSystemEnable(SYS_INT_RTCINT);
}
Example #2
0
/*
** RTC configuration function
*/
static void RTCSetupAndEnable(void)
{
    /* Performing the System Clock configuration for RTC. */
    RTCModuleClkConfig();

    /* Disabling Write Protection for RTC registers.*/
    RTCWriteProtectDisable(RTC_INST_BASE);

    /* Selecting Internal Clock source for RTC. */
    RTC32KClkSourceSelect(RTC_INST_BASE, RTC_INTERNAL_CLK_SRC_SELECT);

    /* Enabling RTC to receive the Clock inputs. */
    RTC32KClkClockControl(RTC_INST_BASE, RTC_32KCLK_ENABLE);

    /* Enable the RTC module. */
    RTCEnable(RTC_INST_BASE);

    /* Dummy: Programming calendar information in the Calendar registers. */
    RTCCalendarSet(RTC_INST_BASE, RTC_CAL_VAL_DUMMY);

    /* Dummy: Programming the time information in the Time registers. */
    RTCTimeSet(RTC_INST_BASE, RTC_TIME_VAL_DUMMY);

    /* Set the 32KHz counter to run. */
    RTCRun(RTC_INST_BASE);

    /* Enabling RTC interrupts. Configuring RTC to interrupt every second.*/
    RTCIntTimerEnable(RTC_INST_BASE, RTC_INT_EVERY_SECOND);

    /* Enabling the system interrupt in AINTC for RTC. */
    IntSystemEnable(RTC_INT_NUM);
}
Example #3
0
/*
** Enable all the peripherals in use
*/
static void PeripheralsSetUp(void)
{
    DMTimer2ModuleClkConfig();
    DMTimer3ModuleClkConfig();
    DMTimer4ModuleClkConfig();
    RTCModuleClkConfig();
    CPSWPinMuxSetup();
    CPSWClkEnable();
    EDMAModuleClkConfig();
    GPIO1ModuleClkConfig();
    GPIO1Pin23PinMuxSetup();
    HSMMCSDPinMuxSetup();
    HSMMCSDModuleClkConfig();
}
Example #4
0
/*
** Enable all the peripherals in use
*/
static void PeripheralsSetUp(void)
{
    enableModuleClock(CLK_UART0);
    enableModuleClock(CLK_I2C0);
    /* Timer6 is used for Standby wakeup */
    enableModuleClock(CLK_TIMER6);
    GPIO0ModuleClkConfig();
    DMTimer2ModuleClkConfig();
    DMTimer3ModuleClkConfig();
    DMTimer4ModuleClkConfig();
    RTCModuleClkConfig();
    CPSWPinMuxSetup();
    CPSWClkEnable();
    EDMAModuleClkConfig();
    GPIO1ModuleClkConfig();
    GPIO1Pin23PinMuxSetup();
    HSMMCSDPinMuxSetup();
    HSMMCSDModuleClkConfig();
    I2CPinMuxSetup(0);
}