Closed jimaobian closed 5 years ago
you should use "spi_init" to change the configuration of spi. spi_init(SPI_DEVICE_0, SPI_WORK_MODE_0, SPI_FF_STANDARD, 8, 0); uint8_t data = 0x34; spi_send_data_normal_dma(DMAC_CHANNEL0, SPI_DEVICE_0, SPI_CHIP_SELECT_0, data, 1, SPI_TRANS_CHAR)
You are right, Got it.
https://github.com/kendryte/kendryte-standalone-sdk/blob/d13b38098a3598b0018c38590387e43953efd140/lib/drivers/spi.c#L332
The code above will send "0x00 0x00 0x00 0x34" instead of "0x34", which is not reasonable.