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: 

bug fix for NI tCHInChDMAChannel code

 

ran into a hard-to-find bug in the x-series DDK, you guys might want to correct.

 

in the routine:

 

   void tCHInChDMAChannel::_config(nMDBG::tStatus2& status)

near the bottom of the routine is:

      _readIdx  = 0;

      _writeIdx = 0;

 

there is one more line you need in there:

 

      _lastwriteIdx = 0;

 

this doesn't cause a problem for any of the sample programs, since they only use tCHInChDMAChannel once and dispose of it.  however if you start() the channel for a second time without doing a reset (to avoid a buffer re-allocation), the object will incorrectly report the number of bytes available.

 

 

--spg


 

------------------
scott gillespie
applied brain, inc.
------------------
0 Kudos
Message 1 of 2
(6,120 Views)

Hello Scott,

 

Thanks for letting us know about this.  According to the comments in that file, we expected to be able to stop the dma channel and start it back up.

 

Steven T.

0 Kudos
Message 2 of 2
(6,113 Views)