Share via


BP_LowLevelFormat (Windows Embedded CE 6.0)

1/6/2010

This function erases, verifies, and writes logical sectors in a specified range. This function should be called when preparing Flash memory for a download of multiple .bin files.

Syntax

BOOL BP_LowLevelFormat(
  DWORD dwStartBlock,
  DWORD dwNumBlocks,
  DWORD dwFlags
);

Parameters

  • dwStartBlock
    [in] Starting physical block to format.
  • dwNumBlocks
    [in] Number of physical blocks to format
  • dwFlags
    [in] Format settings. The following table shows possible values.

    Value Description

    FORMAT_SKIP_BLOCK_CHECK

    Skips a read/write verification to check for bad blocks. This is recommended for NOR flash.

    FORMAT_SKIP_RESERVED

    Reserved blocks are not erased.

Return Value

TRUE indicates success. FALSE indicates failure.

Remarks

The logical sector zero is assigned to the first sector in the first good block starting from dwStartBlock and a mater boot record (MBR) is written to logical sector zero. The function erases dwNumBlocks number of blocks, skipping bad blocks in all cases and reserved blocks if specified in dwFlags. Bad blocks and reserved blocks count against the dwNumBlocks specified value.

Requirements

Header bootpart.h
Library Bootpart.lib
Windows Embedded CE Windows CE .NET 4.2 and later

See Also

Reference

Bootpart Functions

Concepts

BinFS and the Bootpart Library

Other Resources

Flash Drivers