Search found 4 matches

by CodeOne
Sun Mar 25, 2018 12:01 pm
Forum: ESP-IDF
Topic: Use SPI bus concurrently from two tasks
Replies: 5
Views: 8191

Re: Use SPI bus concurrently from two tasks

I've found the following warning in the SPI Slave driver documentation ( http://esp-idf.readthedocs.io/en/latest/api-reference/peripherals/spi_slave.html#spi-slave-driver ): Warning: Due to a design peculiarity in the ESP32, if the amount of bytes sent by the master or the length of the transmission...
by CodeOne
Fri Mar 16, 2018 9:46 pm
Forum: ESP-IDF
Topic: Use SPI bus concurrently from two tasks
Replies: 5
Views: 8191

Re: Use SPI bus concurrently from two tasks

I have now spent quite some time digging deeper into the issue. It's still unsolved. Yet I've made an interesting observation where somebody can hopefully help me better understand what's going on. The problem is reproducible. It only occurs if there's other activity with a different SPI slave on th...
by CodeOne
Tue Mar 13, 2018 10:25 pm
Forum: ESP-IDF
Topic: Use SPI bus concurrently from two tasks
Replies: 5
Views: 8191

Re: Use SPI bus concurrently from two tasks

Thanks for pointing out the spi_device_handle_t . I indeed missed that one. That prevents the mixup between tasks. So the API design is fine and just what I need. However, I find that data read from one of the SPI slaves is overwritten with garbage when the two tasks access the SPI bus concurrently....
by CodeOne
Mon Mar 12, 2018 10:32 pm
Forum: ESP-IDF
Topic: Use SPI bus concurrently from two tasks
Replies: 5
Views: 8191

Use SPI bus concurrently from two tasks

My ESP32 app talks to two SPI slaves connected to the same SPI bus. Two tasks run concurrently (on the same cpu) and each one talks to one of the slaves. The program runs without problem if I use a mutex to ensure that only one task accesses the SPI bus at a time. However, I would like to better int...