![slave maker 3 development slave maker 3 development](https://community.element14.com/resized-image/__size/620x465/__key/roadtestreviewfiles/9574035c907c49ffbbbcf16e91f94178/1680.contentimage_5F00_158041.jpg)
![slave maker 3 development slave maker 3 development](https://www.un.org/sites/un2.un.org/files/21-00014c_transatlanticslave_sm_aug26_1200_675.png)
![slave maker 3 development slave maker 3 development](https://www.microchip.com/content/dam/mchp/mrt-dam/devtools/1462-adm00678-mcp2221-i2c-demonstration-board.jpg)
Make the SPI transaction (send the opcode, address, data, etc., as required by the SPI slave).Make the firmware-controlled SS pin low before starting the SPI transaction.One way to overcome this issue is to connect a separate firmware-controlled digital output pin to the SS pin of the SPI slave instead of using the SS signal supplied by the SPI component. This would cause the slave’s state machine to reset in the middle, and see the address byte as the opcode, resulting in unexpected results. Since the SPI component releases the SS line if there are no pending bytes in the SPI buffer, it is possible that the SS line goes high in between the opcode and the address byte. So it is possible (when using slower CPU speeds) that the CPU may place the opcode byte onto the SPI buffer, and before the CPU places the address byte onto the SPI buffer, the SPI component completes the transaction corresponding to the opcode.
#SLAVE MAKER 3 DEVELOPMENT SERIES#
When using a PSoC 3 SPI master to send the series of bytes (opcode, address, and data), in your source code, the SPI master component would clock out the data when the SPI shift register is empty. So the next byte received from the master after the SS clock goes low would be interpreted as an opcode by the slave. Once the SS clock goes high, the state machine in the slave IC gets reset. SPI slaves, such as SPI EEPROM ICs, typically interpret the first byte received from the master after the slave select (SS) line goes down as the opcode (say, to read/write, etc.), and the following few bytes as the address then the data bytes are sent and received. What is a possible cause for this issue and how do you fix it? However, the data is correct for faster CPU speeds (or for slower SPI clock frequencies). Question: When using PSoC ® 3/4/5LP as an SPI master to interface with SPI slaves (such as SPI EEPROMs, SPI-based ADCs, etc.), the data read from / written to the slaves is wrong when CPU speed is decreased (or SPI speed is increased).