How to program an Interrupt to tell if the ADV7182/ADV728x has locked or lost locked

Document created by Rob.Analog on Aug 28, 2013Last modified by Rob.Analog on Jul 9, 2014
Version 4Show Document
  • View in full screen mode

This FAQ applies to the ADV7182, ADV7280, ADV7280-M. ADV7281, ADV7281-M, ADV7281-MA, ADV7282 and ADV7282-M models. These models will be referred to with the abbreviation ADV7182/ADV782x in this FAQ.


The INTRQ interrupt pin on the ADV7182/ADV728x can be programmed to change state under a number of different conditions. This can be a useful tool to detect issues with the inputted analog video.


The INTRQ pin can be programmed to drive high or low when activated.


The following example will describe how to set the interrupt pin to go from a high state to a low state when the ADV7182/ADV728x has locked or lost lock to the inputted video. The interrupt will remain low until cleared. These writes should be performed after an ADI recommended script has been performed. ADI recommended scripts can be found here: ADV728x Design Support files


The following steps are needed to program the Interrupt:

1) Enter the Interrupt/VDP Map Map by setting register 0x0E bit [6:5] to 01 (binary)

2) Program the interrupt to drive low when active and to stay low until cleared: In register 0x40 write 0xD1

3) Unmask (i.e. activate) the lock interrupt: Set register 0x44 bit[0] to 1.

4) Unmask (i.e. activate) the unlock interrupt: Set register 0x44 bit[1] to 1.

5) Clear the interrupt. set register 0x43 bits [1:0] to 1.

6) Exit the Interrupt/VDP Map: set register 0x0E bit [6:5] to 00 (binary)


See script below:

Read/WriteDevice AddressRegister Address ValueComment
Write0x420x0E0x20Enter Interrupt/VDP Map
Write0x420x400xD1INTRQ pin drives low when active and remains low until interrupt is cleared
Write0x420x440x03Active SD_LOCK and SD_UNLOCK interrupts
Write0x420x430x03Clear SD_LOCK and SD_UNLOCK interrupts
Write0x420x0E0x00Re-enter main map



The ADV7182 has now been programmed to drive the INTRQ pin high under normal operation. When the ADV7182 locked to a video source or looses video lock, the INTRQ pin will drive low and remain low until the interrupt has been cleared.


How to clear the interrupt:

Read/WriteDevice AddressRegister AddressValueComment
Write0x420x0E0x20Enter Interrupt/VDP Map
Write0x420x430x03Clear SD_LOCK and SD_UNLOCK interrupts
Write0x420x0E0x00Re-enter main map


The INTRQ pin will then drive high and will only drive low on the next loss of video lock.



When the INTRQ pin drives low you need to be able to tell if an lock or lost lock event has occurred. You should perform a read of register 0x10 in the User Map. This register contains the IN_LOCK [bit 0] and LOST_LOCK [bit 1] bits. These bit can be used to determine if a lock or lost lock event has occurred. See this thread for more information