I am trying to read a value form a barcode scan using UART and the RX pin on the CY8CKIT-042-BLE (PSoC 4 BLE). The following is my code (modified from the HID Keyboard Example, as the goal is to send the value of the scan to a device, emulating a keyboard). I am unable to get any results from the scan to output on a PuTTY terminal. Any ideas on what I am doing wrong?
#if (DEBUG_UART_ENABLED == ENABLED)
#endif /* (DEBUG_UART_ENABLED == ENABLED) */
DBG_PRINTF("BLE HID Keyboard Example Project \r\n");
/* Start CYBLE component and register generic event handler */
#if (BAS_MEASURE_ENABLE != 0)
#endif /* BAS_MEASURE_ENABLE != 0 */
/* CyBle_ProcessEvents() allows BLE stack to process pending events */
/* To achieve low power in the device */
rxData = UART_DEB_UartGetChar();
Thanks in advance,
If you didn't setup your UART for interrupting the low power modes, then it won't wake up upon receiving UART data.
As a test, try commenting out the LowPowerImplementation(); and see if the unit starts echoing the data properly, if so, then it is the lower power mode not being setup correctly to allow UART wakeup/checking.