- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I send command code '~^L' through BLE (Bluetooth) and I have programmed using PSoc Creator 4 to output it into UART ---
UART_UartPutChar(126); // ~
CyDelay(10);
UART_UartPutChar('^'); // ^
CyDelay(10);
UART_UartPutChar(76); // L
And I find that this value detected (tested using HyperTerminal).
However, I find that my ARM processor (receiving the data) behaving erratically. Most of the times it functions properly, but frequently the command does not perform. WHEN I SEPERATELY SEND THE COMMAND FROM HYPERTERMINAL IT WORKS WELL...
Could the data get corrupted ???
Vittal
- Labels:
-
PSoC 4 MCU
- Tags:
- putchar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello.
Be aware that CyDelay() is implemented as a blocking function. That means, nothing else runs when CyDelay() is running. If you have used the polling method to read UART, you can lose receive data when CyDelay() runs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Vittal,
I don't know your specific application but remember that BLE is wireless. This means that the 'air', which is the 'wire' for BLE, is very subject to interference from the universe. Use you are using a BLE connection I would recommend an end-to-end messaging type that makes sure the transmission of each character is received before sending the next character.
This erratic behavior may be because characters are being missed due to interference in the environment or the signa l is too weak (transmitter too far away).
"Engineering is an Art. The Art of Compromise."