Burning OTP Image using SmartSnippets command line

5 posts / 0 new
Last post
oren
Offline
Last seen:1 year 7 months ago
Expert
加入:2014-06-28 22:03
Burning OTP Image using SmartSnippets command line

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

TN_Dialog
Offline
Last seen:5 days 11 hours ago
工作人员
加入:2013-12-05 15:49
Hi Oren,

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

summer20100514
Offline
Last seen:4 years 4 months ago
Guru
加入:2014-12-30 05:01
It seems that one must first

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.

anthony42
Offline
Last seen:5 years 6 months ago
加入:2015-07-17 08:21
Hi Dialog,

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
将not measure total IR len. TDO is constant high.
将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

MT_dialog
Offline
Last seen:2 months 1 week ago
工作人员
加入:2015-06-08 11:34
Hi antony,

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