This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nrfjprog --memwr 10001080 --val 00000700 should fail with a syntax error

What I intended was to write x'700' to x'10001080' i.e. NRF_UICR->CUSTOMER[0] !

When ran my application, which outputs NRF_UICR->CUSTOMER[0] to the log, I was very confused until I realized nrfjprog correctly clobbered  a location in RAM.

1) nrfjprog should not accept the address in decimal (Who does that intentionally??).

2) nrfjprog should not accept a value with a leading 0 (Surely the user meant a hexadecimal value)

3) At an absolute minimum nrfjprog should respond with 

writing  00989AB8 = 000002BC

Then I might at least have had a chance to notice the odd values it reported.

Thank you for you consideration.

  • Hi,

    Thank you for the report. I can see that your unfortunate series of events can happen, yes.

    The command line interface could be improved, for instance by returning hexadecimal addresses / values as well, when getting decimal or octal values as input. (I am not sure if numbers starting in 0 (zero) will be treated as octal or decimal. This points at need for better documentation as well: The format of <addr> is not specified in nrfjprog --help.)

    I'll bring your points over to the nrfjprog team, along with a comment that the most important item is clear feadback on what address was written to what value (to quickly discover this easy-to-make mistake), as well as fully document what formats <addr> can take.

    Regards,
    Terje

Related