RTI

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.

Features Supported

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

There are 7 RTI Modules in the device – 1 in the MCU domain and 5 in the Main domain and 1 in wakup domain.

Instances in MCU domain:

  1. MCU_RTI0

Instances in Main domain:

  1. RTI0

  2. RTI1

  3. RTI2

  4. RTI3

  5. RTI4

Instances in WKUP domain:

  1. WKUP_RTI0

SysConfig Features

  • None

Features NOT Supported

  • None

Important Usage Guidelines

  • None

Example Usage

The following shows an example of SDL RTI API.

Include the below file to access the APIs

#include <sdl/sdl_rti.h>

Config an RTI Instance SDL_RTI_configParms pConfig;

/* Configure RTI parameters for preload, window and reaction*/ pConfig.SDL_RTI_dwwdPreloadVal = RTIGetPreloadValue(RTI_CLOCK_SOURCE_200KHZ, RTI_WDT_TIMEOUT); pConfig.SDL_RTI_dwwdWindowSize = RTI_DWWD_WINDOWSIZE_100_PERCENT; pConfig.SDL_RTI_dwwdReaction = RTI_DWWD_REACTION_GENERATE_NMI;

#if defined (M4F_CORE) retVal = SDL_RTI_config(SDL_INSTANCE_MCU_RTI0_CFG, &pConfig); #endif #if defined (R5F_CORE) retVal = SDL_RTI_config(SDL_INSTANCE_WKUP_RTI0, &pConfig); #endif

if (retVal == SDL_EFAIL) { UART_printf(“Error during Window configuration.\n”); }

Verify the config /* Verify the config */ #if defined (M4F_CORE) retVal = SDL_RTI_verifyConfig(SDL_INSTANCE_MCU_RTI0_CFG, &pConfig); #endif #if defined (R5F_CORE) retVal = SDL_RTI_verifyConfig(SDL_INSTANCE_WKUP_RTI0, &pConfig); #endif

if (retVal == SDL_EFAIL) { UART_printf(“Error during Window Verify configuration.\n”); }

Read the static registers SDL_RTI_staticRegs pStaticRegs;

#if defined (M4F_CORE) retVal = SDL_RTI_readStaticRegs(SDL_INSTANCE_MCU_RTI0_CFG, &pStaticRegs); #endif #if defined (R5F_CORE) retVal = SDL_RTI_readStaticRegs(SDL_INSTANCE_WKUP_RTI0, &pStaticRegs); #endif

Start an RTI Instance #if defined (M4F_CORE) SDL_RTI_start(SDL_INSTANCE_MCU_RTI0_CFG); #endif #if defined (R5F_CORE) SDL_RTI_start(SDL_INSTANCE_WKUP_RTI0); #endif

Start an RTI Instance /* Servicing of the watchdog is done by the core that is being monitored with the watchdg */ #if defined (M4F_CORE) SDL_RTI_service(SDL_INSTANCE_MCU_RTI0_CFG); #endif #if defined (R5F_CORE) SDL_RTI_service(SDL_INSTANCE_WKUP_RTI0); #endif

API Reference

Functions

int32_t SDL_RTI_config(SDL_RTI_InstanceType InstanceType, const SDL_RTI_configParms *pConfig)

RTI configuration API. This API configures the specified RTI instance using the provided configuration.

Parameters:
  • InstanceType – RTI Instance

  • pConfig – Pointer to the configuration structure

Returns:

SDL_PASS for Success. SDL Error Code for failure.

int32_t SDL_RTI_verifyConfig(SDL_RTI_InstanceType InstanceType, SDL_RTI_configParms *pConfig)

RTI API to verify the written configuration. This API can be used after calling SDL_RTI_config in order to verify the configuration. It reads back the configuration from the registers and compares it with the provided configuration.

Parameters:
  • InstanceType – RTI Instance

  • pConfig – Pointer to the configuration structure

Returns:

SDL_PASS if verification passed. SDL Error Code for failure.

int32_t SDL_RTI_start(SDL_RTI_InstanceType InstanceType)

Enable the RTI instance.

Note

Should be called after configuration of the RTI

Parameters:

InstanceType – RTI Instance

Returns:

SDL_PASS if success. SDL Error Code for failure.

int32_t SDL_RTI_service(SDL_RTI_InstanceType InstanceType)

Service the RTI instance.

Parameters:

InstanceType – RTI Instance

Returns:

SDL_PASS if success. SDL Error Code for failure.

int32_t SDL_RTI_clearStatus(SDL_RTI_InstanceType InstanceType, uint32_t status)

Clear the DWWD status.

Parameters:
  • InstanceType – RTI Instance

  • status – Violation status to clear. Values given by bitwise or of macro RTI_Status_t

Returns:

SDL_PASS if success. SDL Error Code for failure.

int32_t SDL_RTI_getStatus(SDL_RTI_InstanceType InstanceType, uint32_t *pStatus)

Clear the DWWD status.

Parameters:
  • InstanceType – RTI Instance

  • pStatus – pointer to DWWD status. Refer macro RTI_Status_t for possible bitwise or of all return values.

Returns:

SDL_PASS if success. SDL Error Code for failure.

int32_t SDL_RTI_readStaticRegs(SDL_RTI_InstanceType InstanceType, SDL_RTI_staticRegs *pStaticRegs)

This API returns the static registers for RTI-DWWD.

Parameters:
  • InstanceType – Base Address of the RTI instance.

  • pStaticRegs – Pointer to RTI DWWD Static Registers.

Returns:

SDL_PASS if success. SDL Error Code for failure.