Post Go back to editing

reading factory serial number

Category: Software
Product Number: ADSP-BF704

Hi,

I am trying to read the factory serial number by

  result=adi_rom_otpfsnget(otpfsncmd_fsn, data);

However I get an exeption:

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 _am_ already in supervisor mode, so what is the correct procedure to read fsn from OTP?