Post Go back to editing

detailed documentation for adi_rom_otp_get() function

Thread Summary

The user asked about the adi_rom_otp_get() function for the ADSP-594W, specifically when it returns 'false' and how to handle it. The function returns 'false' for unknown commands or OTP read errors (ECC or Address Error). The user should verify the command from OTPCMD Members and check for ECC/Address errors. The required header is #include , and reference code examples are available in the EE-447 document and ttp_bootrom.zip file.
AI Generated Content
Category: Datasheet/Specs
Product Number: ADSP-SC594W, ADSP-SC594

Hello Forum,

With regard to the adi_rom_otp_get() function, would there be any information available to address any of the following questions?

1. The function returns 'false' for an unsuccesful read. Under what circumstances is 'false' returned? for example, when OTP is corrupted?

2. in the case that 'false' _is_ returned, are there any guidelines to show how application code should handle this case? e.g. retry? reboot?

3. what headers should be #included when compiling?

4. are there any reference code examples?

In my case, i am developing for the ADSP-594W. There is documentation in the ADSP-SC594W datasheet for adi_rom_otp_get(), but it does not quite cover the topics above.

Thank you

  • Hi,

    Please find our replies for Q3 and Q4:
    3. what headers should be #included when compiling?
    >> Please use #include <cdefSC59x_rom.h> file for compiling.

    4. are there any reference code examples?
    >> Have you gone through EE-447 “Tips and Tricks Using the ADSP-SC59x/ADSP-2159x/ADSP-2156x Processor Boot ROM”. If not, please refer “6. OTP API code” example in the ttp_bootrom.zip file linked below.
    https://www.analog.com/media/en/technical-documentation/application-notes/ee447v01.pdf

    https://www.analog.com/media/en/technical-documentation/application-notes/ttp_bootrom.zip

    We are checking on Q1 & Q2 and get back to as soon as possible.

    Regards,
    Nandini C

  • Hi,

    The adi_rom_otp_get API is used to read specific fields from the OTP memory. It fetches data based on the provided command and stores it in the data[] array.

    Parameters:
    cmd: (OTPCMD) specifying the OTP content to read. For example, encryption keys, public keys etc
    data[]: Where the read OTP contents will be stored.

    This API allows application to access various fields in the OTP memory, such as encryption keys, public keys, AntiRollback NV Counter, and other boot data. The cmd parameter determines which specific field to read, and the data is stored in the provided data[] array.

    It will return false:
    1. In case of Unknown command -> not from the enums. HRM Table 46-75: OTPCMD Members contains valid enums.
    2. If OTPC( stat register )shows errors like ECC or Address Error during read.

    In short, when OTP Read is not successful it will return false.
    So, debug will be :
    Check valid Command from OTPCMD Members list.
    There should not be ECC/Address Error during read from controller.

    Regards,
    Nandini C

  • Hi Nandini,

    Thanks for your response. That's all clearly explained and I think the information i now have covers all my questions.

    It looks like when OTP read returns false, it is because of application error (application passing undefined or wrong enumeration) rather than because of a hardware problem.

    Regards,

    Derek Bray