cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC™ 5, 3 & 1

Anonymous
Not applicable

Hi,

   

I have the architecture above working fine with 8 bits, but for the life of me, I can't get it to work with 12 bits!  Do I need to do something special with the DFB and DMA to change it to 12 bits?

   

 

   

Thanks,

   

Richard

0 Likes
8 Replies
Bob_Marlowe
Expert II

When you post your project here we all can have a look at your settings and may find out what's going amiss.

   

To do so: Build -> Clean Project

   

File -> Create Workspace Bundle

   

and then upload here the resulting archive.

   

 

   

Bob

0 Likes
ETRO_SSN583
Esteemed Contributor

Might be the byte swap issue, take a look at these examples in this (AN52705) -

   

 

   

http://www.cypress.com/?rID=37793

   

 

   

Regards, Dana.

0 Likes
Anonymous
Not applicable

Thanks for you help!

   

I attached the working 8 biut version

   

Richard

0 Likes
Anonymous
Not applicable

Thanks for you help!

   

I attached the non-working 12 bit version

   

Richard

0 Likes
Bob_Marlowe
Expert II

Looks like you forgot to increment the source-address when calling CyDmaTdSetConfiguration(). Since you are transferring 2 Bytes now you'll neet to read (via DMA) two consecutive registers from ADC and from Filter.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Hi Bob,

   

Thanks for your reply!

   

I'm a little confused, I looked at the attached 16-bit DMA-DFB exampe code, and it doesn't look like they are incrementing any DFB address???  I want to transfer 512 words into/out of the DFB with DMA.  If I increment/decrement the DFB's address, won't I have to set the total transfer count to 2 instead of 2*512 words?  How will I get the EOC interrupt when the transfer is complete?

   

Thanks,

   

Richard

0 Likes
Bob_Marlowe
Expert II

Richard,

   

look at the example, find the line

   

   

CyDmaTdSetConfiguration(dma_stga_in_td, (COLUMN * ROW * 2u), DMA_INVALID_TD, (DMA_IN_A__TD_TERMOUT_EN | TD_INC_SRC_ADR));

   

and see the "TD_INC_SRC_ADR" which tells the DMA to increment the source address, not the destination which you may need as well.

 

0 Likes
Anonymous
Not applicable

Hi Bob,

   

I took a look at that line of code, it is incrementing the SRAM address, not the DFB address.  This code seems to treat the DFB as a 16 bit wide device, which is what I'm trying to do.  I have looked at other examples, which treat the DFB as an 8 bit device and loop a TD moving 2 bytes continuously, incrementing the DFB address (not what I want to do).  I need the DMA complete interrupt from when the buffer is completely transfered...

   

 

   

Thanks,

   

Richard

0 Likes