Skip to content

Commit 54c758a

Browse files
jinmiaoyuliucoldstar
authored andcommittedDec 19, 2024
telink: tlx: fix spi_tlx_txrx function
- update the spi_tlx_txrx function Signed-off-by: Jinmiao Yu <jinmiao.yu@telink-semi.com>
1 parent 7c5d3ac commit 54c758a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎drivers/spi/spi_tlx.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -206,9 +206,9 @@ static void spi_tlx_txrx(const struct device *dev, uint32_t len)
206206

207207
/* prepare SPI module */
208208
spi_set_transmode(cfg->peripheral_id, SPI_MODE_WRITE_AND_READ);
209-
spi_set_cmd(cfg->peripheral_id, 0);
210209
spi_tx_cnt(cfg->peripheral_id, len);
211210
spi_rx_cnt(cfg->peripheral_id, len);
211+
spi_set_cmd(cfg->peripheral_id, 0);
212212

213213
/* write and read bytes in chunks */
214214
for (int i = 0; i < len; i = i + chunk_size) {

0 commit comments

Comments
 (0)
Please sign in to comment.