26. Command-line implementation

SmartSnippets™ Toolbox also provides a command line implementation of its functionality. In order to run the command-line version of SmartSnippets™ Toolbox, the user has to open the command prompt, change folder to SmartSnippets™ Toolbox installation folder under SmartSnippetsStudio/Toolbox and execute one of the available commands listed below. The commands are slightly different depending on the chip family.

In what follows, by Executable we refer to the SmartSnippets™ Toolbox executable. On windows use the full path to the SmartSnippetsToolbox.exe (e.g. C:DiaSemiSmartSnippetsStudio<version>ToolboxSmartSnippetsToolbox.exe. On Linux use java -jar <path_to_SmartSnippetsToolbox.jar> . You may find a bundled java under SmartSnippetsStudio/jre folder

Options enclosed in square bracket are optional. For commands with type power com port is mandatory and is used for data capturing. If also jtag serial number is specified, jtag interface will be used for firmware download.

26.1. CLI for DA14580/581/583 and DA14585/6 family chips

  1. Executable -help -chip chip_version

    Displays the available commands and examples.

  2. Executable [-sdk sdk_path] -type booter -chip chip_version [-jtag jtag_serialNumber | -com_port portNumber] [-sys_ctrl_reg b1] [-gp_ctrl_reg b2] [-close] [-gpio pinId] [-uart TxId] -file filename [-y] [-nomessages messageFilter]

    Downloads file to the chip using UART Booter tool. If a ‘CRC does not match’ shows up, please run the command again and then press the hardware reset button on the board to restart the download process.

  3. Executable [-sdk sdk_path] -type otp -chip chip_version [-jtag jtag_serialNumber | -com_port portNumber] [-baudrate rate] [-gpio pinId] [-uart TxId] [-firmware firmware_file] -cmd write_header -file filename [-writeReadOnlyOTPHeaderFields] [-y] [-nomessages messageFilter]

    Burns file to OTP Header. Makes the assumption that a valid firmware file has already been downloaded (e.g. through use of the uartBooter command above). In order to disable validations that stop the header writing process waiting for user confirmation, the following line should be added to the “<user home directory>properties.txt” file: DISABLEVALIDATIONS = true.

  4. Executable [-sdk sdk_path] -type otp -chip chip_version [-jtag jtag_serialNumber | -com_port portNumber] [-baudrate rate] [-gpio pinId] [-uart TxId] [-firmware firmware_file] -cmd write_nvds -file filename [-offset ofst] [-y] [-nomessages messageFilter]

    Burns file to OTP NVDS. Makes the assumption that a valid firmware file has already been downloaded (e.g. through use of the uartBooter command above). Not applied for DA14585-00 and DA14586-00

  5. Executable [-sdk sdk_path] -type otp -chip chip_version [-jtag jtag_serialNumber | -com_port portNumber] [-baudrate rate] [-gpio pinId] [-uart TxId] [-firmware firmware_file] -cmd write_custom_code -file filename [-offset ofst] [-writeReadOnlyOTPHeaderFields] [-y] [-nomessages messageFilter]

    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). On DA14583-01 chip asks for confirmation even with option ‘-y’

  6. Executable [-sdk sdk_path] -type otp -chip chip_version [-jtag jtag_serialNumber | -com_port portNumber] [-baudrate rate] [-gpio pinId] [-uart TxId] [-firmware firmware_file] -cmd read_header -file filename [-y] [-nomessages messageFilter]

    Reads OTP Header and writes its contents to a file. Makes the assumption that a valid firmware file has already been downloaded (e.g. through use of the uartBooter command above).

  7. Executable [-sdk sdk_path] -type otp -chip chip_version [-jtag jtag_serialNumber | -com_port portNumber] [-baudrate rate] [-gpio pinId] [-uart TxId] [-firmware firmware_file] -cmd read_nvds -file filename [-offset ofst] [-y] [-nomessages messageFilter]

    Reads OTP NVDS and writes its contents to a file. Makes the assumption that a valid firmware file has already been downloaded (e.g. through use of the uartBooter command above). Not applied for DA14585-00 and DA14586-00

  8. Executable [-sdk sdk_path] -type otp -chip chip_version [-jtag jtag_serialNumber | -com_port portNumber] [-baudrate rate] [-gpio pinId] [-uart TxId] [-firmware firmware_file] -cmd read_custom_code -file filename [-offset ofst] [-length byteLength] [-y] [-nomessages messageFilter]

    Reads OTP memory contents and writes its contents to a file. Makes the assumption that a valid firmware file has already been downloaded (e.g. through use of the uartBooter command above). If length not specified it takes the value of OTP size.

  9. Executable [-sdk sdk_path] -type otp -chip chip_version [-jtag jtag_serialNumber | -com_port portNumber] [-baudrate rate] [-gpio pinId] [-uart TxId] [-firmware firmware_file] -cmd write_field [-offset ofst] -data dataInHex [-nvds_address_offset nvdsAddrOfst] [-writeReadOnlyOTPHeaderFields] [-y] [-nomessages messageFilter]

    Burns dataInHex to OTP starting from address 0x40000 + ofst.

  10. Executable [-sdk sdk_path] -type power -chip chip_version -com_port portNumber [-gpio pinId] [-uart TxId] [-jtag jtag_serialNumber] [-firmware firmware_file] -cmd capture_data -duration duration [-time_offset time_offset] [-threshold threshold] [-zero_samples_for_sw_cursor samples] [-sw_cursor_tolerance tolerance] [-sw_cursors_to_stop cursors_to_stop] -data_file data_file -stat_file stat_file [-y] [-nomessages messageFilter]

    Captures Current data measured by Power Profiler, writes them to a file and exports final statistics. This command applies only to devices with SPI interface.

  11. Executable [-sdk sdk_path] -type power -chip chip_version -com_port portNumber [-gpio pinId] [-uart TxId] [-jtag jtag_serialNumber] [-firmware firmware_file] -cmd export_stats -duration duration -sampling_interval sampling_interval -stat_file stat_file [-y] [-nomessages messageFilter]

    Captures statistics for a period of time and exports to a file statistic samples every sampling interval. Makes the assumption that a valid firmware file has already been downloaded (e.g. through use of the uartBooter command above). This command applies only to devices with SPI interface.

  12. Executable [-sdk sdk_path] -type spi -chip chip_version [-clk clk] [-cs cs] [-miso miso] [-mosi mosi] [-jtag jtag_serialNumber | -com_port portNumber] [-baudrate rate] [-gpio pinId] [-uart TxId] [-firmware firmware_file] -cmd read -file filename [-offset ofst] [-length byteLength] [-max size] [-y] [-nomessages messageFilter]

    Reads SPI FLASH memory contents and writes them to a file.

  13. Executable [-sdk sdk_path] -type spi -chip chip_version [-clk clk] [-cs cs] [-miso miso] [-mosi mosi] [-jtag jtag_serialNumber | -com_port portNumber] [-baudrate rate] [-gpio pinId] [-uart TxId] [-firmware firmware_file] -cmd write -file filename [-offset ofst] [-max size] [-verify] [-bootable] [-y] [-nomessages messageFilter]

    Burns file to SPI FLASH memory.

  14. Executable [-sdk sdk_path] -type spi -chip chip_version [-clk clk] [-cs cs] [-miso miso] [-mosi mosi] [-jtag jtag_serialNumber | -com_port portNumber] [-gpio pinId] [-uart TxId] [-firmware firmware_file] -cmd erase [-verify] [-offset ofst] [-max size] [-sectors num] [-end address] [-y] [-nomessages messageFilter]

    Erases all the SPI FLASH memory when -offset, -sectors and -end have not been specified. User can erase specific sectors by either using -sectors or -end. In the first case the specified number of sectors is erased. In the second case the sectors included between offset and end address are erased. If offset is specified without -end or -sectors, only the sector that includes the offset is erased. Sector size is 4KB.

  15. Executable [-sdk sdk_path] -type spi -chip chip_version [-clk clk] [-cs cs] [-miso miso] [-mosi mosi] [-jtag jtag_serialNumber | -com_port portNumber] [-baudrate rate] [-gpio pinId] [-uart TxId] [-firmware firmware_file] -cmd write_field [-offset ofst] -data dataInHex [-max size] [-y] [-nomessages messageFilter]

    Burns dataInHex to SPI FLASH starting from address ofst.

  16. Executable [-sdk sdk_path] -type eeprom -chip chip_version [-scl scl] [-sda sda] [-jtag jtag_serialNumber | -com_port portNumber] [-baudrate rate] [-gpio pinId] [-uart TxId] [-firmware firmware_file] -cmd read -file filename [-offset ofst] [-length byteLength] [-max size] [-y] [-nomessages messageFilter]

    Reads EEPROM memory contents and writes them to a file.

  17. Executable [-sdk sdk_path] -type eeprom -chip chip_version [-scl scl] [-sda sda] [-jtag jtag_serialNumber | -com_port portNumber] [-baudrate rate] [-gpio pinId] [-uart TxId] [-firmware firmware_file] -cmd write -file filename [-offset ofst] [-max size] [-verify] [-bootable] [-y] [-nomessages messageFilter]

    Burns file to EEPROM memory.

  18. Executable [-sdk sdk_path] -type eeprom -chip chip_version [-scl scl] [-sda sda] [-jtag jtag_serialNumber | -com_port portNumber] [-baudrate rate] [-gpio pinId] [-uart TxId] [-firmware firmware_file] -cmd erase [-bit_value val] [-verify] [-max size] [-y] [-nomessages messageFilter]

    Erases EEPROM memory by writing the bit value to every bit of memory. Default value is 0.

  19. Executable [-sdk sdk_path] -type eeprom -chip chip_version [-scl scl] [-sda sda] [-jtag jtag_serialNumber | -com_port portNumber] [-baudrate rate] [-gpio pinId] [-uart TxId] [-firmware firmware_file] -cmd write_field [-offset ofst] -data dataInHex [-max size] [-y] [-nomessages messageFilter]

    Burns dataInHex to EEPROM starting from address ofst.

  20. Executable -bundle commands_file

    Executes bundle of commands from input txt file.

  21. Executable [-sdk sdk_path] -type suota -chip chip_version -initiator portNumber -receiver ble_addr -file img_file [-memtype memoryType] [-bank bank_num] [-i2c_addr addr] [-block_size b_size] [-scl scl] [-sda sda] [-miso miso] [-mosi mosi] [-cs cs] [-sck sck] [-y] [-nomessages messageFilter]

    SUOTA (Software Update Over the Air). Applicable only for DA14580-01.

  22. Executable [-sdk sdk_path] -type spota -chip chip_version -initiator portNumber -receiver ble_addr -file img_file [-memtype memoryType] [-base_addr addr ] [-i2c_addr addr] [-scl scl] [-sda sda] [-miso miso] [-mosi mosi] [-cs cs] [-sck sck] [-y] [-nomessages messageFilter]

    SPOTA (Software Patch Over the Air). Applicable only for DA14580-01.

  23. Executable [-sdk sdk_path] -type battery_life -chip chip_version -input input_file [-params params_file]

    Battery Lifetime Estimation. input_file contains the input values to be used for the calculations. Optionally, params_file can be used to override the default values per chip family that are used in the calculations.

Option Description:

Option Description
-sdk sdk_path Path to an SDK. Only devices and resources from the specified SDK are used. If the configuration xml of the SDK is invalid, the bundled support package matching the SDK’s family is used. When option is omitted, all the bundled support packages are used.
   
-type cli_type booter or power or otp or spi or eeprom or suota or spota or battery_life
   
-cmd command Available commands are: write_header, write_nvds, write_custom_code, read_header, read_nvds, read_custom_code, capture_data, capture_stats, read, write, erase, write_field. Look previous section for available combinations of -type and -cmd options.
   
-com_port portNumber Windows: an integer number indicating the UART COM Port. E.g. portNumber=3 for port COM3. Linux the port as String, e,g.: /dev/ttyS0
   
-jtag jtag_serialNumber If -jtag option along with the jtag’s serial number has been specified the jtag interface will be used for communication with the chip. This option is mutually exclusive with the -com_port option.
   
-gpio pinId The GPIO pin which controls the transistor enabling high voltage. Format: Pi_j, where P is character ‘P’, i is an integer with between 0 and 3 and j is an integer between0 and 7. E.g.: P1_2
   
-uart TxId The Tx part of the UART port Tx-Rx Pair connecting FTDI chip with the Bluetooth chip. Available TxIds: P0_0, P0_2, P0_4 and P0_6
   
-file filename Input or output filename. For write commands it is an input bin or hex file, containing the data to be burned to the chip. For read commands it is an output text, hex or bin file, where data should be stored.
   
-baudrate rate Specifies the data transfer rate through UART. Available baudrates are: 57600, 9600, 115200
   
-offset ofst The offset in OTP memory, from which read or write operation should start. If ‘ofst’ starts with ‘0x’ it is parsed as hex, otherwise as decimal
   
-length byteLength The length in bytes to read from OTP, SPI or EEPROM memory.
   
-chip chip_version The version of the chip. Acceptable values are DA14580-01, DA14581-00, DA14583-01, DA14585-00 and DA14586-00
   
-duration durationInmSecs Duration of data capturing (integer number of msecs). Used in ‘capture_data’ Power Profiler command
   
-duration durationInSecs Duration of data capturing (integer number of secs). Used in ‘export_stats’ Power Profiler command
   
-sampling_interval interval An integer number indicating the number of seconds between the statistic samples
   
-time_offset time_offset Pre trigger sampling period (double number of msecs). Optional, default 0
   
-threshold threshold Threshold for considering active (in mA). If set, measured values are collected, exported and aggregated as stats only if their value is >= threshold. Optional, default 0.
   
-zero_samples_for_sw_cursor samples Integer value representing the number of zero samples that mark a SW cursor.
   
-sw_cursor_tolerance tolerance Decimal value (in uA) representing the upper threshold under which samples are considered to be equal to zero. Related to S/W cursors.
   
-sw_cursors_to_stop cursors_to_stop Integer value representing the number of sw cursors to trigger a stop event for data capturing.
   
-data_file data_filename Filename of .csv file with collected measurements
   
-stat_file stat_filename Filename of .csv file with collected statistics (e.g. peak current, avg current, charge)
   
-y Accept default values. Do not ask user.
   
-nvds_address_offset nvdsAddrOfs The starting offset of NVDS inside OTP memory, with respect to 0x40000. If ‘nvdsAddrOfst’ starts with ‘0x’ it is parsed as hex, otherwise as decimal. If -nvds_address_offset option has been specified, write_field command will write the input data at OTP NVDS.
   
-firmware firmware_file Firmware file that should be downloaded to the chip before executing the command.
   
-nomessages messageFilter Disables a message category. messageFilter is a string combined of ‘1’ and ‘0’. The message categories are INFO, WARNING, ERROR, ACTION and ARGUMENT_PARSING. 00111 disables INFO and WARNING messages. 00111 is equal to 00, since by default all message categories are enabled.
   
-sectors num Specifies the number of sectors to be erased from SPI Flash memory. If ‘num’ starts with ‘0x’ it is parsed as hex, otherwise as decimal. Sector size is 4KB.
   
-end address Specifies where the region to be erased ends.The sector containing end address is the last sector to be erased.
   
-bundle commands_file Executes bundle of commands from input txt file.
   
-sys_ctrl_reg b1 Byte value to write at System Control Register, e.g. A4 or 0xA4. Used only on JTAG communication.
   
-gp_ctrl_reg b2 Byte value to write at General Purpose Control Register, e.g. E2 or 0xe2. Used only on JTAG communication.
   
-close: Close J-Link GDB Server after firmware download.
   
-cs cs Specifies the CS pin configuration for SPI Flash memory. Available values: [P0_0:P0_7], [P1_0:P1_3], [P2_0:P2_9], [P3_0:P3_7]
   
-clk clk Specifies the CLK pin configuration for SPI Flash memory. Available values: [P0_0:P0_7], [P1_0:P1_3], [P2_0:P2_9], [P3_0:P3_7]
   
-sck sck Specifies the SCK pin configuration for SPI Flash memory in SUOTA/SPOTA. Available values: [P0_0:P0_7], [P1_0:P1_3], [P2_0:P2_9], [P3_0:P3_7]
   
-miso miso Specifies the MISO pin configuration for SPI Flash memory. Available values: [P0_0:P0_7], [P1_0:P1_3], [P2_0:P2_9], [P3_0:P3_7]
   
-mosi mosi: Specifies the MOSI pin configuration for SPI Flash memory. Available values: [P0_0:P0_7], [P1_0:P1_3], [P2_0:P2_9], [P3_0:P3_7]
   
-scl scl Specifies the SCL pin configuration for I2C EEPROM memory. Available values: [P0_0:P0_7], [P1_0:P1_3], [P2_0:P2_9], [P3_0:P3_7]
   
-sda sda Specifies the SDA pin configuration for I2C EEPROM memory. Available values: [P0_0:P0_7], [P1_0:P1_3], [P2_0:P2_9], [P3_0:P3_7]
   
-max size Specifies the size of EEPROM or SPI Flash memory.
   
-verify If specified, SPI Flash or EEPROM memory contents will be verified, after write or erase action.
   
-bootable If specified, appropriate header is added to image file in order to make SPI Flash or EEPROM memory bootable. By default image is not bootable.
   
-bit_value val Value to write to every bit of EEPROM memory during erase. Acceptable values are 0 or 0x00 and 1 or 0x01.
   
-data dataInHex Data in hex with no spaces to write in OTP, SPI Flash or EEPROM. E.g. 011234DE.
   
-initiator portNumber The com port number, in decimal, where the suota/spota initiator is connected. E.g. -initiator 28
   
-receiver ble_addr The Bluetooth address of the SUOTA/SPOTA receiver. E.g. -receiver 78:56:34:12:CD:AB
   
-memtype memoryType Acceptable values: I2C (or i2c), SPI (or spi) for SUOTA. For SPOTA two extra values are accepted: SYSRAM (or sysram) and RETRAM (or retram)
   
-bank bank_num Specifies where and which image file will be loaded. It accepts only 3 values: 0, 1 or 2.
   
-i2c_addr addr Specifies the I2C device address.
   
-block_size b_size Specifies the size of each block that will be transmitted, in bytes. Cannot be less than 20.
   
-base_addr addr Specifies the base memory address.
   
-writeReadOnlyOTPHeaderFields When writing to header, protected addresses values are replaced by 0. Using this option user can actually write a protected address.
   
-input Text file containing input values to be used in the battery lifetime calculations. Each input value is related with a specific id. A sample input file can be found at the end of this section.
   
-params Text file containing values for parameters that are used in the battery lifetime calculations. Each parameter value is related with a specific id. If ommited, parameters are initialized with default values. A sample parameters’ file can be found at the end of this section.

Non-mandatory options:

In commands listed above, optional arguments are placed between square brackets (e.g. [rate]). If user doesn’t set an optional argument, the following default values are used:

Option Default Value
[-gpio pinId] P1_2
[-uart TxId] P0_4
[-baudrate rate] 57600
[-offset ofst] 0x0000
[-length byteLength] OTP:0x8000, SPI/EEPROM: 0x20000 for DA14580/581/583, 0x40000 for DA14585/6
[-time_offset time_offset] 0
[-threshold threshold] 0
[-sectors num] 1
[-sys_ctrl_reg b1] 0xA4 for DA14580/581/583, 0xA6 for DA14585/6
[-gp_ctrl_reg b2] 0x2E for DA14580/581/583, not applicable for DA14585/6
[-cs cs] DA14583-01 & DA14586-00: P2_3, other: P0_3
[-clk clk] DA14583-01 & DA14586-00: P2_0, other: P0_0
[-miso miso] DA14583-01 & DA14586-00: P2_4, other: P0_5
[-mosi mosi] DA14583-01 & DA14586-00: P2_9, other: P0_6
[-scl scl] DA14583-01 & DA14586-00: P0_2, other: P0_2
[-sda sda] DA14583-01 & DA14586-00: P0_3, other: P0_3
[-sck sck] DA14583-01 & DA14586-00: P2_0, other: P0_0
[-memtype memoryType] SPI
[-bank bank_num] 0
[-i2c_addr addr] 0x50
[-block_size b_size] 240
[-base_addr addr] 0

26.2. CLI for DA1468x and DA1469x family chips

  1. Executable -help -chip chip_version

    Displays the available commands and examples.

  2. Executable [-sdk sdk_path] -type booter -chip chip_version [-jtag jtag_serialNumber | -com_port portNumber] -file filename [-close] [-y] [-nomessages messageFilter]

    Downloads file to the chip using UART Booter tool.

  3. Executable [-sdk sdk_path] -type otp -chip chip_version [-jtag jtag_serialNumber | -com_port portNumber] [-firmware firmware_file] -cmd write_header -file filename [-writeReadOnlyOTPHeaderFields] [-y] [-nomessages messageFilter]

    Burns file to OTP Header.

  4. Executable [-sdk sdk_path] -type otp -chip chip_version [-jtag jtag_serialNumber | -com_port portNumber] [-firmware firmware_file] -cmd write_custom_code -file filename [-offset ofst] [-writeReadOnlyOTPHeaderFields] [-y] [-nomessages messageFilter]

    Burns file to OTP memory.

  5. Executable [-sdk sdk_path] -type otp -chip chip_version [-jtag jtag_serialNumber | -com_port portNumber] [-firmware firmware_file] -cmd read_header -file filename [-y] [-nomessages messageFilter]

    Reads OTP Header and writes its contents to a file.

  6. Executable [-sdk sdk_path] -type otp -chip chip_version [-jtag jtag_serialNumber | -com_port portNumber] [-firmware firmware_file] -cmd read_custom_code -file filename [-offset ofst] [-length byteLength] [-y] [-nomessages messageFilter]

    Reads OTP memory contents and writes its contents to a file. If length not specified it takes the value of OTP size.

  7. Executable [-sdk sdk_path] -type otp -chip chip_version [-jtag jtag_serialNumber | -com_port portNumber] [-firmware firmware_file] -cmd write_field [-offset ofst] -data dataInHex [-writeReadOnlyOTPHeaderFields] [-y] [-nomessages messageFilter]

    Burns dataInHex to OTP starting from address 0x7F80000 + ofst.

  8. Executable [-sdk sdk_path] -type power -chip chip_version -com_port portNumber [-firmware firmware_file] -cmd capture_data -duration duration [-time_offset time_offset] [-threshold threshold] [-zero_samples_for_sw_cursor samples] [-sw_cursor_tolerance tolerance] [-sw_cursors_to_stop cursors_to_stop] -data_file data_file -stat_file stat_file [-y] [-nomessages messageFilter]

    Captures Current data measured by Power Profiler, writes them to a file and exports final statistics. This command applies only to devices with SPI interface.

  9. Executable [-sdk sdk_path] -type power -chip chip_version -com_port portNumber [-firmware firmware_file] -cmd export_stats -duration duration -sampling_interval sampling_interval -stat_file stat_file [-y] [-nomessages messageFilter]

    Captures statistics for a period of time and exports to a file statistic samples every sampling interval. Makes the assumption that a valid firmware file has already been downloaded (e.g. through use of the uartBooter command above).

  10. Executable [-sdk sdk_path] -type qspi -chip chip_version [-jtag jtag_serialNumber | -com_port portNumber] [-firmware firmware_file] -cmd read -file filename [-offset ofst] [-length byteLength] [-max size] [-y] [-nomessages messageFilter]

    Reads QSPI FLASH memory contents and writes them to a file.

  11. Executable [-sdk sdk_path] -type qspi -chip chip_version [-jtag jtag_serialNumber | -com_port portNumber] [-firmware firmware_file] -cmd write [-mode cached] -file filename [-offset ofst] [-max size] [-y] [-nomessages messageFilter]

    Burns file to QSPI FLASH memory. If -mode is specified, a header is added to make QSPI bootable. This option is not applicable for DA1469x.

  12. Executable [-sdk sdk_path] -type qspi -chip chip_version [-jtag jtag_serialNumber | -com_port portNumber] [-firmware firmware_file] -cmd erase [-offset ofst] [-sectors num] [-max size] [-verify] [-y] [-nomessages messageFilter]

    Erases all the QSPI FLASH memory or part of it. Sector size is 4KB.

  13. Executable [-sdk sdk_path] -type qspi -chip chip_version [-jtag jtag_serialNumber | -com_port portNumber] [-firmware firmware_file] -cmd write_field [-offset ofst] -data dataInHex [-max size] [-y] [-nomessages messageFilter]

    Burns dataInHex to QSPI FLASH starting from address ofst.

  14. Executable [-sdk sdk_path] -type qspi -chip chip_version [-jtag jtag_serialNumber | -com_port portNumber] [-firmware firmware_file] -cmd write_nv -file filename [-offset ofst] [-max size] [-y] [-nomessages messageFilter]

    Burns nv params file to QSPI at offset.

  15. Executable [-sdk sdk_path] -type qspi -chip chip_version [-jtag jtag_serialNumber | -com_port portNumber] [-firmware firmware_file] -cmd read_nv -file filename [-offset ofst] [-max size] [-y] [-nomessages messageFilter]

    Reads nv params from QSPI and writes its contents to a file.

  16. Executable [-sdk sdk_path] -type qspi -chip chip_version [-jtag jtag_serialNumber | -com_port portNumber] [-firmware firmware_file] -cmd read_part_table -file filename [-y] [-nomessages messageFilter]

    Reads Partition table from QSPI memory and saves it to a file.

  17. Executable [-sdk sdk_path] -type qspi -chip chip_version [-jtag jtag_serialNumber | -com_port portNumber] [-firmware firmware_file] -cmd read_partition -index partition_index [-offset ofst] [-length byteLength] -file filename [-y] [-nomessages messageFilter]

    Reads partition specified by the index of partition table and saves it to a file. Offset, if specified, should be relative to the partition start address. Length, if specified, can be used to read byteLength bytes instead of the whole partition.

  18. Executable [-sdk sdk_path] -type qspi -chip chip_version [-jtag jtag_serialNumber | -com_port portNumber] [-firmware firmware_file] -cmd write_partition -index partition_index [-verify] [-offset ofst] -file filename [-y] [-nomessages messageFilter]

    Writes file to the partition specified by the index of partition table. Offset, if specified, should be relative to the partition start address.

  19. Executable [-sdk sdk_path] -type qspi -chip chip_version [-jtag jtag_serialNumber | -com_port portNumber] [-firmware firmware_file] -cmd erase_partition -index partition_index [-verify] [-y] [-nomessages messageFilter]

    Erases the contents of the partition specified by the index of partition table.

  20. Executable -bundle commands_file

    Executes bundle of commands from input txt file.

  21. Executable [-sdk sdk_path] -chip chip_version -make_image -in_file inputFile [-out_file outputImg] [-priv_key priv_key | -generate_priv_key] [-pub_key_index pub_key_index] [-sym_key sym_key | -generate_sym_key] [-sym_key_index sym_key_index] [-nonce nonce_hex] [-rev rev_cmd]

    Prepares DA1469x family image. If any of the security related options is used (-priv_key, -generate_priv_key, -pub_key_index, -sym_key, -generate_sym_key, -sym_key_index, -nonce) a secure image will be created. The keys and nonce will be generated by default if the respective options are missing. If -rev option is also used, a secure image with device administration section will be created.

    Image produced is the same as the image when user press the “Prepare image” button in “Prepare QSPI Image” window.

    Applicable only for DA1469x-00.

Option Description:

Option Description
-sdk sdk_path Path to an SDK. Only devices and resources from the specified SDK are used. If the configuration xml of the SDK is invalid, the bundled support package matching the SDK’s family is used. When option is omitted, all the bundled support packages are used.
   
-type cli_type booter or power or otp or qspi
   
-cmd command Available commands are: write_header, write_custom_code, read_header, read_custom_code, capture_data, capture_stats, read, write, erase, run write_field. Look previous section for available combinations of -type and -cmd options.
   
-com_port portNumber An integer number indicating the UART COM Port. E.g. portNumber=3 for port COM3
   
-jtag jtag_serialNumber If -jtag option along with the jtag’s serial number has been specified the jtag interface will be used for communication with the chip. This option is muttually exclusive with the -com_port option.
   
-file filename Input or output filename. For write commands it is an input bin or hex file, containing the data to be burned to the chip. For read commands it is an output text, hex or bin file, where data should be stored.
   
-offset ofst The offset in OTP memory, from which read or write operation should start. If ‘ofst’ starts with ‘0x’ it is parsed as hex, otherwise as decimal
   
-length lengthInBytes The length in bytes to read from memory.
   
-chip chip_version Chip version. Acceptable values are DA14680-01, DA14681-01, DA14682-00, DA14683-00, DA15001-00, DA15000-00, DA15101-00, DA15100-00 and DA14699-AA. Note that available values differ depending on the selected SDK.
   
-duration durationInmSecs Duration of data capturing (integer number of msecs). Used in ‘capture_data’ Power Profiler command
   
-duration durationInSecs Duration of data capturing (integer number of secs). Used in ‘export_stats’ Power Profiler command
   
-sampling_interval interval An integer number indicating the number of seconds between the statistic samples
   
-time_offset time_offset Pre trigger sampling period (double number of msecs). Optional, default 0
   
-threshold threshold Threshold for considering active (in mA). If set, measured values are collected, exported and aggregated as stats only if their value is >= threshold. Optional, default 0.
   
-zero_samples_for_sw_cursor samples Integer value representing the number of zero samples that mark a SW cursor.
   
-sw_cursor_tolerance tolerance Decimal value (in uA) representing the upper threshold under which samples are considered to be equal to zero. Related to S/W cursors.
   
-sw_cursors_to_stop cursors_to_stop Integer value representing the number of sw cursors to trigger a stop event for data capturing.
   
-data_file data_filename Filename of .csv file with collected measurements
   
-stat_file stat_filename Filename of .csv file with collected statistics (e.g. peak current, avg current, charge)
   
-y Accept default values. Do not ask user.
   
-firmware firmware_file Firmware file that should be downloaded to chip before executing the command.
   
-nomessages messageFilter Disables a message category. messageFilter is a string combined of ‘1’ and ‘0’. The message categories are INFO, WARNING, ERROR, ACTION and ARGUMENT_PARSING. 00111 disables INFO and WARNING messages. 00111 is equal to 00, since by default all message categories are enabled.
   
-sectors num Specifies the number of sectors to be erased from QSPI Flash memory. If ‘num’ starts with ‘0x’ it is parsed as hex, otherwise as decimal. Sector size is 4KB.
   
-bundle commands_file Executes bundle of commands from input txt file.
   
-data dataInHex Data in hex with no spaces to write in OTP or QSPI Flash. E.g. 011234DE.
   
-close Close J-Link GDB Server after firmware download.
   
-mode cached Adds a suitable header to the file before burn in order to make qspi bootable in cached mode. This option is not applicable for DA1469x.
   
-max size Maximum size of QSPI memory. If ‘size’ starts with 0x, it will be parsed as hex number, otherwise as decimal.
   
-verify Verify QSPI Flash memory contents after erase, partition contents after write and erase.
   
-index partition_index Index of a specific partition in partition table. Starts from 0.
   
-writeReadOnlyOTPHeaderFields When writing to header, protected addresses values are replaced by 0. Using this option user can actually write a protected address (if not written yet)
   
-make_image Generates Da1469x family chip image from input file. Applicable only for DA1469x-00.
   
-in_file Input file for the DA1469x family image creation. Hex and bin files are accepted.
   
-out_file File where the DA1469x family image will be saved. Bin file is expected. If ommitted a new file with the _image.bin suffix is created in the same folder as the input file.
   
-priv_key Private key which will be used in Ed25519 to create the image signature. It must have 32 bytes in length. The key is expected in hex format, e.g. -priv_key 8E05FA7509F4D3B8F96B08DEFAA204A9BCEFF67AD28306B6D4A2DBAB3C238DCA
   
-generate_priv_key Instead of providing the private key with the -priv_key option, the key can be automatically generated. Its length will be 32 bytes.
   
-pub_key_index Index of the key which should be used for signature validation. A number in decimal or hex format (starting with 0x) is expected. If ommited index=0 is assumed.
   
-sym_key Symmetric key which will be used in executable encryption (AES CTR mode). It must have 32 bytes in length. The key is expected in hex format, e.g. -sym_key 7CAE0D855049BF06FCBCE2F274CAB39EAFF53AF9F818F171311EBD764FE95ACB.
   
-generate_sym_key Instead of providing the symmetric key with the -sym_key option, the key can be automatically generated. Its length will be 32 bytes.
   
-sym_key_index Index of the key which should be used for executable decryption by bootloader. A number in decimal or hex format (starting with 0x) is expected. If ommited index = 0 is assumed.
   
-nonce String in hex format with length of 8 bytes which will be used as ‘NONCE’ in AES CTR encryption of the executable. If ommited a random nonce will be generated.
   
-rev Decryption keys revocation command: Contains type and indices of the keys in AES CTR encryption of the executable which should be revoked. If more than one key is passed, parameter should be given in quotation marks. If index is preceded with ‘s’ then it concerns user data symmetric key. If index is preceded with ‘d’ then it concerns executable decryption symmetric key. Index without prefix concerns public key. Examples: -rev “1 2 s1 d2”, -rev d1

Non-mandatory options:

In commands listed above, optional arguments are placed between square brackets (e.g. [rate]). If user doesn’t set an optional argument, the following default values are used:

Option Default Value
[-offset ofst] 0x0000
[-length byteLength] 32768 (0x8000)
[-time_offset time_offset] 0
[-threshold threshold] 0
[-sectors num] 1
[-mode cached] none, no header added.
[-max size] W25Q80EW: 0x100000 W15Q16DVSSIG: 0x200000