AnsweredAssumed Answered

ISR_Semaphore vs callback VDK

Question asked by Tommy on Mar 24, 2010
Latest reply on Apr 6, 2010 by PrasanthR

ADI Support,

 

I have a basic question to VDK. I have an external device connected to the BF561 asynch. Memory bank3. I use this device for writing information via the asychr. EBUI memory bank3 to this device. The device is generating Interrupts signals to the BF561 when it is ready for receive this data. The interrupt from this device is also connected to an GPIO interrupt PIN (PF8) at the BF561. This signal is generated with a period of 60 Hz from the external device.  For this I have written a callback routine for processing the GPIO interrupt. When receiving the interrupt the callback posts an ISR with VDK_C_ISR_PostSemaphore(.....). At one thread I am waiting for this interrupt with VDK_PendSemaphore(...). The other thread must only write than data when this first the signal and also data for writing are available otherwise not. I am not 100%sure what if this is the correct way. The problem is the Semaphore counter increases until it reaches its maximum value when there are not data for writing. My question is how can the VDK_C_ISR_PostSemaphore counter be cleared to wait for the next interrupt and timeslot when the external device is available for receiving. Please advise if you may can suggest a better solution!

 

Please advise!

 

Regards

Tommy

Outcomes