Our Promira Serial Platform is configured as a slave and is connected to a processor which acts as the master. The master sends 3 bytes of data on the MOSI and later reads 3 bytes and multiple dummy data bytes. The slave must then respond with the 3 bytes and the multiple dummy data bytes. The total bytes are more than 256 bytes.
If we set the slave’s response accordingly using the ps_spi_std_slave_set_resp function from the Promira Software API for I2C/SPI Active, the slave will only send the initial 256 bytes of the buffer repeatedly. Moreover, we are not able to change the slave’s response while transactions are taking place.
Is there a way in which we can send a single response that is composed of more than 256 bytes which are not repeated?
Response from Technical Support:The buffer size of Promira Serial Platform is limited to 256 bytes. In a single transaction, it is not possible for both the Control Center Serial Software and Promira Software API I2C/SPI Active to send more than 256 bytes of data in a single response.
If there are more bytes than requested in a response, the Promira API ps_spi_std_slave_set_resp function will wrap the response string as many times as necessary to complete the message.
The Control Center Serial Software lets developers make use of I2C, SPI, and GPIO functionality for our Promira Serial Platform, Aardvark I2C/SPI Host Adapter, and the Cheetah SPI Host Adapter. By using this software, users can emulate a master or slave by writing and reading I2C or SPI messages on the bus.
This software truncates SPI data if it is more than 256 bytes, but it does not wrap the rest of the data in the next transaction since the MISO is set up manually. When "Set MISO" is clicked again, the same data is being treated as new data and hence, the data is being sent from starting location, until the maximum buffer size.
In order to send continuous data with data wrapped in the next transaction if data size is greater than read size, we recommend the Promira Software API for I2C/SPI Active. For additional information about the Promira Serial Platform API, take a look at the Promira Serial Platform User Manual.
The API's that fulfill this requirement are:
We provide downloadable example code in various programming languages such as C, C#, Python, .NET, and VB.NET.
We hope this answers your question. Resources that you may find helpful include the following:
If you want more information, feel free to contact us with your questions, or request a demo that applies to your application.