CYW20719 PUART Communication

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.
rjmcc
Level 1
Level 1
First like received 10 sign-ins 5 sign-ins

Hi,

I am trying to develop a PUART-based file transfer protocol for the CYW20719B2 eval board, that will eventually be a part of a bigger project. I am working on the connection protocol in a smaller project with just the wired transfer. During connection, a custom desktop Java program sends a 13 byte packet over PUART to the board, then the board reads it and sends a response based on whether the data in the packet is correct. However, the board is receiving data different from what the computer sends.

In particular, the computer is sending these 13 bytes (all bytes are in hex)

10 00 00 01 02 03 04 05 06 07 08 0F 0F

But the board seems to receive the bytes

10 00 00 01 51 51 51 51 51 51 51 51 51

The last 9 bytes are always the same as each other, but which byte they are changes as I attempt to send the original packet multiple times. I currently have the baud rate set to 115200, and if I increase it the number of junk bytes at the end decreases, but they still don't all go away. I will include the files for the java program and the firmware. Let me know if there is a configuration step I missed somewhere or if this issue lies elsewhere.

 

Thanks,

Ryan McCubbin

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
DheerajPK_41
Moderator
Moderator
Moderator
750 replies posted 500 likes received 500 replies posted

Hi,

Could you please add wiced_hal_puart_set_watermark_level(13); in initializePUART() and try again. Please try with the attached cource files. 

Thanks,

-Dheeraj.P.K

View solution in original post

0 Likes
4 Replies
DheerajPK_41
Moderator
Moderator
Moderator
750 replies posted 500 likes received 500 replies posted

Hi,

let me try to test it and get back to you.

Thanks,

-Dheeraj.p.K

0 Likes
lock attach
Attachments are accessible only for community members.
DheerajPK_41
Moderator
Moderator
Moderator
750 replies posted 500 likes received 500 replies posted

Hi,

Could you please add wiced_hal_puart_set_watermark_level(13); in initializePUART() and try again. Please try with the attached cource files. 

Thanks,

-Dheeraj.P.K

0 Likes

It looks like that worked. Does that watermark level need to always be set to the length of an incoming packet?

DheerajPK_41
Moderator
Moderator
Moderator
750 replies posted 500 likes received 500 replies posted

You can set the watermark level based on when you need to receive interruption. If you want to receive an interrupt on each byte, you can set the watermark level to 1. Here you can set to 13.

0 Likes