Skip to main content

Burning OTP Image using SmartSnippets command line

6 years ago

Burning OTP Image using SmartSnippets command line

Posted byoren0 points 4 replies
0 upvotes

Hi,
I have SmartSnippets 3.6 and successfully burned several modules' OTPs through the SmartSnippets GUI.
I want to do the same burning through the cli so we could burn many modules easily.
Using the GUI, the first burning process is to go to the "OTP Image" tab after clicking the "OTP Programmer" sidebar button, choosing the compiled hex file and then clicking "Connect" and "Burn".
I assume that the equivalent cli command is "-type otp -cmd write_custom_code".
However, the documentation says:
"Burns file to OTP memory.Makes the assumption that a valid firmware file has already been downloaded (e.g. through use of the uartBooter command above)."

Does the "Burn" button call the "-type booter" before calling the "-type otp -cmd write_custom_code"? Do I have to call both commands?

I used the GUI Booter sidebar button just for testing the program: load the code to the memory without burning the OTP, check that it works, restart (disconnect and reconnect power and usb) and then go to the OTP Programmer sidebar button...

Thanks

6 years ago

TN_Dialog 0 points

Hi Oren,

For the CLI interface the OTP and Booter is two different options. the Booter defines which interfact you want to boot the device from whrere the OTP command is used to program the OTP of the DA14580.

please see these examples

SmartSnippets.exe -type booter -chip DA14580-01 -com_port 3 -gpio P1_2 -uart P0_0 -file "C:\programmer.bin" -nomessages 0110

SmartSnippets.exe -type otp -chip DA14580-01 -jtag 228201589 -baudrate 57600 -cmd write_header -file "C:\header.hex"

You can find more examples by starting a CMD promyt in "C:\Program Files\SmartSnippets\bin>" and type "SmartSnippets.exe -help" this will give you a good explanation of the options available.

问候

TN_Dialog

5 years ago

summer20100514 0 points

It seems that one must first load the firmware using booter and only then will the other commands such as OTP burn command work. Because you must connect first, which as far as I am concerned is loading the firmware according to the log output. Can you explain this clearly ? Thanks.

5 years ago

anthony42 0 points

Hi Dialog,

I tried to use the command line to erase and burn the spi flash, but get these error:

C:\Users\BRIX>SmartSnippets.exe -type spi -chip da14580-01 -jtag 480054886 -cmd erase
Could not measure total IR len. TDO is constant high.
Could not measure total IR len. TDO is constant high.
Found SWD-DP with ID 0x0BB11477
Found Cortex-M0 r0p0, Little endian.
FPUnit: 4 code (BP) slots and 0 literal slots
BTLE device selected.
Using default baudrate: 57600 Bd.
Failed reading memory at address 81FE8.
Failed setting the following values to SPI Flash gpios: CLK=P0_0, CS=P0_3, MISO=P0_5, MOSI=P0_6.
Failed reading memory at address 81FE8.
SPI Flash memory erasing failed.

anyone can explain this?

Thanks,
Anthony

5 years ago

MT_dialog -30 points

Hi antony,

You wont be able to erase the flash while the program executes. Smartsnippets tool when connecting to flash, downloads the Jtag_programmer.bin first and then instructs the erase or the burning of the flash. Please try to use the following command SmartSnippets.exe -type spi -chip da14580-01 -jtag xxxxxxxxx -firmware jtag_programmer.bin -cmd erase.

Thanks MT_dialog