Driver Development Kit (DDK)

cancel
Showing results for 
Search instead for 
Did you mean: 

x-series and interrupts: how to debug?

Instead of continuously polling the AI DMA I'd like to use an interrupt. I checked the relevant parts in the X-Series DDK manual and applied the code:

 

  //interrupt when TTC reached
CHInCh.AI_DMAChannel.Channel_Total_Transfer_Count_Compare_Register_LSW.writeRegister( 32000 );
CHInCh.AI_DMAChannel.Channel_Control_Register.writeNotify_On_Total_Count( 1 );
CHInCh.AI_DMAChannel.Channel_Operation_Register.writeArm_Total_Count_Int( 1 );

  //interrupt when done
CHInCh.AI_DMAChannel.Channel_Control_Register.writeNotify_On_Done( 1 );

  //enable globally
CHInCh.Interrupt_Mask_Register.writeSet_CPU_Int( 1 );

 

but there are two problems:

- cannot get the Total Transfer Count interrupt to work

- the Stop interrupt does seem to work, but does not make it into the host

 

I'd like to get some input on how to debug situations like these (how to find out where exactly the problem lies), or better yet, a solution :]

 

For the first case, I checked the corresponding status register and that seems fine: CHInCh.AI_DMAChannel.Channel_Total_Transfer_Count_Status_Register_LSW.readTTCS_LSW() returns numbers much higher than 32000.

 

For the second one, I stop the transfer manually and check the result. CHInCh.Interrupt_Status_Register.readInt() and CHInCh.Interrupt_Status_Register.readDMA() return 1. Does this effectively mean there was an interrupt issued to the host? My handler does not get called, but it might be a host problem (I'm using InTime and MSI interrupts). Note that for all code, no errors are returned anywhere, and I tried this with two different PXI cards.

0 Kudos
Message 1 of 1
(5,815 Views)