This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2640R2F: Use DMA to continously measure pulse width

Part Number: CC2640R2F

Hy,

in an application I need to record and parse a serial digital signal. My idea is to store the value of a free running counter on every edge of the signal using DMA. When I now parse through the stored values I can retrace the number of Ones and the number of Zeros when I know the ratio of the free running counter and the bit rate of the signal.

- Is it possible to use both edge of a GPIO signal as a DMA trigger?

- Is it possible to do a "8 bit peripheral none increment" to "8 bit memory 1 byte increment ring buffer" DMA transfer?

- Can I poll from software the current target address of DMA to find out if and how many new values have been stored already?

- If yes, is there sample code on how to realize this`?

Best regards

Harald

  • Hi,

    I will have to get back to you on the first and third question.

    - Is it possible to do a "8 bit peripheral none increment" to "8 bit memory 1 byte increment ring buffer" DMA transfer?
    Yes.
    - If yes, is there sample code on how to realize this`?
    We have some BLE examples using DMA which you can take a look at as code reference. The example you should be looking into is aoa_receiver. The code for setting up DMA is located at AOA.c(C:\ti\simplelink_cc2640r2_sdk_2_20/30_00_xx\source\ti\blestack\common\cc26xx\aoa)
    Functions for you to take a look at is :: receiverInitHw, patternSetupDmaTransfer