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

USB superspeed peripherals Forum Discussions

ViKu_2048416
Level 4
Level 4
50 sign-ins 25 replies posted 25 sign-ins

Hi,

I am facing an issue with SDK 1.3.4 while using multi thread. I have ported a project source to SDK 1.3.4 that I already used in SDK 1.3.1. I have not changed anything in my source code, I just build the source with 1.3.4. 

In firmware we are just getting commands from HID call back, once I received command in HID call back I will set a event and in another thread I will wait for that event once I received the event I will perform my things. This simple concept is not working if I build my project in SDK 1.3.3 or SDK 1.3.4. Please help us to solve this issue at earliest.

Thanks and Regards,

Vignesh Kumar R.

 

 

0 Likes
1 Solution
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

We have not seen any problem with the events as described. The problem can be triggered due to other parts/ API calls in the code.

Hemanth

View solution in original post

0 Likes
8 Replies
JayakrishnaT_76
Moderator
Moderator
Moderator
First question asked 1000 replies posted 750 replies posted

Hello Vignesh,

Please let us know if you can share the firmware for us to check at our end.

Please check if the APIs CyU3PEventSet() and CyU3PEventGet() returned success or not. Also, please let us know if you have used the API CyU3PThreadRelinquish() in your project. If not, please try using this API and let us know if it helps. Please refer to the FX3 API guide to understand more details about this API.

Best Regards,
Jayakrishna
0 Likes

Hi Krishna,

After analyzing the CyU3PEventSet() and CyU3PEventGet() return status, both returns success and works as excepted but it takes more time (2 to 3 sec) to get the event which was set using  CyU3PEventSet() API in another API. But this is not the case with SDK 1.3.1 version also I have not changed anything in the code that was build in SDK 1.3.1. Can you please explain what is the change that was done in SDK 1.3.3 and 1.3.4 compare to SDK 1.3.1? Also please guide us to solve this issue.

Regards,

Vignesh Kumar R.

0 Likes
kir_4703346
Level 1
Level 1
10 sign-ins 5 replies posted 5 sign-ins

Used CyU3PThreadRelinquish() on both threads and tried changing the priority of threads too, CyU3PEventSet() and CyU3PEventGet()  returned success. Still facing the same issue.

with single thread also we are facing issue with get/set event.  

0 Likes
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

Hi,

Can you please attach your project?

You mentioned CyU3PEventGet() was success. Does this mean that you got some other event but not what you are looking (which is set in setup callback)?

Regards,

Hemanth
0 Likes
kir_4703346
Level 1
Level 1
10 sign-ins 5 replies posted 5 sign-ins

Once event is set where CyU3EventSet() returns success and in another thread used CyU3EventGet()  API, will handle the event accordingly. Here both Get and Set event gets success but there is delay upto 3 seconds approx. This issue occurs with  1.3.3 or 1.3.4 SDK.  We tried to change priority of threads and used CyU3PThreadRelinquish() API to resolve if any problem with scheduling.  Issue not resolved yet

0 Likes
kir_4703346
Level 1
Level 1
10 sign-ins 5 replies posted 5 sign-ins

Expecting reply if any... Please help us to overcome this issue at the earliest 

0 Likes
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

We have not seen any problem with the events as described. The problem can be triggered due to other parts/ API calls in the code.

Hemanth
0 Likes

Dear Hemanth,

Sorry for the delayed response, that issue was solved by removing all debug prints used in the threads. We yet to explore all other functionalities in SDK 1.3.3. If we have any doubts will let you know.

Best Regards,

Vignesh Kumar R.

 

0 Likes