You are here

GPIF callback function is never called | Cypress Semiconductor

GPIF callback function is never called

Summary: 3 Replies, Latest post by mvillasana_1497601 on 18 Jul 2016 08:48 AM PDT
Verified Answers: 0
Last post
Log in to post new comments.
Bregalad's picture
8 posts

 GPIF callback is never called.


I am writing a Fx3 firmware whose functionality is very similar to the "GPIF2USB" example, however, I also need to reset a counter within the microcontroller whenever an input pin is active (for synchronisation). What I do is that I go to a special GPIF state whenever this pin is active, and use the INTR_CPU even in this state, which is supposed to trigger a GPIF callback.


However, my GPIF callback function is never called. I tried to register it using both the CyU3PGpifRegisterCallback() and CyU3PGpifRegisterSMIntrCallback() functions, but both have no effect at all. I tried to use those functions just like in the Cx3_examples because those are the only ones that uses this functionality in the firmware examples. I register the callback function between ca call to CyU3PGpifLoad and CyU3PGpifMStart, and surround the registering with two CyU3PThreadsSleep(50) calls.


Is there other things that should be looked after in order to use GPIF callbacks? Do I have to enable the interrupt manually somewhere else? Thanks.


PS: Is there a way to access the GPIF data counter from within the microcontroller? I'm pretty sure that's not possible, but if it is possible, I'm interested, because it might be a good work arround as another way of synchronization that does not requires interrupts.

mady's picture
Cypress Employee
964 posts


How are you verifying whether the callback is triggered or not? Are you using UART Debug Prints?

please note that UART Debug Prints may not work inside GPIF INterrupt callbacks.


- Madhu Sudhan

mvillasana_1497601's picture
4 posts

Hello Madhu, 

How can we know if the interrupt callback committed a buffer?

Thank you,

Miguel Villasana

Bregalad's picture
8 posts

 My bad, the GPIF callback indeed is called. I assumed the problem to be where it wasn't. Thank you very much!

Log in to post new comments.