Hello everyone,
I am trying to read the unique ID on i.MXRT RT1050. First I read it like below:
uint32_t id1 = OCOTP->CFG0; uint32_t id2 = OCOTP->CFG1;
Then, I found in the forum that the right way to do so is:
OCOTP_ClearErrorStatus(OCOTP);
OCOTP_ReloadShadowRegister(OCOTP);
uid_read_data[0] = OCOTP_ReadFuseShadowRegister(OCOTP, fuse_address[0]);
uid_read_data[1] = OCOTP_ReadFuseShadowRegister(OCOTP, fuse_address[1]);
However, the second approach gives me only zero while the first one gives something more meaningful. Could anyone please tell me why reading directly from the register is not right, and why the second method does not work properly?
Thanks in advance.