cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 4

Anonymous
Not applicable

Hi,

   

I'm investigating the throughput on EZ-Serial. I would like to be able to send, for example, 16 bytes and force the module to send it immediately (as far as I know, the maximum is 20 bytes for the characteristic). Can this be done over the UART connection?

   

Thanks,

   

Andreas

0 Likes
1 Solution
Anonymous
Not applicable

Hi Andreas,

   

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.

   

Jeff

View solution in original post

0 Likes
4 Replies
Anonymous
Not applicable

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"

0 Likes
Anonymous
Not applicable

Hi Andreas,

   

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.

   

Jeff

View solution in original post

0 Likes
Anonymous
Not applicable

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!

   

Thanks,

   

Andreas

0 Likes
Anonymous
Not applicable

There is no documentation for _cyspp_set_packetization/_cyspp_get_packetization in user guide found here: http://www.cypress.com/documentation/software-and-drivers/ez-serial-ez-ble-module-firmware-platform

But these methods are present EZ-Serial API.

0 Likes