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