Quantcast
Channel:
Viewing all articles
Browse latest Browse all 59170

Forum Post: Required Support on WDG driver

$
0
0
Hello, We are using RH850-F1x (R7F7010403 -64pin) for our Autosar project. We have requirements to configure WDG driver. The WDG driver is configured tried testing with below test application but it is NOT working. Could please review the attached WDG configuration and below Test application and suggest us if any changes required?   Test application:     static void Wdg_Test ( void ) {                 uint8 GucTestIndex = 0;                 /* Variable to store the test result */                 volatile uint8 GaaTestResult;                   Std_VersionInfoType Lddversioninfo;                 uint16 usLoopCnt;                                 osSetINTBP ((uint32)IRQ_TABLE_START);                                 /* A loop to avoid the controller going into a free-running mode */                 for (usLoopCnt = 0; usLoopCnt 5000; usLoopCnt++)                 {                                 __asm("nop");                 }                 /* CPU core and PLL clock initializing */                 /* Initialise MCU Driver */                 Mcu_Init ( Mcu_GstConfiguration );                 /* Set the CPU Clock to the PLL */                 ( void ) Mcu_InitClock ( McuConf_McuClockSettingConfig_McuClockSettingConfig );                 /* Wait until the PLL is locked */                 while ( Mcu_GetPllStatus () != MCU_PLL_LOCKED );                 /* Activate the PLL Clock */                 Mcu_DistributePllClock ();                   Port_Init ( Port_GstConfiguration );                 ENABLE_INTERRUPT();                   /* To check RESF register for WDT reset*/    GucTestIndex = (APP_WDG_RESF & APP_WDG_RESF_BIT_POS);                   switch (GucTestIndex)     {       /* To test DriverA instance */       case WDG_DRIVERA_INSTANCE:         /* To get the version of the Watchdog Driver */       Wdg_59_DriverA_GetVersionInfo(&Lddversioninfo);       if ((Lddversioninfo.vendorID == WDG_59_DRIVERA_VENDOR_ID) &&        (Lddversioninfo.moduleID == WDG_59_DRIVERA_MODULE_ID) &&        (Lddversioninfo.sw_minor_version == WDG_59_DRIVERA_SW_MINOR_VERSION) &&        (Lddversioninfo.sw_patch_version == WDG_59_DRIVERA_SW_PATCH_VERSION))       {         /* Initialization of Watchdog Driver */         Wdg_59_DriverA_Init(&Wdg_59_DriverA_GstConfiguration);         /* This macro enables the interrupt vector table mode */         WDG_59_DRIVERA_ENB_INTVECTAB_MODE;           /* Invoke SetMode function */         Wdg_59_DriverA_SetMode(WDGIF_SLOW_MODE);             /* Functionality related to R4.0 */         /* Sets the timeout value for the trigger counter */         Wdg_59_DriverA_SetTriggerCondition(0xff);           while (1);       }       else       {         GaaTestResult = 1;       }       break;         default:       break;   } }       Best regards Kiran

Viewing all articles
Browse latest Browse all 59170

Trending Articles