Announcements
IMPORTANT: Cypress Developer Community is transitioning on October 20th. To learn more and be prepared for this change, check out our latest announcement.
cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 5, 3 & 1 MCU

Anonymous
Not applicable

Hello,

I'm trying to do a DMA transfer of the capture value but I can not read anything.

image1.JPG

Configure of DMA :

#define DMA_BYTES_PER_BURST      4

#define DMA_REQUEST_PER_BURST    1

#define DMA_SRC_BASE              (CYDEV_PERIPH_BASE)

#define DMA_DST_BASE             (CYDEV_SRAM_BASE)

    Channel_Counter3 = DMA_Counter3_DmaInitialize(DMA_BYTES_PER_BURST, DMA_REQUEST_PER_BURST, HI16(DMA_SRC_BASE), HI16(DMA_DST_BASE));

    counter3_TD_0 = CyDmaTdAllocate();

    CyDmaTdSetConfiguration(counter3_TD_0, 4, counter3_TD_0, DMA_Counter3__TD_TERMOUT_EN | CY_DMA_TD_INC_SRC_ADR );

    CyDmaTdSetAddress(counter3_TD_0, LO16((uint32) Counter_3_STATICCOUNT_LSB_PTR), LO16((uint32)counter[2]));

    CyDmaChSetInitialTd(Channel_Counter3,counter3_TD_0);

    CyDmaChEnable(Channel_Counter3, (1u));

Captura.JPG

DMA hardware Request :Rising edge

Is something wrong?

I want to transfer the capture data and then active the interrupt and reset the counter.

Regards and thank you!

0 Likes
1 Solution
odissey1
Honored Contributor II

I don't see where the value of the counter is being transferred? Secondly, if you want to use interrupt, then why do you need a DMA? Some additional info about destination would help to answer your question.

View solution in original post

0 Likes
2 Replies
odissey1
Honored Contributor II

I don't see where the value of the counter is being transferred? Secondly, if you want to use interrupt, then why do you need a DMA? Some additional info about destination would help to answer your question.

View solution in original post

0 Likes
Bob_Marlowe
Expert II

The enable input is fed with a very short pulse from the debouncer. Only while "enable" is high the counter will work.

Bob