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.

TMS320C6748: TXBUF

Part Number: TMS320C6748

In my study of interrupt functions, I found the following paragraph in the user manual, but I am unable to query TXBUF information in CCS.

  • And I want to know what the following program means:

    intCode = SPIInterruptVectorGet(SOC_SPI_1_REGS);

    unsigned int SPIInterruptVectorGet(unsigned int baseAdd)
    {
    unsigned int intVectorCode;
    intVectorCode = HWREG(baseAdd + SPI_INTVEC1);

    return (intVectorCode >> 1);
    }

  • TXBUF是不能访问的,发送数据是写到SPIDAT1寄存器的,请看TRM文档上的框图。



    https://www.ti.com/lit/ug/spruh79c/spruh79c.pdf

  • And I want to know what the following program means:

    intCode = SPIInterruptVectorGet(SOC_SPI_1_REGS);

    unsigned int SPIInterruptVectorGet(unsigned int baseAdd)
    {
    unsigned int intVectorCode;
    intVectorCode = HWREG(baseAdd + SPI_INTVEC1);

    return (intVectorCode >> 1);

    这个是读取SPI_INTVEC1寄存器的值,请看上面TRM文档28.3.19 SPI Interrupt Vector Register 1 (INTVEC1)寄存器说明。

  • 你好!

    1.我目前要将C6748作为SPI从机在三线模式下接收数据,我这样理解对么:我的中断可以由接收为满触发,然后将该位数据保存,而不用考虑发送为空。

    2.我接受到的数据可以直接通过类似这样的函数进行提取吗?

    if(intCode == SPI_RECV_FULL)
    {
    rx_data[count++] = HWREG(SOC_SPI_1_REGS + SPI_SPIBUF);
    }

    我在这样尝试的时候发现CCS进行了报错:

    似乎HWREG函数并不能直接在这里使用,我应该如何解决这个问题呢?

  • 请在您的另外一个帖子里讨论,我将此贴关闭。