This is the mail archive of the
mailing list for the eCos project.
- From: Tom Schouten <tom at zwizwa dot be>
- To: ecos-discuss at ecos dot sourceware dot org
- Date: Tue, 15 Feb 2011 11:07:53 -0500
- Subject: [ECOS] cyg_flash_program_mask
It seems that many Flash devices expose separate "program" and "erase"
operations. It also seems fairly common to represent an erased bit as
"1" and a programmed bit as "0". In this view "program" can only
perform a 1->0 transition and "erase" resets bits back to 1. So a
Flash chip's "program" operation is logically an "and-mask" operation.
Since the erase operation is one that ages the chip, it makes sense in
some applications to use multiple overlaying "and-mask" operations to
incrementally write to data units that are smaller than the smallest
Is there any interest to add support for this behaviour to the eCos
If I understand correctly, the cyg_flash_program() operation erases
before program such that the resulting bit pattern in the Flash always
represents the input bit pattern exactly, instead of being the result
of an "and-mask" operation.
A single extra API function could be enough:
int cyg_flash_program_mask(cyg_flashaddr_t flash_base,
void *ram_base, size_t len,
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss