From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Driver Development Kit (DDK)

cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot get 6612 Interrupts to PC

Hello All,

 

I'm working on a WDM Driver for 6612 and I set the Counter armed but I cannot get Interrupts from the device.

We have written a driver for 6602 that works very well and I took from it the values for Load_A and Load_B registers for a 2 Hz Interrupt

I have tried also with other values but still it does not work.

 

Here is the sequence log from the DbgView

 

00000000 0.00000000 KSync6612__WDM: sl - Hello from DriverEntry 
00000001 0.02739051 sl - We are in KSync6602__WDMDev::OnStartDevice 
00000002 0.02739307 sl - WE are in KSync6602__WDMDev::GetBusAndSlot()  
00000003 0.02740975 KSync6612__WDM: sl - BusNumber  = 2 
00000004 0.02741103 KSync6612__WDM: sl - SlotNumber = 0 
00000005 0.02741200 KSync6612__WDM: sl - FuncNumber = 0 
00000006 0.02744279 KSync6612__WDM: sl - InitializeOneBarMemoryRanges() OK. 
00000007 0.02746332 KSync6612__WDM: sl - m_Irq.BusVector() = -1 
00000008 0.02746556 KSync6612__WDM: sl - m_Irq.Affinity()  = 15 
00000009 0.02746684 KSync6612__WDM: sl - m_Irq.BusLevel()  = -1 
00000010 0.02746812 KSync6612__WDM: sl - m_Irq.BusType()   = -1 
00000011 0.02746941 KSync6612__WDM: sl - m_Irq.Irql()      = 5 
00000012 0.02747037 KSync6612__WDM: sl - m_Irq.IsValid()   = 1 
00000013 0.02747165 KSync6612__WDM: sl - m_Irq.Mode()      = 0 
00000014 0.02747294 KSync6612__WDM: sl - m_Irq.Vector()    = 81 
00000030 0.02750886 KSync6612__WDM: sl - THE CHIP SIGNATURE = 0xc0107ad0 
00000031 0.02751239 KSync6612__WDM: sl - THE REVISION DATA  = 0x8050501 
00000032 0.02751431 KSync6612__WDM: sl - SELF-TEST ScratchPadRegister write value = 0x202 
00000033 0.02751784 KSync6612__WDM: sl - SELF-TEST ScratchPadRegister read value  = 0x202 
00000034 0.02751976 KSync6612__WDM: sl - SELF-TEST ScratchPadRegister write value = 4096 
00000035 0.02752329 KSync6612__WDM: sl - SELF-TEST ScratchPadRegister read value  = 4096 
00000037 0.02752874 KSync6612__WDM: sl - Reset and disarm the counter => G0_CommandRegister written with 0x4010 
00000039 0.02753388 KSync6612__WDM: sl - KCard_6612::SetInterruptMaskRegister with 0x80000a00 
00000040 0.02753740 KSync6612__WDM: sl - THE INTERRUPT_MASK_REG = 0x80000a00 
00000041 0.02753901 KSync6612__WDM: sl - KCard_6612::SetGlobalInterruptEnableRegister  with value = 0x4 
00000042 0.02754093 KSync6612__WDM: sl - KCard_6612::SetG0_Interrupt1Register          with value = 0x4800 
00000043 0.02754414 KSync6612__WDM: sl - THE INTERRUPT_STATUS_REG = 0x0 
00000044 0.02754735 KSync6612__WDM: sl - THE G0_STATUS_REG = 0x0 
00000045 0.02754895 KSync6612__WDM: sl - START TEST FOR ActivateCounterInterrupt  
00000046 0.02755023 KSync6612__WDM: --------------------------------------------  
00000047 0.02755280 KSync6612__WDM: sl - setGi_Reload_Source_Switching    => G0_ModeRegister         set value = 0x8000  // use alternate registers 
00000048 0.02755633 KSync6612__WDM: sl - setGi_Loading_On_Gate            => G0_ModeRegister         set value = 0x8000  // no counter reload on gate 
00000049 0.02755825 KSync6612__WDM: sl - setGi_ForceSourceEqualToTimebase => G0_ModeRegister         set value = 0x8000  // use TB3 (100MHz) 
00000050 0.02756018 KSync6612__WDM: sl - setGi_Loading_On_TC              => G0_ModeRegister         set value = 0x9000  // reload on TC 
00000051 0.02756210 KSync6612__WDM: sl - setGi_Output_Mode                => G0_ModeRegister         set value = 0x9100  // counter TC on Out 
00000052 0.02756370 KSync6612__WDM: sl - setGi_Load_Source_Select         => G0_ModeRegister         set value = 0x9180  // Load from B 
00000053 0.02756563 KSync6612__WDM: sl - setGi_Counting_Once              => G0_ModeRegister         set value = 0x9180  // No hardware disarm 
00000054 0.02756755 KSync6612__WDM: sl - setGi_Stop_Mode                  => G0_ModeRegister         set value = 0x91a0  // stop on Gate or first TC 
00000055 0.02756916 KSync6612__WDM: sl - setGi_Gating_Mode                => G0_ModeRegister         set value = 0x91a0  // Gating mode disabled 
00000056 0.02757108 KSync6612__WDM: sl - setGi_Up_Down                    => G0_Mode2Register        set value = 0x0     // count down 
00000057 0.02757269 KSync6612__WDM: sl - setGi_Bank_Switch_Enable         => G0_Mode2Register        set value = 0x1000  // set switch 
00000058 0.02757461 KSync6612__WDM: sl - setGi_Bank_Switch_Mode           => G0_Mode2Register        set value = 0x1400  // implicit 
00000059 0.02757653 KSync6612__WDM: sl - setGi_Prescale                   => G0_CountingModeRegister set value = 0x0     // no prescale 
00000060 0.02757846 KSync6612__WDM: sl - setGi_HW_Arm_Enable              => G0_CountingModeRegister set value = 0x0     // no HW_Arm_Enable 
00000061 0.02758006 KSync6612__WDM: sl - setGi_Index_Mode                 => G0_CountingModeRegister set value = 0x10    // OK for other mode than quadrature 
00000062 0.02758199 KSync6612__WDM: sl - setGi_Counting_Mode              => G0_CountingModeRegister set value = 0x10    // Default 
00000063 0.02758391 KSync6612__WDM: sl - setGi_SampleClockMode            => G0_SampleClockRegister  set value = 0x0     // Disabled 
00000064 0.02758551 KSync6612__WDM: sl - setGi_SampleClockMode            => G0_AuxCtrRegister       set value = 0x0     // no AuxCntr 
00000065 0.02758712 KSync6612__WDM: sl - G0_InputSelectRegister set value = 0x3c 
00000066 0.02758840 KSync6612__WDM: sl - G0_Load_A_Register value = 29999999 
00000067 0.02759000 KSync6612__WDM: sl - G0_Load_B_Register value = 9999999 
00000068 0.02759161 KSync6612__WDM: sl - setGi_Load                       => G0_CommandRegister      set value = 4 
00000069 0.02759321 KSync6612__WDM: sl - m_x_InterruptControl written with 0xff 
00000070 0.02759706 KSync6612__WDM: sl - THE G0_STATUS_REG = 0x0 
00000071 0.02760027 KSync6612__WDM: sl - m_x_InterruptStatus read value = 0x0 
00000072 0.02760187 KSync6612__WDM: sl - Arm the counter                  => G0_CommandRegister      set value = 0x1 
00000073 0.02760380 KSync6612__WDM: sl - CHECKING COUNTER ARMED BIT. BEFORE TIMESTAMP = 1585387274 
00000074 0.02760797 KSync6612__WDM: sl - CHECKING COUNTER ARMED BIT. AFTER TIMESTAMP  = 1585387278 
00000075 0.02761149 KSync6612__WDM: sl - THE G0_STATUS_REG = 0x100 
00000076 0.02761342 KSync6612__WDM: sl - THE COUNTER IS ARMED  
00000077 0.02768911 KSync6612__WDM: sl - m_pDev->Init succeeded  

 

Thanks in advance

 

0 Kudos
Message 1 of 1
(4,034 Views)