Hi,
I’m using Arduino 4.0.4 SDK, and I’m trying to migrate RTL8722DN(with Standard SDK) project to AMB82-MINI.
Here are my questions:
I’m wand to use SPI read, but in SPI.h, only “transfer” API can use.
I directly use “spi_master_write” to receive data, but there is nothing happened. (In RTL8722DN, the spi_master_write API works).
(Due to this project may become a product, I only can show part of the code) #include <SPI.h>
extern spi_t spi_obj0;
static uint8_t MasterRxBuf[SPI_BUF_SIZE + 32] attribute((aligned(32)));
const uint8_t dummy = 0;
static bool Flag = false; //Flag triggered by GPIO interrupt
I want to set SPI speed as 25MHz, except edit “SPI_DEFAULT_FREQ” in SPI.h, should I edit “SPISettings” line( SPISettings(4000000, MSBFIRST, SPI_MODE0); ) ?
If you have set your board as Master, to send data to Slave, you can use the "transfer“ API. You may refer to SPI.cpp. This API is executing “spi_master_write”.
The code you have provided is unable to compile in the Arduino IDE; therefore, I have provided basic SPI Master and Slave test examples in the zip file for your reference.