PSoC 5lp DMA gets stuck if transfer count passes 70

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Im using the PSoC 5lp dev kit CY8CKIT-050 and I've attached my project. I am attempting to connect DMA to an ADC so that I can do some high speed sampling. The DMA and ADC are acting as expected up to BUFFER_SIZE = 34 (AKA taking 34 data readings from the ADC and storing to ram). However when I set BUFFER_SIZE to 35 or above, I never reach the DMA_done_isr interrupt. The DMA should be able to handle up to 4095 bytes at a time and with a BUFFER_SIZE of 35, it should only be shifting 70 bytes to memory. Any thoughts?

0 Likes
1 Solution
EvPa_264126
Level 7
Level 7
500 replies posted 250 replies posted 100 likes received

dma_driver.c

add:

uint8 table[1000];

and change

35      CyDmaTdSetAddress(DMA_1_TD[0], LO16((uint32)ADC_SAR_WRK0_PTR), LO16((uint32)CYDEV_SRAM_BASE));

to:

35        CyDmaTdSetAddress(DMA_1_TD[0], LO16((uint32)ADC_SAR_WRK0_PTR), LO16((uint32)table));

you will see isr_DMA_Done  interrupt.

View solution in original post

2 Replies
EvPa_264126
Level 7
Level 7
500 replies posted 250 replies posted 100 likes received

dma_driver.c

add:

uint8 table[1000];

and change

35      CyDmaTdSetAddress(DMA_1_TD[0], LO16((uint32)ADC_SAR_WRK0_PTR), LO16((uint32)CYDEV_SRAM_BASE));

to:

35        CyDmaTdSetAddress(DMA_1_TD[0], LO16((uint32)ADC_SAR_WRK0_PTR), LO16((uint32)table));

you will see isr_DMA_Done  interrupt.

Anonymous
Not applicable

Great that fixed it. Thanks!

0 Likes