GPIF callback function is never called | Cypress Semiconductor
GPIF callback function is never called
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.