Search found 144 matches

by dsteinwe
Tue Mar 26, 2024 1:05 pm
Forum: Development Tools and Programming
Topic: bypass parallel usage rule in XC
Replies: 3
Views: 3779

Re: bypass parallel usage rule in XC

Thanks for the reference to the document. Have a nice day!
by dsteinwe
Fri Mar 22, 2024 4:54 pm
Forum: Development Tools and Programming
Topic: Sporadic USB protocol error on calling XUD_GetBuffer()
Replies: 11
Views: 84850

Re: Sporadic USB protocol error on calling XUD_GetBuffer()

Finally, I have solved my problem. My Project had used a distributed interface across multiple threads to share global states and some functionality. I have refactored this part, using this module: https://github.com/xcore/sc_util/tree/m ... ule_xc_ptr. Now everything works fine.
by dsteinwe
Thu Mar 14, 2024 5:48 pm
Forum: Development Tools and Programming
Topic: Sporadic USB protocol error on calling XUD_GetBuffer()
Replies: 11
Views: 84850

Re: Sporadic USB protocol error on calling XUD_GetBuffer()

It is not the variable but the timer event, that causes a control token for the ep0 channel. That should never happen! Currently, I can reproduce this bug with 100% guarantee. The (pseudo) code causing the bug, is: function task(...) { // ... timer test_timer; unsigned test_enabled = 1; unsigned tes...
by dsteinwe
Wed Mar 13, 2024 8:09 pm
Forum: Development Tools and Programming
Topic: Sporadic USB protocol error on calling XUD_GetBuffer()
Replies: 11
Views: 84850

Re: Sporadic USB protocol error on calling XUD_GetBuffer()

I have an update: it seems that the EP0 channel is being changed by another thread. The other thread doesn't have access to EP0, but when I set a variable within a timer event handler to a special value in the other thread at a given time interval, it seems like a control token is added to the EP0 c...
by dsteinwe
Wed Mar 06, 2024 5:51 pm
Forum: Development Tools and Programming
Topic: Sporadic USB protocol error on calling XUD_GetBuffer()
Replies: 11
Views: 84850

Re: Sporadic USB protocol error on calling XUD_GetBuffer()

Today, I have done some tests again. The results are very odd. I have started ubuntu 22.04 live on an old laptop. Then, I have installed fwupd (dfu-tool) und dfu-util. Both tools finish the dfu without any problems. Then I have upgraded libusb from 1.0.25 to 1.0.26. Again, both tools work fine. Then...
by dsteinwe
Wed Feb 14, 2024 3:19 pm
Forum: Development Tools and Programming
Topic: Sporadic USB protocol error on calling XUD_GetBuffer()
Replies: 11
Views: 84850

Re: Sporadic USB protocol error on calling XUD_GetBuffer()

I'm guessing the error is caused by the host. I don't think it's caused by the dfu-util tool itself, but by libusb, that is used by the tool. With libusb 1.0.26, the DFU seems to work in most cases. With libusb 1.0.25, it seems almost impossible to end the DFU. These observations are not 100% tested...
by dsteinwe
Fri Feb 09, 2024 1:49 pm
Forum: Development Tools and Programming
Topic: Sporadic USB protocol error on calling XUD_GetBuffer()
Replies: 11
Views: 84850

Re: Sporadic USB protocol error on calling XUD_GetBuffer()

Finally, I have located the line in XUD_EpFunctions.c , that locks the thread. It is the line in the function XUD_GetBuffer_Finish : asm volatile("testct %0, res[%1]" : "=r"(isReset) : "r"(c)); Because the log output wasn't appropriated (read above), I have found anothe...
by dsteinwe
Fri Feb 02, 2024 5:43 pm
Forum: Development Tools and Programming
Topic: Sporadic USB protocol error on calling XUD_GetBuffer()
Replies: 11
Views: 84850

Re: Sporadic USB protocol error on calling XUD_GetBuffer()

I have also problems with the version 2.2.0. The difference is, when the dfu problem happens. When I use 2.2.4, I can reproduce the problem after starting the firmware about 4-18s. Mostly at 4-5s. When I use 2.2.0, I have a problem with dfu after the firmware is running more than one hour. Maybe, th...
by dsteinwe
Thu Feb 01, 2024 1:06 pm
Forum: Development Tools and Programming
Topic: bypass parallel usage rule in XC
Replies: 3
Views: 3779

Re: bypass parallel usage rule in XC

Hello, I have just thought about volatile keyword for variables and found this thread. Until now, I wasn't aware that a memory barrier is created by the compiler. Actually, this is not surprising when you think about it. Since I want to understand your assembly code better: Can you tell me where thi...
by dsteinwe
Tue Jan 30, 2024 11:46 am
Forum: Development Tools and Programming
Topic: Sporadic USB protocol error on calling XUD_GetBuffer()
Replies: 11
Views: 84850

Re: Sporadic USB protocol error on calling XUD_GetBuffer()

It's not a problem of the responsiveness of my dfu implementation. The requests are always answered below 80us. AFAIK, the limit was about 60ms per request. I have also commented out all my dfu code. The problem still occurs. Very strange ... At the moment, I use 2.2.0 instead of 2.2.4 until I have ...