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.

McBsp to DMA interrupt handling

I am trying to get received McBsp data to cycle into the DMA without  making an excursion through the McBsp Interrupt routine, which is handled by the BIOS dispatcher and takes some processing. 

But, if I disable the McBsp PIEIER (PIEIER7.5 = 0) the DMA won't fire.

So, I have the MFFINT for rcv set. I have the dma PERINTSEL set to trigger on McBsp B Receives. The DMA works, BUT for every receive on the McBsp the McBsp interrupt routine is visited.

Is there any way to configure things so that the McBsp continues to receive and to trigger the DMA, but does not light up the McBsp interrupt?

  • Richard -

    You should not have to enable McBSP PIE for the DMA to fire. You will need to enable the DMA interrupts though so that after a transfer is complete, the DMA ISR will trigger.

    In order to do this:

    Interrupts - McBSP interrupts must be disabled because the DMA automatically handles data transfers between the McBSP data registers and SARAM/peripheral register space. Although interrupts are disabled, the McBSP must be configured to generate an interrupt signal to the DMA module for every word transmitted (XRDY flag) and every word received (RRDY flag). See McBSP register configurations below:

     

    Table 3. McBSP Interrupt Enable Register (MFFINT) Settings

    Register [bit]

    Bit-field Name

    Binary Value

    Description

    MFFINT[2]

    RINTENA

    0

    Disable receive interrupts

    MFFINT[0]

    XINTENA

    0

    Disable transmit interrupts

     

    Table 4. Serial Port Control 1 Register (SPCR1) Settings

    Register

    [bit]

    Bit-field Name

    Binary Value

    Description

    SPCR1[5:4]

    RINTM

    00

    RINTM flag driven by RRDY

     

    Table 5. Serial Port Control 2 Register (SPCR2) Settings

    Register [bit]

    Bit-field Name

    Binary Value

    Description

    SPCR2[5:4]

    XINTM

    00

    XINTM flag driven by XRDY

    Likewise, DMA channel will need to select to receive the interrupt directly from the peripheral (not through the PIE) to trigger movement by the DMA using the PERINTE bit for the channel:

    For instance:

    DmaRegs.CH2.MODE.bit.PERINTSEL = DMA_MREVTA;  // Peripheral interrupt select = McBSP MRSYNCA 

    DmaRegs.CH2.MODE.bit.PERINTE = 1;         // Enable interrupts from peripheral (to trigger DMA)

    Hope this helps.

  • Hello,

    what about XINT1 calling DMA ?

    I set

        DmaRegs.CH2.MODE.bit.PERINTSEL = DMA_XINT1

        DmaRegs.CH2.MODE.bit.ONESHOT = 1;      //multiple bursts every XINT1

    but communication doesnt work properly.

    Is there anything else I should check?

    Thanks

    M