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.
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.
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);
}
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函数并不能直接在这里使用,我应该如何解决这个问题呢?