embassy-rp

Crates

git

Versions

rp235xb

Flavors

Function embassy_rp::rom_data::flash_range_program

source ·
pub unsafe extern "C" fn flash_range_program(
    addr: u32,
    data: *const u8,
    count: usize,
)
Expand description

Program data to a range of flash storage addresses starting at addr (offset from the start of flash) and count bytes in size.

addr must be aligned to a 256-byte boundary, and count must be a multiple of 256.

This is a low-level flash API, and no validation of the arguments is performed. See flash_op() for a higher-level API which checks alignment, flash bounds and partition permissions, and can transparently apply a runtime-to-storage address translation.

The QSPI device must be in a serial command state before calling this API — see notes on flash_range_erase().

Supported architectures: ARM-S, RISC-V

§Safety

This is a low-level C function. It may be difficult to call safely from Rust. If in doubt, check the rp235x datasheet for details and do your own safety evaluation.