none
Freeze due to timer in KMDF RRS feed

  • Question

  • WDF_TIMER_CONFIG_INIT(&stTimerConfig,Interval_timer_function);

    WDF_OBJECT_ATTRIBUTES_INIT(&stTimerAttributes);

    stTimerAttributes.ParentObject = hDevice;

    //create timer object
    lStatus = WdfTimerCreate(&stTimerConfig,
    &stTimerAttributes,
    &pstDeviceContext->hReadTotalTimer
    );

    //In IoRead 

    WdfTimerStart(pstDeviceContext->hReadIntervalTimer,WDF_REL_TIMEOUT_IN_MS(pstRequestContext->stRequestIntervalTime.QuadPart));

      Function

    //In Interval_timer_function

    WdfTimerStop(hTimer,FALSE);
    WdfTimerStart(hTimer,WDF_REL_TIMEOUT_IN_MS(pstRequestContext->stRequestIntervalTime.QuadPart));

    System freezes when it runs


    vidyasagar196

    Thursday, August 14, 2014 4:24 PM

Answers

  • what type of synchronization scope and execution level did you specify when you created the WDFDEVICE? stopping the timer from within the timer doesn't make sense. if you want the timer to repeat, create a periodic timer.

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Thursday, August 14, 2014 5:10 PM

All replies

  • what type of synchronization scope and execution level did you specify when you created the WDFDEVICE? stopping the timer from within the timer doesn't make sense. if you want the timer to repeat, create a periodic timer.

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Thursday, August 14, 2014 5:10 PM
  • I am assigning default scope and default execution level.

    I need to periodic time to be set in request based on User timeouts from application.

    If I create timers in request with 

    parent = request;

    scope = queue;

    execution level =DPC; //Default

    driver is crashing.



    vidyasagar196

    Thursday, August 14, 2014 5:21 PM