Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > PSoC® 5 > ADC_SAR -> DMA -> FIR_Filter

Cypress Developer CommunityTM
Forums | Videos | Blogs | Training | Rewards Program | Community Components



ADC_SAR -> DMA -> FIR_Filter

Summary: 7522 Views, 2 Replies, Latest reply by Dick22 on 24 Mar 2011 01:31 AM PST

Verified Answers: 0

Post Reply


timhappy posted on 22 Dec 2010 7:01 AM PST

1 Forum Post

Hello everyone,

I'm working with the PSoC5 Dev-Kit CY8CKIT-001 and PSoC Creator 1. I try to transfer the result of the ADC_SAR to the filter-block via DMA. My DMA config is: 

 /* DMA Configuration for DMA_ADC2Filter */
    #define DMA_ADC2Filter_BYTES_PER_BURST 2
    #define DMA_ADC2Filter_REQUEST_PER_BURST 1
    #define DMA_ADC2Filter_SRC_BASE (CYDEV_PERIPH_BASE)
    #define DMA_ADC2Filter_DST_BASE (CYDEV_PERIPH_BASE)
    DMA_ADC2Filter_Chan = DMA_ADC2Filter_DmaInitialize(DMA_ADC2Filter_BYTES_PER_BURST, DMA_ADC2Filter_REQUEST_PER_BURST,
        HI16(DMA_ADC2Filter_SRC_BASE), HI16(DMA_ADC2Filter_DST_BASE));
    DMA_ADC2Filter_TD[0] = CyDmaTdAllocate();
    DMA_ADC2Filter_TD[1] = CyDmaTdAllocate();
     if(DMA_ADC2Filter_Chan == DMA_INVALID_TD || DMA_ADC2Filter_TD[0] == DMA_INVALID_TD)
    {
           LCD_Position(0,0) ;
        LCD_PrintString("DMA Error") ;
    }
    
    if (CyDmaTdSetConfiguration(DMA_ADC2Filter_TD[0], 2, DMA_ADC2Filter_TD[1], TD_INC_SRC_ADR | TD_INC_DST_ADR | TD_SWAP_EN | TD_SWAP_EN ) != CYRET_SUCCESS) // c);
    {    
        LCD_Position(0,0) ;
        LCD_PrintString("DMA Error") ;
    }
    
    if (CyDmaTdSetConfiguration(DMA_ADC2Filter_TD[1], 2, DMA_ADC2Filter_TD[0], TD_SWAP_EN ) != CYRET_SUCCESS)
    {    
        LCD_Position(0,0) ;
        LCD_PrintString("DMA Error") ;
    }
    CyDmaTdSetAddress(DMA_ADC2Filter_TD[0], LO16((uint32)ADC1_SAR_WRK0_PTR), LO16((uint32)FIR_Filter_STAGEA_PTR));
    CyDmaTdSetAddress(DMA_ADC2Filter_TD[1], LO16((uint32)ADC1_SAR_WRK1_PTR), LO16((uint32)FIR_Filter_STAGEA_PTR));
    CyDmaChSetInitialTd(DMA_ADC2Filter_Chan, DMA_ADC2Filter_TD[0]);
    if (CyDmaChEnable(DMA_ADC2Filter_Chan, 1) != CYRET_SUCCESS)
    {    
        LCD_Position(0,0) ;
        LCD_PrintString("DMA Error") ;
    }

I took the config from the example and it works fine for the lower byte. But not for the higher one. The problem is that the result of the conversion is stored in two different registers of just 1 byte, not as in the example in one 16 bit-register. I gues the ardesspointers need to be configured in a certain way, but I don't know how.

Can anyone tell me how? 

Thanks in advance! 

timhappy

 



 

dspGuru posted on 24 Feb 2011 06:46 AM PST
Member
7 Forum Posts

 Hi Tim,

Not sure if this is your issue, but I noticed when using the UDB that there was a seperate register for the 16-bit access to the FIFO then for the 8-bit access. If you look in Cyfitter.h you can see the register aliases.

If you get this working let me know - I have to do the same thing.

Kelly


Dick22 posted on 24 Mar 2011 01:31 AM PST
Member
3 Forum Posts

Hi Tim and Kelly,

 

I´m working on the same problem but i did not find a solution by now.

If you have some thing let me know.

Dick22



 

Post Reply






ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Spec No: None; Sunset Owner: KXP; Secondary Owner: VWA; Sunset Date: 06/15/20