osFlashSectorErase [Function]

Deletes a sector of Flash

Syntax

#include <ultra64.h>
s32  osFlashSectorErase(u32 page_num);

Description

This is a function that deletes the data of certain sectors of 1M Flash.

It specifies page number as an argument and deletes the sector which contains the specified page number.

The size of 1 sector is 128 pages (16K bytes), and each page of 0~0x7f, 0x80~0xff, 0x100~0x17f... is considered to be 1 sector.

For return values, 0 is returned when delete is successful and -1 when failed.

Timer wait is operated in osFlashSectorErase. Since timer management is done by VI manager, it is necessary to boot VI manager with osCreateViManager before using this function. It takes from several msec to several hundred msec to delete data of 1 sector.

Reference

[osFlashSectorEraseThrough] [osCreateViManager]

Revision History

07/07/2000  This function was added.