Event is not getting triggered/Set

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

cross mob
PrRe_3492461
Level 4
Level 4
First like received 50 sign-ins 50 replies posted

Hello cypress community,

I'm using Fx3 for my product development.

I have 2 versions of Src Codes : 1. with Library 1.3.3 version, 2 with library 1.3.4 version

I've a total of 3 threads running

1. USB Rx thread -> which will be triggered when respective USBevent is set when USB bulk out data is received .

2. Timer thread

3. GPIO therad that will be awake when an GPIOevent is set when respective GPIO gets triggered.

 

Now My sequence goes like this -> I send USB data on Bulk-out endpoint so that some events will get triggered  and threads wokeup as expected and the data will be handled as required. I can do this exercise seamlessly without any issues using 1.3.3 library, but If I use 1.3.4 Library source code I see that USB Rx event is not being set and therefore Fx3 is not able to get any data over BULK-out endpoint.

This weird behavior happens everytime when  I use 1.3.4 library, and try to send data continuously within ~1 sec frequency.

Is this expected (i believe not), Can I know the differences with two libraries that can cause this sort of behavior. I have gone through release notes of 1.3.4 library but unable to find any relevant information.

I say that events are not triggered based on the logs that I implemented in FW.

will be waiting for your responses.

Thanks and regards,
Pranay.

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

Hi Pranay,

1. Please check return status of CyU3PEventSet() in CyFxIntrSrcSinkDmaCallback() and check if it is failing when you see the issue.

2.  In the CyFxIntrSrcSinkDmaCallback, you use the log - DEBUG_LOG(DBG1, 0xEB, 0x00);

Instead of hardcoding to 0xEB, please make it as a variable and increment the variable value for each log? Similarly, in USB_DataRxHandlerThread_Entry, as soon as CyU3PEventGet is successful (irrespective of the if-condition), perform the logging with a variable incrementing each time.

This way it can be clear that event is really set and not got in the thread. 

3.  We have not seen such issue before. 

Please try to share a firmware that we can test on FX3 explorer kit for reproducing the issue.

Regards,

Hemanth

View solution in original post

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

Hi Pranay,

I think you are setting an event after you see consumer event in the dma callback associated to the channel corresponding to OUT endpoint. Is this correct?

Can you share your project source code?

Are you using CyU3PDebugprint calls anywhere in your firmware? If yes, can you comment all and check again?

Regards,

Hemanth
0 Likes

Hi Hemanth,

I'm not using CyU3PDebugprint in my source code, I've implemented a logging mechanism where a unique code word is copied in to a buffer and will be read /cleared whenever required.

I'm setting a event whenever I see a producer event in dma callback function, I also tried calling the required function without setting the event aswell but of no use, issue is seen.

I think it's better If you can share me your mail ID, I can share src code over there.

--Pranay.

0 Likes

Hi Hemanth,

I have relied with source code to your mail.

Any updates regarding the issue. Its been days were waiting for your inputs.

Can you please look into this ASAP.

 

Thanks and regards,

Pranay.

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

Hi Pranay,

1. Please check return status of CyU3PEventSet() in CyFxIntrSrcSinkDmaCallback() and check if it is failing when you see the issue.

2.  In the CyFxIntrSrcSinkDmaCallback, you use the log - DEBUG_LOG(DBG1, 0xEB, 0x00);

Instead of hardcoding to 0xEB, please make it as a variable and increment the variable value for each log? Similarly, in USB_DataRxHandlerThread_Entry, as soon as CyU3PEventGet is successful (irrespective of the if-condition), perform the logging with a variable incrementing each time.

This way it can be clear that event is really set and not got in the thread. 

3.  We have not seen such issue before. 

Please try to share a firmware that we can test on FX3 explorer kit for reproducing the issue.

Regards,

Hemanth
0 Likes