2.6. RTI : RTI/WWDT Windowed Watchdog Timer¶
2.6.1. Introduction¶
The Windowed Watchdog Timer (WWDT) generates reset after a programmable period, if not serviced within that period. This time-out boundary is configurable, and the windowed feature allows the start time boundary to be configurable. The WWDT can generate an Interrupt, if not serviced within window (Open Window) defined by start time and time-out boundary. Also the WWDT can generate an Interrupt if serviced outside Open Window (within Closed Window). Generation of Interrupt depends on the WWDT Reaction configuration. SDL supports configuration of the watchdog timers. It also supports notification of the error via ESM interrupt. Additionally, APIs for checking the status of the watchdog timer is provided.
The module provides the following functionality
Ability to to initialize the RTI -DWWD module
Ability to configure RTI -DWWD module
Ability to service an RTI instance
Ability to read Status of the configuration
Ability to read back static register
2.6.2. Example Usage¶
The following shows an example of SDL RTI API usage by the application to set up the RTI as a watchdog and usage of the various APIs. Events can be monitored by enabling the events in the associated ESM instance.
Config an RTI Instance
SDL_RTI_configParms pConfig; /* Configure RTI parameters for preload, window and reaction*/ pConfig.SDL_RTI_dwwdPreloadVal = RTIGetPreloadValue(RTI_CLOCK_SOURCE_32KHZ, RTI_WDT_TIMEOUT); pConfig.SDL_RTI_dwwdWindowSize = RTI_DWWD_WINDOWSIZE_100_PERCENT; pConfig.SDL_RTI_dwwdReaction = RTI_DWWD_REACTION_GENERATE_NMI; retVal = SDL_RTI_config(SDL_INSTANCE_MCU_RTI0_CFG, &pConfig); if (retVal == SDL_EFAIL) { UART_printf("Error during Window configuration.\n"); }
Verify the config
/* Verify the config */ retVal = SDL_RTI_verifyConfig(SDL_INSTANCE_MCU_RTI0_CFG, &pConfig); if (retVal == SDL_EFAIL) { UART_printf("Error during Window Verify configuration.\n"); }
Read the static registers
SDL_RTI_staticRegs pStaticRegs; retVal = SDL_RTI_readStaticRegs(SDL_INSTANCE_MCU_RTI0_CFG, &pStaticRegs);
Start an RTI Instance
SDL_RTI_start(SDL_INSTANCE_MCU_RTI0_CFG);
Service an RTI Instance
/* Servicing of the watchdog is done by the core that is being monitored with the watchdg */ SDL_RTI_service(SDL_INSTANCE_MCU_RTI0_CFG);
2.6.3. Examples¶
Test apps that are meant for verifying the functionality of the module are also provided.
Test App Name |
Description |
Location |
Build Command |
---|---|---|---|
rti_func_test_app |
|
[sdl_install_dir]/test/rti/rti_func |
make rti_func_test_app PROFILE=release |