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 接收中断

Guru**** 2544120 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/978704/rm57l843-spi-dma-receive-interrupt

器件型号:RM57L843

您好!

我已经将 DMA 通道配置为从 SPI 接收数据到存储器、每帧一个元素、帧数为8、我希望在接收完所有帧后获得中断、

请建议我、如何继续、

谢谢、

Shantanu S.  

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好 Shantanu,

    我很抱歉耽误你的答复。 自从德克萨斯州恶劣的天气以来、我遇到了断电和互联网中断。  

    DMA 可被配置成在多种传输条件下产生中断:

    • 帧传输完成(FTC)中断:在传输完帧的最后一个元素后发出中断。
    • 最后一帧传输开始(LFS)中断:在块传输的最后一帧的第一个元素开始之前发出中断。
    • 块完成的前半部分(HBC)中断:如果块的一半以上被传输、就会发出一个中断。
    • 块传输完成(BTC)中断:在最后一帧的最后一个元素传输完毕后发出中断。

    您可以使用 BTC 中断:

    /*传输完成后为接收启用块传输完成中断*/
    dmaEnableInterrupt (DMA_CH0、BTC、DMA_INTA);

    void dmaGroupA 通知(dmaInterrupt_t inttype、uint32通道)

         if (通道=0)        //MibsPI1 RX
           gioSetBit (gioPORTA、0x0、0x1); //在接收8个帧(1个块)后设置 GIOA[0]