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.

M4(tm4c123gh6pm)的SSI中断的问题

最近在学习SSI通信接口,对其中断控制产生了很大的疑问,SSI通信接口有7中中断方式,可是datasheet中的和SSI中断有关的寄存器只涉及四中中断,我想用的是发送完成中断,可却不在寄存器所涉及的四种中断当中,不知怎么用。求指导?

  • 使用函数

    void SSIIntEnable(uint32_t ui32Base, uint32_t ui32IntFlags)来设置中断类型。

    ui32Base是选择哪个SSI,ui32IntFlags是中断类型。支持如下类型:

    //*****************************************************************************
    //
    // Values that can be passed to SSIIntEnable, SSIIntDisable, and SSIIntClear
    // as the ui32IntFlags parameter, and returned by SSIIntStatus.
    //
    //*****************************************************************************
    #define SSI_TXEOT 0x00000040 // Transmit FIFO is empty
    #define SSI_DMATX 0x00000020 // DMA Transmit complete
    #define SSI_DMARX 0x00000010 // DMA Receive complete
    #define SSI_TXFF 0x00000008 // TX FIFO half full or less
    #define SSI_RXFF 0x00000004 // RX FIFO half full or more
    #define SSI_RXTO 0x00000002 // RX timeout
    #define SSI_RXOR 0x00000001 // RX overrun

    你需要的发送完成中断可以选择第一个或者第四个,都可以。

  • 谢谢了,原来定义在头文件里,我以为函数说明的文档里没有就真的没有了。