AnsweredAssumed Answered

adi_flag service and ADI_FLAG_TRIGGER_BOTH_EDGES event

Question asked by vix on Nov 17, 2009
Latest reply on Dec 17, 2009 by PrasanthR

I read the VisualDSP++ 5.0 Device Drivers and System Services Manual for Blackfin processor and I tried to write a simple program that installs a callback on ADI_FLAG_PF8 ADI_FLAG_TRIGGER_BOTH_EDGES event.

The problem is that the callback only returns the ADI_FLAG_EVENT_CALLBACK event, both for rising and falling event.

I need to know if the callback has been invoked by a rising edge or a falling adge, but I don't know what to do, so I thought reading the ADI_FLAG_PF8 physical level (not logical one) inside the callback. I'm not completely satisfied about this way, but I don't have other ideas..

If I understood the documentation, the adi_flag_Sense() function returns the logical level, and as a matter of fact I noticed that when I use it inside the callback it always returns TRUE.

I explicitly read the port IO register (*pPORTFIO & PF8) but it always returns TRUE, even if the PF8 pin is physically LOW!!!


Could someone help me?


PS: using BF527 and VisualDSP++ 5.0 Update 6


Thanks in advance


Messaggio modificato da vix