cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 5, 3 & 1 MCU

New Contributor

I am trying to run a 16bit conversion from the Delta Signal ADC to the DFB using DMA. I have set everything up as best I can but I can not get the Filter Interrupt to fire. I have confirmed the DMA transfer is working by monitoring the DMA nrq output. I get pulses at 2khz which is the speed I am running the ADC.

   

I then loaded the example Filter_ADC_VDAC project and it fires the interrupt fine.

   

I use the DMA wizard initially in my project any it wants me to use Filter_1_STAGEA_PTR for the destination of the DMA transfer.

   

If I change this to Filter_1_STAGEAH_PTR like in the example project the interrupt starts to work. However, when I read the filter

   

Filter_1_Read16(Filter_1_CHANNEL_A);

   

it looks like the output is just random data. I am feeding a constant 2V to the ADC.

   

Does anyone know why when I set the DMA destination to Filter_1_STAGEA_PTR the interrupt no longer works?

   

The DMA wizard created this

   

CyDmaTdSetAddress(DMA_1_TD[0], LO16((uint32)ADC_AirSpeed_DEC_SAMP_PTR), LO16((uint32)Filter_1_STAGEA_PTR));

   

Is it wrong?

   

Here is the DMA config functions

   

uint8 DMA_1_Chan;

   

uint8 DMA_1_TD[1];

   

/* DMA Configuration for DMA_1 */

   

DMA_1_Chan = DMA_1_DmaInitialize(DMA_1_BYTES_PER_BURST, DMA_1_REQUEST_PER_BURST, HI16(DMA_1_SRC_BASE), HI16(DMA_1_DST_BASE));

   

DMA_1_TD[0] = CyDmaTdAllocate();

   

CyDmaTdSetConfiguration(DMA_1_TD[0], 2, DMA_INVALID_TD, DMA_1__TD_TERMOUT_EN);

   

CyDmaTdSetAddress(DMA_1_TD[0], LO16((uint32)ADC_AirSpeed_DEC_SAMP_PTR), LO16((uint32)Filter_1_STAGEA_PTR));

   

CyDmaChSetInitialTd(DMA_1_Chan, DMA_1_TD[0]);

   

CyDmaChEnable(DMA_1_Chan, 1);

0 Likes
Reply
1 Solution
Honored Contributor II
        Check filter demo projects exemplifying DMA in/out from Filter https://www.hackster.io/bmah/psoc-5lp-16-bit-and-24-bit-digital-filter-code-examples-ddcf9c   

View solution in original post

0 Likes
Reply
1 Reply
Honored Contributor II
        Check filter demo projects exemplifying DMA in/out from Filter https://www.hackster.io/bmah/psoc-5lp-16-bit-and-24-bit-digital-filter-code-examples-ddcf9c   

View solution in original post

0 Likes
Reply