psoc 4 not offloading data fast enough to application.

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
PeTy_2173191
Level 2
Level 2

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

0 Likes
2 Replies
PeTy_2173191
Level 2
Level 2

I have also disabled all low power modes, and disabled sleep, so the CPU runs as fast as possible.

0 Likes
himam_31
Employee
Employee
50 likes received 25 likes received 10 likes received

Can you attach the project?

   

 

   

Thanks,

   

Hima

0 Likes