Can't read OTP from AES encrypted program
-
- Newbie
- Posts: 1
- Joined: Fri May 14, 2021 1:29 pm
Can't read OTP from AES encrypted program
I've stored a serial number for my product in OTP. My program can read the serial number just fine using OTP_read() if I run it using JTAG and reading OTP with xburn shows it is there. However, if I boot from an encrypted AES image of my program stored in flash, otp_read() returns a value of 0 instead of the stored serial number. Is OTP off limits to programs that have been encrypted? I can't find anything in the documentation to explain this.
-
Verified
- Experienced Member
- Posts: 79
- Joined: Wed Feb 17, 2016 5:10 pm
https://www.xmos.com/documentation/XM-0 ... guard.html
I think the secure boot bit disables OTP read.
I think the secure boot bit disables OTP read.
-
- Junior Member
- Posts: 5
- Joined: Wed Jan 04, 2023 11:18 am
I am having the exact same problem.
Is there no way around this problem? I too can't find any official documentation which indicates that this won't work.
Is there no way around this problem? I too can't find any official documentation which indicates that this won't work.
-
Verified
- Experienced Member
- Posts: 79
- Joined: Wed Feb 17, 2016 5:10 pm
Try to search the datasheet for "security register features," hopefully you can then query that and see if reading has been disabled by the security bit.
I agree I cannot find a definitive answer saying that the security bit implies this, but it makes sense to me as this would prevent you from reading off the key at runtime.
I agree I cannot find a definitive answer saying that the security bit implies this, but it makes sense to me as this would prevent you from reading off the key at runtime.
-
- Junior Member
- Posts: 5
- Joined: Wed Jan 04, 2023 11:18 am
I managed to fix my issue by appending the --enable-otp flag to the end of my xflash command which constructs my final .bin image.
Hope this helps other people.
Hope this helps other people.