help on puart communication

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

cross mob
prvoc_2175136
Level 1
Level 1

Hello,

i am facing strange problem with puart read operation in Wiced Smart SDK (sometimes its receive proper value and sometimes wrong value)

is there any proper documentation which tells step by step how the puart communication works in wiced Smart SDK(i m using the 20737 TAG for my testing)

Thanks

0 Likes
8 Replies
BoonT_56
Employee
Employee
500 likes received 250 likes received 100 likes received

Within the SDK, under "Doc" directory, look out for a Smart-HW-interface pdf document. It has the details.

0 Likes

thanks, for reply at last i have got reply for one of my most.

i have followed the same document and made sample code for uart communication but i face some problem with uart read operation, write operation works fine. Please let me know is there any changes which i have missed.

FYI :

i have made the following setup to test for uart communication.

1) Used 2 TAG boards

2) One board my sending 8 bytes of data on periodic events for every 7sec

3) Second board i m reading the data using puart

(both boards I have connected through uart)

Most of the time(98%) my uart communication never works as i expected.it is able to receive all the 8bytes.

But those values are not correct.

i am struggling to setup this basic uart communication for more than 2days.

Thanks

0 Likes

Hi praveen,

For a tested, working sample app on PUART-PUART communication between two Tag boards, please see my posting below:

Connecting an external board to the BCM2073X via the PUART

This post, however, does not incorporate use of the HCI UART. This way you can isolate the problem to the HCI UART if you still run into problems.

Jacob

0 Likes

Hello jakewtorres

this post is also no use to me. with this example code i am seeing the same behavior.

on uart read side i m able to get all the characters which is sent from other tag.

but the main problem is each and every time the read value is not matching with the sent value.

my strong believe is some more settings, i might be missing which is not documented properly.

kindly help me in resolving the problem.

0 Likes

I think this thread is more relevant as I have seen a lot of users struggle with missing or incorrect bytes: PUART Receive incorrect bytes

0 Likes
JacobT_81
Employee
Employee
250 replies posted 100 replies posted 50 replies posted

The sample code is PUART to PUART sending single bytes on the click of a button. Did you isolate the problem you're having to the PUART (I believe you're using HCI UART to PUART?)? If so, you may be running into problems with use of the FIFO, since my example code doesn't come close to testing the boundaries of the FIFO.

I believe that if you configured your PUART in the same manner as the test code, your problems are likely stemming from the HCI UART.

Jacob

0 Likes

I'm confused regarding the references to the HCI UART.  The HCI UART can ONLY be used to program the device, no exceptions.

To do this, you will need to use the SDK or the command line tools.

The PUART will not possess the needed protocol to talk to the HCI UART.

0 Likes
JacobT_81
Employee
Employee
250 replies posted 100 replies posted 50 replies posted

It seems I misread the second comment. I was under the impression that UART was referring to the HCI UART, versus the PUART. 

If the communication is PUART to PUART, the test code should have worked. Was the code successful in sending single bytes exactly as its configured? Or did it stop working upon some alteration? If the code never worked perhaps there's a hardware problem.

Jacob

0 Likes