UART data transfer

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

cross mob
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Hi.

   

I am new in psoc. I want to transfer data to other board through UART of PSOC 4. Below I uploaded my code. At the start I only written program for the display sensor data over the TERATERM that time it is giving output properly over TERATERM but then in that I used BLE Profile to get commands from the mobile and now I am getting no output at TERATERM. If you don't mind the please help me. 

0 Likes
1 Solution
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

OK, too many assumptions and misleads due to language barrier (I am not natively English).

   

Your line

   

            if(UART_TX_STS_FIFO_EMPTY==1u)

   


will fail.

   

UART_TX_STS_FIFO_EMPTY is a constant != 1 so the if will always fail.

   

UART_PutString() is blocking and waits for the buffer to be free, so there would be no need to wait for an empty UART. If you want to wait better use the appropriate API to get the status and AND (&) the result with UART_TX_STS_FIFO_EMPTY.

   

 

   

Bob

View solution in original post

0 Likes
6 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

When you look into the schematics of the BLE Pioneer board you will see that the UART-Tx pin is now on P1_4. When you change that, the USB-UART bridge will work again.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Sir sorry to bother you. now  I connected Pin P0.5( UART TX) to the pin P1.4 but still I am not getting required output.

   

and also sir In my one of serial data transfer project i connected pin P0.5 (UART TX) to pin P1.5 the it was giving output but now I added BLE then output is gone  .

0 Likes
Anonymous
Not applicable

Thank you sir

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

OK, too many assumptions and misleads due to language barrier (I am not natively English).

   

Your line

   

            if(UART_TX_STS_FIFO_EMPTY==1u)

   


will fail.

   

UART_TX_STS_FIFO_EMPTY is a constant != 1 so the if will always fail.

   

UART_PutString() is blocking and waits for the buffer to be free, so there would be no need to wait for an empty UART. If you want to wait better use the appropriate API to get the status and AND (&) the result with UART_TX_STS_FIFO_EMPTY.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Hi,

   

Sorry to bother you again. sir I want to to transfer many motion sensors data one by one using UART of PSOC 4 to the UART of other board. So please guide me for this....

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

You have to write a "Protocol" that assumes a controlled data flow. When you transfer printable ASCII characters only you need a conversion on both sides, but you are able to work with "Message Blocks" These blocks (as a suggestion only) consist of

   

Sensor Number ('00" to "99"

   

Sensor Data (fixed number of digits)

   

Message delimiter (\n or \r)

   

 

   

Bob

0 Likes