From 3d949b884cd327ad9527864281adbf60cb5930fd Mon Sep 17 00:00:00 2001 From: graham sanderson Date: Sun, 8 Sep 2024 15:20:44 -0500 Subject: [PATCH] Write to page locks RAW; fixes #3 --- main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index ff53446..0e46e19 100644 --- a/main.c +++ b/main.c @@ -32,10 +32,10 @@ static inline bool is_locked() { static inline void lock_otp_secret() { dprintf("Locking OTP secret...\n"); otp_cmd_t cmd; - cmd.flags = OTP_DATA_PAGE48_LOCK1_ROW | OTP_CMD_ECC_BITS | OTP_CMD_WRITE_BITS; + cmd.flags = OTP_DATA_PAGE48_LOCK1_ROW | OTP_CMD_WRITE_BITS; // 3 redundant copies uint32_t value = 0x3c3c3c; - uint32_t ret = rom_func_otp_access(&value, sizeof(value), cmd); + uint32_t ret = rom_func_otp_access((uint8_t *)&value, sizeof(value), cmd); if (ret) { dprintf("\tLocking failed with error: %d\n", ret); while(1) {