SPI slave design flaw

squonk11
Posts: 69
Joined: Wed Mar 01, 2017 6:53 pm
Location: Germany

SPI slave design flaw

Postby squonk11 » Sun Dec 30, 2018 10:09 am

In the online documentation of the ESP32 I found a warning concerning the use of the SPI interface as slave:
Warning: Due to a design peculiarity in the ESP32, if the amount of bytes sent by the master or the length of the transmission queues in the slave driver, in bytes, is not both larger than eight and dividable by four, the SPI hardware can fail to write the last one to seven bytes to the receive buffer.
I am trying to use the SPI in slave mode because I need to connect to another device which is operating as master. This device is sending data of arbitrary lenght. So probably I will have a problem with the above mentioned flaw.
Is there any way to circumvent this problem? e.g. by reading byte by byte?
"Whoever believes to be someone has stopped becoming someone"
Sokrates

squonk11
Posts: 69
Joined: Wed Mar 01, 2017 6:53 pm
Location: Germany

Re: SPI slave design flaw

Postby squonk11 » Sun Jan 06, 2019 12:40 am

Unfortunately this topic is becoming a bigger problem for me. Isn't there any workaround; even if it is a crazy solution like polling of incomming data???
Please help!
"Whoever believes to be someone has stopped becoming someone"
Sokrates

squonk11
Posts: 69
Joined: Wed Mar 01, 2017 6:53 pm
Location: Germany

Re: SPI slave design flaw

Postby squonk11 » Tue Jan 08, 2019 5:13 pm

In the driver source for the SPI interface I see in spi_common.c :

Code: Select all

/*
Code for workaround for DMA issue in ESP32 v0/v1 silicon
*/
Does this imply that there might be a v2 silicon in progress which fixes this problem?
"Whoever believes to be someone has stopped becoming someone"
Sokrates

Who is online

Users browsing this forum: Bing [Bot] and 105 guests