How to set Application Flag 1 & 2 =YES in hex file to write to DA14531 OTP header?

Hi, 

I am working on DA14531, I would like to write firmware into OTP image and then set Application Flag1&2 =YES into OTP header by using SmartSnippetTool command line tool.

My plan is:

1. write firmware hex file into OTP image --> No problem

2. read OTP header into a OTPHeader.hex file --> No problem

3. change 2 lines in the OTPHeader.hex file to set Application Flag1&2=Yes and save the file.  --> I don't know the correct values to replace the 2 lines

4. write the  OTPHeader.hex file into OTP header.

What value should I change for following 2 lines to set Application Flag1&2=Yes?  Especially the last check byte of each line, I have no idea how this byte was created.
:047FC000FFFFFFFFC1
:047FC400FFFFFFFFBD

Thank you.

B.R.

JW

Parents
  • Hi JW,

    Thank you for posting your question online.
    On the SST, if you have selected the OTP tab you can select the System Parameters tab in order to see the OTP header information:

    On the Content to Burn table you can easily change the Application Flag 1&2 to Yes:

    Please refer on the DA14531 Datasheet, on chapter 5.4 OTP Memory Layout, on page:62
    There you can find all the available information for the OTP memory and on Table 36 you can find the options for the OTP header. You can see what each bit is responsible for so you can change it accordingly for your application.




    Kind Regards,
    OV_Renesas

  • Hi OV_Renesas,

    Thanks a lot for your reply, but I am not going to use SST GUI, what I need is to set Application Flag1 & 2 to Yes by SST command line, that's why I want to replace 2 lines of 47FC0 and 47FC4 in the hex file.

    For example: 

    :047FC000FFFFFFFFC1
    :047FC400FFFFFFFFBD

    If set Application Flag1 &2 to Yes, these two lines should become:

    :047FC0001234A5A5??
    :047FC400A5A51234??

    Could you please show me how to calculate these two '??' byte?

    Or, is there any other command to set AF1& AF2 to YES directly? 

    Thank you.

    B.R.

    James

  • Hi James,

    Thank you for the reply.
    On the SST, please go on the OTP tab and select System Parameters. Then Connect and Read the contents of the OTP header. There you can change on the Content to Burn tab the values:

    You can select the Export to File option and save the Contents to Read or the Contents to Burn on a hex/bin file

    You can use the Content to Burn hex file you have exported in order to burn the OTP header via CLI commands. 
    Please refer here for all the available CLI commands and examples on how to use them:36. Command-line implementation — UM-B-083 (renesas.com)
    I used the below command to access the OTP memory, read the contents of the OTP header and save them on a hex file as well:

    SmartSnippetsToolbox.exe -chip DA14531 -jtag 480071504 -firmware jtag_programmer_531.bin -cmd read_header -file otp_header_output.hex -type otp
    In order to burn the OTP header you have saved from the SST "Content to Burn" hex file you exported earlier you will have to use the -cmd write_header with -type otp and select the -file exported_otp_header_to_burn.hex file.


    I hope this could be helpful.

    Kind Regards,
    OV_Renesas

Reply
  • Hi James,

    Thank you for the reply.
    On the SST, please go on the OTP tab and select System Parameters. Then Connect and Read the contents of the OTP header. There you can change on the Content to Burn tab the values:

    You can select the Export to File option and save the Contents to Read or the Contents to Burn on a hex/bin file

    You can use the Content to Burn hex file you have exported in order to burn the OTP header via CLI commands. 
    Please refer here for all the available CLI commands and examples on how to use them:36. Command-line implementation — UM-B-083 (renesas.com)
    I used the below command to access the OTP memory, read the contents of the OTP header and save them on a hex file as well:

    SmartSnippetsToolbox.exe -chip DA14531 -jtag 480071504 -firmware jtag_programmer_531.bin -cmd read_header -file otp_header_output.hex -type otp
    In order to burn the OTP header you have saved from the SST "Content to Burn" hex file you exported earlier you will have to use the -cmd write_header with -type otp and select the -file exported_otp_header_to_burn.hex file.


    I hope this could be helpful.

    Kind Regards,
    OV_Renesas

Children
No Data