Difference between revisions of "J-Link flash programming"

From SEGGER Wiki
Jump to: navigation, search
(Created page with "__TOC__ = Verification methods = TBD")
 
 
(10 intermediate revisions by one other user not shown)
Line 2: Line 2:
   
 
= Verification methods =
 
= Verification methods =
  +
There are different verification methods and levels of verification available for J-Link. In the following, the available configurations are explained
TBD
 
  +
  +
== L1-verify ==
  +
  +
The level-1 verification is is performed immediately after programming a chunk of data into flash. Due to necessary handling for some modern MCUs (read not allowed in certain states), it was superceded by L2 verification. It is therefore deprecated and only rarely used.
  +
  +
== L2-verify ==
  +
The level-2 verification is performed after all data has been programmed. It is performed over all data that has been programmed. The L2-verify can be configured to be performed via different methods which are explained in the following:
  +
  +
* Read-back: The data is read back and compared against the data that was programmed
  +
* CRC: A CRC over the data in flash is calculated by the flash algo and this CRC is sent back to the PC software to compare it against the CRC of the data to be programmed. This way of verification is much faster than "read-back" because not all data from flash must be transmitted over the debug interface and USB / IP to the PC for comparison.
  +
  +
'''Note:''' CRC is much faster than reading back all data and gives a very good security to detect errors. It is the default for L2-verify.
  +
  +
== Configuring verification levels and methods ==
  +
The verification levels can be enabled / disabled and the method of the L2-verify can be configured via the [[J-Link control panel | J-Link Control Panel]]
  +
  +
The following methods are available for L2-Verify:
  +
  +
[[File: FlashDL_ControlPanel_VerifyMethods.png]]

Latest revision as of 16:55, 16 May 2024

Verification methods

There are different verification methods and levels of verification available for J-Link. In the following, the available configurations are explained

L1-verify

The level-1 verification is is performed immediately after programming a chunk of data into flash. Due to necessary handling for some modern MCUs (read not allowed in certain states), it was superceded by L2 verification. It is therefore deprecated and only rarely used.

L2-verify

The level-2 verification is performed after all data has been programmed. It is performed over all data that has been programmed. The L2-verify can be configured to be performed via different methods which are explained in the following:

  • Read-back: The data is read back and compared against the data that was programmed
  • CRC: A CRC over the data in flash is calculated by the flash algo and this CRC is sent back to the PC software to compare it against the CRC of the data to be programmed. This way of verification is much faster than "read-back" because not all data from flash must be transmitted over the debug interface and USB / IP to the PC for comparison.

Note: CRC is much faster than reading back all data and gives a very good security to detect errors. It is the default for L2-verify.

Configuring verification levels and methods

The verification levels can be enabled / disabled and the method of the L2-verify can be configured via the J-Link Control Panel

The following methods are available for L2-Verify:

FlashDL ControlPanel VerifyMethods.png