spi slave how to receive 17 bytes at one time

jiangshan00000
Posts: 4
Joined: Wed Apr 14, 2021 8:07 am

spi slave how to receive 17 bytes at one time

Postby jiangshan00000 » Wed Apr 28, 2021 3:40 am

Desc:
I use esp32 as as spi slave device.
the master send 17 byte at one time.
I used the dma=2 mode as shown the example in :spi_slave/receive.

PROBLEM: the last byte received may by wrong((byte0-15 is correct, byte16 is wrong sometimes.)).

I find this: "master should write lengths which are a multiple of 4 bytes. Data longer than that will be discarded".
so,
Q:
1 is it possible to receive 17 byte in dma mode? the master device could not change.
2 if I must do it in isr mode. how to do isr mode. is their any example? i tried to just set dma=0. but got incorrect data(the byte lenth is correct, the the data is incorrect.)

Who is online

Users browsing this forum: No registered users and 215 guests