Giovanni wrote:HI, could you try to assess the maximum size before the problem is triggered, this could be an hint for me. I am convinced that there were several minor defects in that implementation, I found two already this could be the third.
Giovanni
I concluded that the problem does not have a clear dependence on the size of the transmitted data. For example, It depends on the setting of the depth buffer 'SERIAL_USB_BUFFERS_SIZE'. Also, the repetition frequency of the error is random. But the main thing is that the work is stable when writing / reading data size is smaller than the expected device.
For example, if device wait 64 bytes of data:
Code: Select all
rd = chnReadTimeout(&SDU1, &BUFFER[0], 64, MS2ST(10));
that the work is stable if host writes from 1 to 63 bytes data, and non stable if 64 or more. And the greater the amount of data, the more likely a bug.
If I change the 'SERIAL_USB_BUFFERS_SIZE' from 64 to 256, the 64 bytes writes works long period (100'000 packets I tested), but 128 bytes writes not stable. I can't test all sizes because frequency of the errors is random. I wrote new test program for PC. It writes packets in loop with various sizes. But it can't help because errors can occur even after 100,000 cycles, and it requires a large quantity of the time.
In general there is an error, but clearly list the conditions under which it occurs failed. I am sorry.
I just can not understand one thing: this error occurs only me or anyone else just does not care about it. Has anyone else tried to reproduce this error?