diff --git a/src/include/drv/iop_adc_functions.c b/src/include/drv/iop_adc_functions.c index e52091526801ebe50ca641876cff90f4fd906b03..e1ec814a05e5fea78a2c60b4b285f27e6f98abc1 100644 --- a/src/include/drv/iop_adc_functions.c +++ b/src/include/drv/iop_adc_functions.c @@ -443,7 +443,7 @@ iop_adc_read( adcInfo_t* adcinfo, int cpuClk[] ) *packedData = DUMMY_ADC_VAL; if ( first_adc_read ) { - plx9056_adc_dma_setup(card, + plx9056_adc_dma_set_size(card, cdsPciModules.adcChannels[ card ] * UNDERSAMPLE * 4 ); } plx9056_adc_dma_start( card ); diff --git a/src/include/drv/plx_9056.c b/src/include/drv/plx_9056.c index e5e92ea6185680ad24672913336953ddca52a4ec..0e3c648fb623e1d24b30de7c8c32fa5b09ec35b1 100644 --- a/src/include/drv/plx_9056.c +++ b/src/include/drv/plx_9056.c @@ -81,6 +81,17 @@ plx9056_adc_dma_setup( int module, int dma_bytes ) adcDma[ module ]->DMA0_DESC = PLX_DMA_TO_PCI; } +// ***************************************************************************** +/// \brief Function changes the DMA size of an existing DMA setup +/// called between cycle 1 and cycle 2 for fast ADCs +/// @param[in] module ID of ADC board +/// @param[in] new size for the DMA xfer in number of bytes +void +plx9056_adc_dma_set_size( int module, int dma_bytes ) +{ + adcDma[ module ]->DMA0_BTC = dma_bytes; +} + // ***************************************************************************** /// \brief Function sets up starts Demand DMA for ADC modules. /// Called once on startup.