Closed Octopus1633 closed 1 month ago
Is this your second time running the example? This example will only work correctly when run for the first time on a board as it modifies the OTP (One-Time-Programable Memory), so if you run it a second time on the same board it will throw these errors - this bootrom error is documented in the SDK
#define BOOTROM_ERROR_UNSUPPORTED_MODIFICATION (-18) // Write is impossible based on previous writes; e.g. attempted to clear an OTP bit
If you want to run this example again on the same board, you can modify the OTP rows used by the example - again, this will only work the first time for each set of OTP rows used
// Row to write ECC data
uint16_t ecc_row = 0x400;
// Row to write raw data
uint16_t raw_row = 0x410;
Thank you for your patience. After changing the address, I successfully ran the program again.
@will-v-pi I wonder if it'd be useful if that example was modified to print out the existing OTP row contents before atempting to write to them, and/or check that the rows are indeed empty before trying to modify them? :thinking: (he blindly suggests, knowing very little about OTP!)
Yeah, that sounds sensible - if the rows are non-zero then it can just throw an error and stop
Hi, I am running the otp/hello_otp example, why does the output show that the first write fails for both ECC and RAW, is this normal, is there any problem?