I want to store some board info (serial number etc.) in OTP during board production. I managed to program OTP[189] trough J-Link commander. Now I want to read it back in the application.
My first attempt was to read the address:
This results in a bus fault. Reading trough earlier topics on this subject I suspect the OTP can only be read by secure code? All earlier topics mention the secure partition manager, which is now deprecated (using SDK 2.1.0).
I tried to convert to TF-M, using the following code:
But this always gives the default serial, and the following line in the console:
tfm_..._mem_read failed: plt_err: 0x2, err: 0xffffffff
I guess I need to add the address to some whitelisted addresses that the non-secure code can read?