Newbie Question - BLE Serial Communication | Cypress Semiconductor
Newbie Question - BLE Serial Communication
I am using your example code UART_to_BLE_central and UART_To_BLE_peripheral to test serial communication between two devices CY8C4248LQI-BL483 (Peripheral) and the PRoc Dongle (Central). I am trying to find the best insertion point for our code. Data will be transmitted from the central device to the peripheral. Instead of being transmitted out through the UART on the peripheral device, we will be collecting the data to be sent out to a display instead. So on the Peripheral side, the serial transmission touches HandleUartRxTraffic in app_UART.c which points to UART_SpiUartPutArray in the UART_SPI_UART.c file. This in turn touches UART_SpiUartWriteTxData in the same file.
What I am noticing is when I put a breakpoint on any one of these routines and start typing data in from the Central device via Tera Term, I will break multiple times on the same routine for a single character typed. I can set conditional break points to ensure I am getting all the characters which I transmitted ( in this case, at least I know how many characters to receive); However, I am not certain how to handle this in my code. So the questions are, why am I invoking the same function over and over again for a single piece of data, and how can I get around this so I know each piece of data sent is unique?
Clearly this is doable since the receive terminal does not duplicate characters, though it's a mystery at this point why it does not.