dummy的用法

djqlyy
Posts: 52
Joined: Wed Oct 23, 2019 12:46 am

dummy的用法

Postby djqlyy » Fri Dec 11, 2020 2:10 am

dummy怎么用?
我如下设置后传输
spi_transaction_t t1;
spi_transaction_ext_t et1;

memset(sendbuf1, 0xa5, 8);
t1.length=4*8;
t1.tx_buffer=sendbuf1;
t1.rx_buffer=recvbuf1;
t1.flags=SPI_TRANS_VARIABLE_DUMMY;
et1.dummy_bits = 1;
et1.base=t1;
每次传输完成后再进行下一次传输,结果是cs一直为低,clk一直有,数据一直为0
spi_device_queue_trans(spi,&t1,portMAX_DELAY);
不用dummy时正常,发一次数据,等一段时间后又有一段数据发出

Who is online

Users browsing this forum: No registered users and 110 guests