I'm using BF707 based BLIP board for my current project, and I want to read Hardware Unique Key (huk) present in OTP Memory area.
I'm using APIs present in cdefBF70x_rom.h to read the HUK. In particular, res=adi_rom_otp_get_data(huk,0,8); is the line of code I'm using to read 8 32-bit data into the array variable huk.
I'm receiving the following error when I'm emulating :
A non-recoverable error or exception has occurred.
Description: Attempted to use a Supervisor register or instruction from User mode (Exception with EXCAUSE=0x2E).
General Type: UnhandledException
Specific Type: SupervisorResource
Error PC: 0x04003ad2
I also tried setting SACC bit in app_startup.s file so that the application enters main() in supervisory mode.
I'm still receiving the error.
Let me know how to debug this. I'll furnish further information if required.