What data mode is the Photon 2 using when it communicates with the Wiznet W5500? I'm having communication issues when attaching a second device to the SPI port, and I'm suspicious of a conflict in the data mode types.
Make sure your other sensor surrounds every operation with SPI.beginTransaction() and SPI.endTransaction(). This does two things: It set the speed, mode, and byte order for every operation, so it won't matter what the Ethernet port uses. However, the other reason is that it acquires the SPI lock, which is necessary because Ethernet is accessed from the system thread, so if you don't lock it, the calls will get interleaved and fail.
noted, thanks for response. Took the easy way out and switched the module to use I2C and left the ethernet as the only device on the SPI.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.