#include <nitro/ctrdg.h>
u16 CTRDG_EraseAgbFlashSector(u16 sec_num);
Corresponding AGB function: u16 (*EraseFlashSector)(u16 secNo)
| sec_num | Target flash sector number |
Returns 0 if the erasure succeeds. Returns a non-zero value if it fails.
Erases the data within the sector with the specified target sector number. Normally, this routine does not need to be called before writing because it is called inside the writing routine. This function returns an error if the target sector number is out of range.
The access cycle setting does not need to be set beforehand because it is created inside the function. In addition, the OS_InitTick function must be called before this function because clock ticks are used by this function to measure timeouts.
Note: All interrupts are disabled inside this function and the cartridge bus is locked for a set period. In particular, when this function is called, do not use DMA that starts automatically during direct sound and V/H blank synchronization, display synchronization, cartridge request, etc.
Note that the AGB backup device cannot be accessed normally with version IS-NITRO-DEBUGGER 1.66 or earlier.
CTRDG_EraseAgbFlashChip, CTRDG_EraseAgbFlashChipAsync, CTRDG_EraseAgbFlashSectorAsync
05/25/2006 Added a description that the AGB backup device cannot be accessed normally with version IS-NITRO-DEBUGGER 1.66 or earlier.
04/07/2006 Initial version.
CONFIDENTIAL