Teensy 4.0 as SPI Slave : Need Guidance

akm_369

New member
Hey All,

I am new to this forum & fresh to teensy usage. I was planning to build a software where I need the Teensy 4.0 in SPI Slave mode. I have got few questions after going through many of the forum discussions and library examples.

1. As a first thing, I have found two different SPI Slave libraries ( and ) where the later is the latest. Can I use either of these for my setup or any recommendations? I might need this slave device in a daisy chain, hence I assumed the second one should be the choice.
I have tried the setup with the SPI_MSTransfer_T4 library and my master to slave communication works as expected. But I couldn't succeed with my implementation of a response back from Slave to Master. The use case would be something like upon a command from Master, the Slave should respond with the action/data. Is there any example code that I can refer for the same? My master in this case could be any microcontroller, but for now I am testing with another teensy 4.0.

2. Is it possible to configure the Teensy 4.0 SPI Slave in SPI_MODE2 or any other mode than 0? I could see it is changeable but I would really appreciate if someone could point where/which all configs exactly need to be changed. for example, can I directly use the SPISettings class in my Slave implementation to set it to desired mode?

Any help here would be grateful! Sorry if these were previously answered in some other threads, but unfortunately I couldn't find something that clarifies my concerns.

Thanks a lot for your time and consideration!
 
Back
Top