security_get_unique_device_id() - sw stalled

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.wsdof.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
7 posts / 0 new
Last post
bobspam@free.fr
Offline
Last seen:2 months 2 weeks ago
Joined:2018-06-20 08:07
security_get_unique_device_id() - sw stalled

Hello

I wish to get the CPU unique ID for traceability purpose in production. When calling security_get_unique_device_id() function, my software get stalled.

In the doc I can reed "Function uses OTP.hw_otpc_init()and thehw_otpc_set_speed()functions must be called before using this function."

These two functions are called by sys_man/sys_clock_mgr.c during the boot process.

Can you confirm to me actual procedure to get that number from prvMainTask ?

Thank you in advance

Best Regards

Device:
PM_Dialog
Offline
Last seen:37 min 26 sec ago
Staff
Joined:2018-02-08 11:03
Hi There,

Hi There,

In OTP Header there is a unique Position/Time Stamp number for each chip. You should not use the security_get_unique_device_id() function. Please refer to datasheet, Table 5: OTP header details.

的地址字段s in the OTP that will give you this unique number are:

Position/Package : 0x07F8EA00 - 0x07F8EA07

Tester/Timestamp : 0x7F8EA08 - 0x07F8EA0E

To do so, you should read the OTP Header in the aforementioned addresses in order to get a unique ID.

Thanks, PM_Dialog

bobspam@free.fr
Offline
Last seen:2 months 2 weeks ago
Joined:2018-06-20 08:07
Hello

Hello

Thank you for your first answer. All OTP related systems seems to be switched off

- 0 x7f4000区域是空的

- 0x07F8EA00 and following bytes are null.

Can you confirm to me how to enable it ?

hw_otpc_init(void)

hw_otpc_set_speed(HW_OTPC_SYS_CLK_FREQclk_speed)

hw_otpc_manual_read_on(bool spare_rows)

Manual Read

hw_otpc_close(void)

???

Thank you in advance

Best Regards

bobspam@free.fr
Offline
Last seen:2 months 2 weeks ago
Joined:2018-06-20 08:07
For the record, proper

For the record, proper sequence to read the CPU ID is

uint8_t cpu_id[128];

hw_otpc_init();
hw_otpc_set_speed(HW_OTPC_SYS_CLK_FREQ_16);
hw_otpc_manual_read_on(0);
memcpy(cpu_id, ((volatile uint64_t *) (0x07F8EA00)), sizeof(uint64_t) * 2);
hw_otpc_manual_read_off();
hw_otpc_disable();

I did not tried to use security_get_unique_device_id() again.

PM_Dialog
Offline
Last seen:37 min 26 sec ago
Staff
Joined:2018-02-08 11:03
Hi There,

Hi There,

What do you mean that “”All OTP related systems seems to be switched off”? Did you use the SmartSnippets toolbox to read the OTP Header?

Thanks, PM_Dialog

bobspam@free.fr
Offline
Last seen:2 months 2 weeks ago
Joined:2018-06-20 08:07
Hello

Hello

I am writing some board level self test functions using theSDK1.0.14.1081. I am not using Eclipse.

While using segger ozone to debug the code and trying your advices I could not access to OTP memory so I had to call hw_otpc to set it up. I initially thought that sys_man/sys_clock_mgr.c was setting it up but it is actually set to stand-by after boot so I had to wake-up the device before being able to read data.

Documentation is not precise enough.

PM_Dialog
Offline
Last seen:37 min 26 sec ago
Staff
Joined:2018-02-08 11:03
Hi There,

Hi There,

We recommend the usage of our provided Tools. We have detailed documentation on our support website for our tools. In your case, to honest I am not able to undertint what you are trying to accomplish.

Thanks, PM_Dialog