Exemple #1
0
/*
 *  ======== IpcMgr_ipcStartup ========
 *  Initialize MessageQ Transport stack built over RPMSG.
 *  This ends up calling RPMessage_init().
 *
 *  Use for stacks built on MessageQ/TransportRpmsg only.
 */
Void IpcMgr_ipcStartup(Void)
{
    UInt procId = MultiProc_getId("HOST");
    Int status;

    /* TransportRpmsgSetup will busy wait until host kicks ready to recv: */
    status = TransportRpmsgSetup_attach(procId, 0);
    Assert_isTrue(status >= 0, NULL);

    /* Sets up to communicate with host's NameServer: */
    status = NameServerRemoteRpmsg_attach(procId, 0);
    Assert_isTrue(status >= 0, NULL);

#ifdef IpcMgr_USEDEH
    /*
     * When using DEH, initialize the Watchdog timers if not already done
     * (i.e. late-attach)
     */
#ifdef IpcMgr_DSP
    Watchdog_init((Void (*)(Void))ti_sysbios_family_c64p_Exception_handler);
#elif IpcMgr_IPU
    Watchdog_init(ti_sysbios_family_arm_m3_Hwi_excHandlerAsm__I);
#endif
#endif
}
Exemple #2
0
/*
 *  ======== Deh_Module_startup ========
 *
 *  Uses SYS/BIOS Exception handler function for Hwi-based Watchdog ISR.
 *  This is used in order to cause the Watchdog expiration to appear like
 *  an exception, but since Exception_handler() is not called from the
 *  exception dispatcher (Hwi 1, NMI vector) the register and stack
 *  information that is printed is not valid (all zeroes for my runs).
 *  And we can't just plug the exception dispatcher into an Hwi, since it
 *  looks for an actual exception status and returns immediately (through
 *  NRP, which wasn't set for an Hwi) when no real exception is seen.
 */
Int Deh_Module_startup(Int phase)
{
#if defined(HAS_AMMU)
    if (AMMU_Module_startupDone() == TRUE) {
        Watchdog_init((Void (*)(Void))ti_sysbios_family_c64p_Exception_handler);
        return Startup_DONE;
    }

    return Startup_NOTDONE;
#else
    Watchdog_init((Void (*)(Void))ti_sysbios_family_c64p_Exception_handler);

    return Startup_DONE;
#endif
}
/*
 *  ======== EK_TM4C123GXL_initWatchdog ========
 *
 * NOTE: To use the other watchdog timer with base address WATCHDOG1_BASE,
 *       an additional function call may need be made to enable PIOSC. Enabling
 *       WDOG1 does not do this. Enabling another peripheral that uses PIOSC
 *       such as ADC0 or SSI0, however, will do so. Example:
 *
 *       SysCtlPeripheralEnable(SYSCTL_PERIPH_ADC0);
 *       SysCtlPeripheralEnable(SYSCTL_PERIPH_WDOG1);
 *
 *       See the following forum post for more information:
 *       http://e2e.ti.com/support/microcontrollers/stellaris_arm_cortex-m3_microcontroller/f/471/p/176487/654390.aspx#654390
 */
void EK_TM4C123GXL_initWatchdog(void) {
	/* Enable peripherals used by Watchdog */
	SysCtlPeripheralEnable(SYSCTL_PERIPH_WDOG0);

	/* Initialize the Watchdog driver */
	Watchdog_init();
}
/*
 *  ======== EKS_LM4F232_initWatchdog ========
 *
 * NOTE: To use the other watchdog timer with base address WATCHDOG1_BASE,
 *       an additional function call may need be made to enable PIOSC. Enabling
 *       WDOG1 does not do this. Enabling another peripheral that uses PIOSC
 *       such as ADC0 or SSI0, however, will do so. Example:
 *
 *       SysCtlPeripheralEnable(SYSCTL_PERIPH_ADC0);
 *       SysCtlPeripheralEnable(SYSCTL_PERIPH_WDOG1);
 *
 *       See the following forum post for more information:
 *       http://e2e.ti.com/support/microcontrollers/stellaris_arm_cortex-m3_microcontroller/f/471/p/176487/654390.aspx#654390
 */
Void EKS_LM4F232_initWatchdog()
{
    /* Enable peripherals used by Watchdog */
    SysCtlPeripheralEnable(SYSCTL_PERIPH_WDOG0);

    /* Initialize the Watchdog driver */
    Watchdog_init();
}
Exemple #5
0
/*
 *  ======== IpcMgr_rpmsgStartup ========
 *  Initialize the RPMSG module. This calls VirtQueue_startup().
 *
 *  Use for stacks built on RPMessage only.
 */
Void IpcMgr_rpmsgStartup(Void)
{
    Assert_isTrue(MultiProc_self() != MultiProc_getId("HOST"), NULL);
    RPMessage_init(MultiProc_getId("HOST"));

#ifdef IpcMgr_USEDEH
    /*
     * When using DEH, initialize the Watchdog timers if not already done
     * (i.e. late-attach)
     */
#ifdef IpcMgr_DSP
    Watchdog_init((Void (*)(Void))ti_sysbios_family_c64p_Exception_handler);
#elif IpcMgr_IPU
    Watchdog_init(ti_sysbios_family_arm_m3_Hwi_excHandlerAsm__I);
#endif
#endif
}
Exemple #6
0
/*
 *  ======== Deh_Module_startup ========
 */
Int Deh_Module_startup(Int phase)
{
    if (AMMU_Module_startupDone() == TRUE) {
        Watchdog_init(ti_sysbios_family_arm_m3_Hwi_excHandlerAsm__I);
        return Startup_DONE;
    }

    return Startup_NOTDONE;
}
Exemple #7
0
/*
 *  Entry point
 */
int main(void) {

    Watchdog_init();
    DBPRINT("Watchdog initialized.\n");

    while (1) {
        doWatchdog();

        #ifdef USE_XBEE
        Xbee_runSM();
        #endif
    }

    return (EXIT_SUCCESS);
}
/*
 *  ======== SENSORTAG_CC2650_initWatchdog ========
 */
Void SENSORTAG_CC2650_initWatchdog()
{
    /* Initialize the Watchdog driver */
    Watchdog_init();
}
/*
 *  ======== MSP_EXP430F5529LP_initWatchdog ========
 */
void MSP_EXP430F5529LP_initWatchdog(void)
{
    /* Initialize the Watchdog driver */
    Watchdog_init();
}
/*
 *  ======== MSP_EXP432P401R_initWatchdog ========
 */
void MSP_EXP432P401R_initWatchdog(void)
{
    /* Initialize the Watchdog driver */
    Watchdog_init();
}