Some important system information is stored in UTEST and its OTP, so MPU is used by default to protect the area in any new RTD project to prevent unexpected data changes.
If you want access to UTEST, you need to disable the MPU, the simplest way to do it is to comment out the code in “Project_Settings/Startup_Code/system.c- SystemInit()”
Hi AndrewXiong,
Here is the address of UID:0x1B000040
Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Hi,Robin,
I find this address, but when I try to do the following, the software crashes with a hard fault.
uint8 uid[8u];
C40_Ip_Read(FLS_UTEST_BLOCK_BASE_ADDR + 0x40, sizeof(uid), uid);
What method should I use to get the UID from this address?
Thansks.
Some important system information is stored in UTEST and its OTP, so MPU is used by default to protect the area in any new RTD project to prevent unexpected data changes.
If you want access to UTEST, you need to disable the MPU, the simplest way to do it is to comment out the code in “Project_Settings/Startup_Code/system.c- SystemInit()”
For those wondering how to get this number, and still having the MPU enabled:
1. Declare an extern 64-bit integer in the System.c file mentioned in this post
2. Get the integer from memory right before enabling the MPU
Hope it helps
Hello, we need to know how we can get this UID from user application though. When we try to do the following, the software crashes with a hard fault
And using the MCAL FLS driver, I also get a hardfault
Any guidance on how we could get the 8 bytes of the UID?
Also, does the device's MAC have a UID as well? If so, how can we get it?
Thanks in advance!