How to set readLoopCnt and writeLoopCnt value [CyU3PUartSetTimeout] ?

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

cross mob
usb_dev
Level 1
Level 1
First like given 5 sign-ins First reply posted

When I use cyfxuartlpregmode.c to test UART send and receive, I found if I do not use "CyU3PUartSetTimeout (1, 50000);" :

 

 

1. the SuperSpeed Explorer Kit still works but slower (ok to me)

2. the program should send "VRS" and receive "20181114" about two times a second, but sometimes, it loses "1114" (about 200 - 3000 times, it will happen once)

So, my question is, why did this happen? and more importantly, how to choose the readLoopCnt and writeLoopCnt value?

 

-------------------------------------------------

uartConfig.baudRate = CY_U3P_UART_BAUDRATE_9600;

uartConfig.isDma = CyFalse; 

 

io_cfg.isDQ32Bit = CyTrue;

io_cfg.lppMode = CY_U3P_IO_MATRIX_LPP_DEFAULT;

-------------------------------------------------

 

0 Likes
1 Solution
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello,

You can refer to the FX3 API guide in the FX3 SDK, to understand the working of this API. We suggest keeping the timeout value low.

Regards,
Rashi

View solution in original post

4 Replies
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello,

Please refer to this thread  Solved: Re: FX3 UART Problems - Infineon Developer Community with similar issue 

Regards,
Rashi
0 Likes

Hi, Thanks for the reply, I found that topic before. What I really want  to know is:

there are lots of values between 1 , 50000,   0xFFFFFFFF for both read and write param, and the read and write process is really a small part of the whole project

So I'd like to know  more detail about how to pick a "right" value to avoid any other potential problems

Is there any document I can read?

0 Likes
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello,

You can refer to the FX3 API guide in the FX3 SDK, to understand the working of this API. We suggest keeping the timeout value low.

Regards,
Rashi
usb_dev
Level 1
Level 1
First like given 5 sign-ins First reply posted

Thanks

0 Likes