Hi
thank you very much for having answered
..sorry for the late reply but have been sick lasts days
yes, the reason I wanted to refresh WDog inside ISR was that 256 clk cycle before RESET are a bit too few ..i would like to: SAVE a simple error log like WDogError@CurrentTime (to flash so non volatile)
btw, the real problem now is according to me ISR does not execute
..so this is my code related to the WDog (Processor Expert):
********start**********
PE_ISR(WDog1_Interrupt)
{
/* {Default RTOS Adapter} ISR parameter is passed through the global variable */
WDog1_TDeviceDataPtr DeviceDataPrv = INT_Watchdog__DEFAULT_RTOS_ISRPARAM;
WDog1_OnWatchDog(DeviceDataPrv->UserDataPtr); /* Invoke OnWatchDog event */
WDOG_PDD_ClearInterruptFlag(WDOG_BASE_PTR); /* Clear interrupt flag */
}
void WDog1_OnWatchDog(LDD_TUserData *UserDataPtr)
{
//save error report on flash
//eg: WDog timeout @ curretnTime()
faultLog_t faultLog_temp;
faultLog_temp.faultType = WDOG_TIMEOUT;
faultLog_temp.faulTime.secondInDay = 66;//casual
faultLog_temp.faulTime.daySince2000 = 77;//casual
nvm_flashLog_t *LogPtr = (nvm_flashLog_t *) nvm_data_startAddr;
IFsh1_TAddress ptr = (IFsh1_TAddress) &(LogPtr->faultLog[1]);
IFsh1_SetBlockFlash((IFsh1_TDataAddress) &faultLog_temp,(IFsh1_TAddress) ptr, sizeof(faultLog_t));
}
********end***********
PS: if i call WDog1_OnWatchDog() for test the ISR it does write what I want.
..what's wrong? Am I forgetting something?
..does it require more than 256 clk cycle?
thank you to all...