As you said, the API document mentions "Please note that API calls that require a mutex get or equivalent cannot be directly called from this callback function." This means that an API, in which "mutex get" (function) is used, cannot be called directly in the Callback function.
In your case, the callback function uses CyU3PDmaMultiChannelSetWrapUp & CyU3PDebugPrint() APIs and both of them call "mutex get" function in their implementation. This means you can not use CyU3PDmaMultiChannelSetWrapUp & CyU3PDebugPrint() API call in call back function if you are using CyU3PGpifRegisterSMIntrCallback().
Thanks for your reply!
I referred the AN75779 example which use the CyU3PDmaSocketSetWrapUp() rather than CyU3PDmaMultiChannelSetWrapUp() inside the CyU3PGpifRegisterSMIntrCallback.
It works! Thank you!
Now, I want to clarify 2 things:
1.it means that the CyU3PDmaSocketSetWrapUp() is NOT a "mutex get" function, so it's valid inside the CyU3PGpifRegisterSMIntrCallback?
2.I cannot find any document to indicate the CyU3PDmaMultiChannelSetWrapUp() & CyU3PDebugPrint() is a "mutex get" function. How to recognize whether a function is a "mutex get" or not?
Thanks a lot!
1) Yes, CyU3PDmaSocketSetWrapUp() does not use mutexget() function in it's implementation and can be used with CyU3PGpifRegisterSMIntrCallback.
2) To know an API's implementation, you can refer to the source files in the SDK
Path: C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\firmware\fx3_sdk_1_3_4_src\fx3_sdk_1_3_4_src\FX3