# CTRDG_VerifyAgbFlash

## Syntax

      #include <nitro/ctrdg.h>

      u32 CTRDG_VerifyAgbFlash(u16 sec_num, u8* src, u32 size);

  Corresponding AGB function: `u32 VerifyFlash(u16 secNo,u8 *src,u32 size)`

## Arguments

sec_num | Destination flash sector number.
src | Source address.
size | Verify size in bytes.

## Return Values

Returns zero if verification succeeds. Returns the error address on the device side if verification fails.

## Description

Verifies data of the size specified size beginning from the address specified in src against the data in sec_num.
This function returns zero if verification ends correctly; otherwise, it returns the address where the verification error occurs.

The access cycle setting is created in the function and does not need to be set in advance.

Note: The cartridge bus is locked for a set period by this function.

Note that the AGB backup device cannot be accessed normally with IS-NITRO-DEBUGGER version 1.66 or earlier.

## See Also

`CTRDG_VerifyAgbFlashAsync`
`CTRDG_WriteAndVerifyAgbFlash`
`CTRDG_WriteAndVerifyAgbFlashAsync`

## Revision History

2006/05/25 Added a description that the AGB backup device cannot be accessed normally with IS-NITRO-DEBUGGER version 1.66 or earlier.
2006/04/07 Initial version.

CONFIDENTIAL