-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for multiple xfer buffers in the RTOS SPI Slave driver #64
Comments
Copying @xmos-jmccarthy's comments describing another proposed driver implementation where the command would be responded within a since CS assert. The main benefit of this implementation will be the ability to respond on a byte by byte basis. I am imagining implementing something more like the I2C protocol. To do a write command, the master would: CS Assert MOSI the data bytes. The master would then continue to clock 0's until it sees a magic number on MISO, this magic number would essentially be like the I2C ACK. During the above the slave would get the command bytes sent, and output 0's until the application had processed and given the driver the buffer to write out. The spi slave bytes callback, would probably have some callback, like, if I did 50 clocks and the app hasn't responded send a timeout magic byte to the HIL and alert the app we gave up on this transaction. Basically, you implement pseudo clock stretching by having the master just continue clocking until it sees the TIMEOUT or ACK magic bytes. This shoudl also allow reusing a lot of the I2C logic with the SPI slave |
Closed by xmos/xcore_iot#537 |
Thank you for submitting an SDK feature request. Please provide as much information you can.
Describe the feature
I'm using the RTOS SPI slave driver to implement control over SPI Slave for the xvf3800. I'm using the xcore_sdk device_control service as well to which I've added support for SPI Slave transport (#55). The design I'm aiming for is this:
This will require switching xfer buffers between the good buffer (command accepted) and the dummy buffer (command ignored) in the driver. I want to understand if this is possible? Or else, if there's another design that could help me meet my 2 requirements listed above.
Will this change any current APIs? How?
Who will benefit with this feature?
Any Other info
The text was updated successfully, but these errors were encountered: