Hi Alan,
Please see attached sample code for the eZ80F91 SPI Slave. This is a simple demonstration of SPI Slave function for the F91. This is tested with the SPI Master application note (AN0273) for the F1680 device. The setup I had here is that the F1680 acts as the SPI Master device (running AN0273) and the F91 acts as the SPI Slave device. (I changed the baudrate of AN0273 to 500 bits/s).
In summary, the implementation for the F91 SPI slave is very similar to how you would do for an F91 SPI master implementation. The only striking difference is that, in implementing SPI as a master, you need to control the SS pin similar to how you would do for a GPIO. While in implementing SPI as a slave, you need to enable the alternate function for SS pin.
Please let me know if you need more info.
Best Regards,
File Attachment: File Name:
SPI.zipFile Size: 46703