Post Go back to editing

How can I config the sport and DMA.

Category: Datasheet/Specs
Product Number: ADSP-bf702

Now i have a code  without comment. This code are already configure the sport and DMA, and it can work, but i don't know why it need to set those parameter like. Is there some docement can explain it?

// Init DMA0, for SPORT0 A
*pREG_DMA0_CFG &= ~ENUM_DMA_CFG_EN;
*pREG_DMA0_CFG = 0x001224; /* Setting the DMA */
*pREG_DMA0_ADDRSTART = &adc_sport0_a_tx[0]; /* Setting the DMA Address */
*pREG_DMA0_XCNT = SPORT_DMA_DEPTH;
*pREG_DMA0_XMOD = SPORT_DMA_WIDTH;

Thread Notes

  • Hi,


    The Code configures the DMA0 for ‘SPORT0A’ data operations. Each peripheral has dedicated DMA channel, and it perform transfers data between memory and a peripheral.

    1. The DMA_CFG register is responsible for setting up the DMA parameters and operation modes for data transfer or reception, specifying:

    - Transfer Word Size (MSIZE)

    - Transfer mode (one-shot, repeated, 1Dimension, or 2Dimension)

    - Interrupt and trigger generation settings etc.

    2. Xcount: Specifies the number of data bytes to be transferred.

    3. XMOD: Defines the stride for data transfer.

    4. ADDRSTART: Sets the starting address for DMA operation.


    Please refer Chapter 19 for detailed explanation about “Direct Memory Access (DMA)”. In the sub chapter “ADSP-BF70x DMA Register List”, you can find available register list which is used to program the DMA in different mode and configurations.

    https://www.analog.com/media/en/dsp-documentation/processor-manuals/BF70x_BlackfinProcessorHardwareReference.pdf


    Regards,
    Nandini.C