SPI request/response is overriden by SS

Hi! I’m using the firmware interface for the SPI bus to communicate with an external slave. In stead of the traditional chip select, my setup utilizes a dual request/response system, so that both the Spark Core and the slave have an output pin where they can request and accept an SPI transfer.

I have mapped the Spark Core’s request line(output) to the SPI SS pin, but the controller seems to override my manual digitalWrite commands to this pin. I set the pinMode() after I run the SPI.begin(), but to no avail.

I used the exact same setup on both an Arduino Uno and Leonardo, where it worked fine. Could this be a problem with the SPI implementation in the firmware?

I think @peekay123 mentioned to me while we were working on other tests.

Let’s wait for him to wake up :wink:

@trondsne, the firmware sets the SPI mode register to "soft ss" mode:

Software NSS management (SSM = 1)
The slave select information is driven internally by the value of the SSI bit in the
SPI_CR1 register. The external NSS pin remains free for other application uses.

The SPI.begin() function DOES set the pinmode for SS but after that, nothing should interfere with your code. Perhaps @mohit or @satishgn have something to say here?