cancel
Showing results for 
Search instead for 
Did you mean: 

USB Superspeed Peripherals

ViKu_2048416
New Contributor II

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

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

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
ViKu_2048416
New Contributor II

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
New Contributor II

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

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
New Contributor II

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
New Contributor II

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

0 Likes
Hemanth
Moderator
Moderator

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
ViKu_2048416
New Contributor II

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