On Tuesday 02 February 2010, Spencer Oliver wrote: > > > By the way ... if STR7 can't actually read the protect status from > > the hardware, why does that flash driver have a str7x_protect_check() > > method which pretends to do exactly that, instead of just printing > > a warning that the status can't be read? > > > > The register reflects the state of a non-volatile register.
Doesn't actually reflect it *except* right after reset, if I understand correctly... > So after a reset halt - reading this register returns valid protection data. > > Any writes to this register are not reflected by reading the register again. I see. Sort of. Seems like a needlessly bizarre model. As if some chip designer couldn't be bothered to do it in a generally useful manner. :( The driver could still stand a few comments to capture all that strange behavior. I suspect a LOG_WARNING() in the protect_check() method would reduce some user confusion ... and the comments about FLASH_NVWPAR acting like a "write-only" register are a bit off, since there's at least *one* time when the read value is correct (right after reset). _______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development