Since the UART connection is asynchronous, as long as it doesn't have data in its buffer, you should be able to send data "immediately"
The current v1.0 firmware release does not provide any mechanism for specifically packetizing data sent over the CYSPP connection, but this feature is included in the new v1.1 update currently intended for mid-July release. With this new feature, you can configure a fixed packet size (e.g. 16 bytes) so that EZ-Serial will simply wait until that many bytes are in the buffer and then send exactly that many in a single transmission.
All packetization modes in v1.1 are:
- Immediate mode, where data is sent immediately as soon as any is detected (current default in v1.0)
- Anticipate mode, which waits a few milliseconds for a full buffer to avoid the current behavior of initial transmissions usually being 1 or 2 bytes (new default in v1.1)
- Fixed mode, where fixed-size packets are transmitted only once the correct number of bytes are available (this is what you wanted)
- Variable mode, where each transmission is preceded by the number of bytes to wait for in that packet before sending
- End-of-packet (EOP) mode, where transmissions occur only when a specific character is encountered in the data stream, or the buffer is completely full (makes it easier to use e.g. "\r" or "\n" CR/LF bytes to trigger transmissions)
Note that if you are simply testing throughput, the current "immediate" behavior in v1.0 has a negligible impact if you are sending a constant data stream into the module over UART. Only the first packet will be less than full, since after that the buffer should always (or at least usually) have enough data to fill the next packet.
This is exactly what I was looking for, given the fact that I am transferring packets of fixed size. I'm looking forward to the new release then!