Dear All
我在CC2640R2F工程simple_peripheral添加了SPI的驱动上去,编译提示内存一直不足,但是我添加SPI的代码并不是很多,所以请教一下是哪里的问题
谢谢
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.
Dear All
我在CC2640R2F工程simple_peripheral添加了SPI的驱动上去,编译提示内存一直不足,但是我添加SPI的代码并不是很多,所以请教一下是哪里的问题
谢谢
如下是一个简单测试,在 Simple Peripheral project上添加SPI功能,slave,block模式,需要搭配master进行收发:
SPI_Handle handle;
SPI_Params params;
SPI_Transaction transaction;
uint8_t rxBuf[100]; // Receive buffer
// Init SPI and specify non-default parameters
SPI_Params_init(¶ms);
params.bitRate = 1000000;
params.frameFormat = SPI_POL1_PHA1;
params.mode = SPI_SLAVE;
// Configure the transaction
transaction.count = 100;
transaction.txBuf = NULL;
transaction.rxBuf = rxBuf;
// Open the SPI and perform the transfer
handle = SPI_open(Board_SPI, ¶ms);
for(;;) {
SPI_transfer(handle, &transaction);
}