2 Replies Latest reply on Apr 6, 2017 12:08 AM by hima

    psoc 4 not offloading data fast enough to application.

    pdt

      Hello Forum/Cypress,

         

      I am trying to receive incoming data at the fastest possible speed.

         

      1) I am using 2 x CYBL11573-56LQXI chips with the HCI/DTM example code.

         

      2) The UART is set at max speed = 1Mbit.

         

      3) The CPU clock is max speed = 48Mhz.

         

      4) Packet Data Length extensions are enabled on both ends and packet length is MAX.

         

      5) When receiving packets at max speed, it can be observed in-air that the device is NAK'ing packets by not incrementing the packet counter. Approximately every second packet is NAK'ed. This is usually a sign that the device cannot offload the incoming data fast enough.

         

      This results in appox. half the speed that should be possible yielding ~15KB/sec instead of the expected ~30KB/sec.

         

      The physical offloading of the packets to the UART does not seem to be the problem, as it never spins in the BLE_HAL_Uart_SpiUartWriteTxData() function, meaning that it never waits for room in the UART TX buffer.

         

      However, one thing seems odd. BLE_HAL_Uart_SpiUartPutArray() is always called with 1 byte which seems inefficient. Does the whole system generate events based on 1 byte? Seems odd. I cannot see the full call stack however, as everything below is closed-source.

         

      Anyway, is this a bug in the software or a limitation in the chip? If it is the latter it would be a pitty as Data Packet Length extensions cannot be fully utilized then.

         

      Thanks,

         

      /pedro