cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC Creator & Designer Software

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
Reply
1 Solution
Esteemed Contributor II

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
Reply
6 Replies
Esteemed Contributor II

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
Reply
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
Reply
Anonymous
Not applicable

Thank you sir

0 Likes
Reply
Esteemed Contributor II

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
Reply
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
Reply
Esteemed Contributor II

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
Reply