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.

RM57L843: SPI DMA receive Interrupt

Part Number: RM57L843


Hello,

I have configure DMA channel for receiving data from SPI to Memory as one element in each frame and number of frames are eight, I am looking to get the interrupt after receiving all frames,

Please suggest me, how do i proceed,

Thank you,

Shantanu S. 

  • Hello Shantanu ,

    I am sorry for late response. I have experienced power outage and internet lost since the severe weather in Texas. 

    The DMA can be configured to generate interrupts on several transfer conditions:

    • Frame transfer complete (FTC) interrupt: an interrupt is issued after the last element of a frame has been transferred.
    • Last frame transfer started (LFS) interrupt: an interrupt is issued before the first element of the last frame of a block transfer has started.
    • First half of block complete (HBC) interrupt: an interrupt is issued if more than half of the block is transferred.
    • Block transfer complete (BTC) interrupt: an interrupt is issued after the last element of the last frame has been transferred.

    You can use BTC interrupt:

    /* Enable Block Transfer Complete interrupt for the receive after transfer complete */
    dmaEnableInterrupt(DMA_CH0, BTC, DMA_INTA);

    void dmaGroupANotification(dmaInterrupt_t inttype, uint32 channel)
    {
             if(channel == 0)              //MibsPI1 RX
                  gioSetBit(gioPORTA, 0x0, 0x1);  //set GIOA[0] after receiving 8 frames (1 block)

    }