Kinetis Series Devices

From SEGGER Wiki
Revision as of 09:18, 7 June 2016 by Erik (talk | contribs) (Created page with "''''FlexNVM partitioning'''' '''FlexNVM partitioning with J-Flash:''' There is a project in J-Flash you can use as reference. # Open J-Flash # Open J-Flash project. It can b...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

'FlexNVM partitioning' FlexNVM partitioning with J-Flash:

There is a project in J-Flash you can use as reference.

  1. Open J-Flash
  2. Open J-Flash project. It can be found in your JLink folder: \Samples\JFlash\ProjectFiles\Freescale\MK40DX256xxx10_ConfigureDataFlash.jflash
  3. Open Options->Project settings->CPU. The procedure how to do a partition is described in the Init steps.

Please refer to the Freescale manual for further information on doing FlexNVM partitioning.



FlexNVM partitioning with J-Link Commander:

The partitioning can be realized with the Commander by using a Command file.

Example for invocation:

JLink.exe -device MK66FX1M0xxx18 CommanderScript c:\K66FX1M0VMD18.jlink


Example content of a J-Link Command File:

si 1
speed 4000
r
w1 0x40020000, 0x70
w1 0x40020007, 0x03
w1 0x40020006, 0x80
w1 0x40020005, 0x00
w1 0x40020004, 0xFC
w1 0x4002000F, 0x00
w1 0x40020000, 0x80 
sleep 5
w1 0x40020007, 0x80
w1 0x4002000B, 0x32
w1 0x4002000A, 0x0D
w1 0x40020000, 0x80
sleep 5
r


For further information please read the instructions in the J-Link User Guide (UM08001), chapter 3.2.3 "Using command files"

'Reset on Kinetis devices' It is possible to perform a Reset via the MDM-AP Control Register. This can be realized by using J-Link scrip files (ch. 5.10 "J-Link script files"). Please consider that a reset via the MDM-AP CR is unreliable as it does not work for most Kinetis devices. For example, to perform an unsecure the device has to be in reset state and as setting reset via MDM-AP CR does not work for most devices, the only recommendable way is to perform the reset via the reset pin.

'Secured Kinetis devices detected' In case of a secured Kinetis device has been detected by the J-Link DLL, the DLL will show up a dialog which allows the customer to unlock the selected device. This dialog can be suppressed by checking the "Do not show this message again" check box. The selection will be saved in the registry path below:

HKEY_CURRENT_USER -> Software -> SEGGER -> J-Link -> "DontShowAgainUnlockKinetis". 

The message box can be re-enabled by changing the registry key value of "DontShowAgainUnlockKinetis" from 1 to 0.

'Writing to Program Once Field' The K10 devices have a special storage within the program flash IFR called "Program Once Field". Data can be written to this field by using the "Program Once command".

It is possible to add the corresponding sequence, described in the chip user manual, into the "Init / Exit steps" in the J-Flash project settings. Theses steps are executed before (init steps) or after (exit steps) programming. For further information regarding this, please refer to chapter Settings -> Project Settings -> Flash settings in the J-Flash user guide (UM08003).

'EzPort disables debug interface' Some Freescale Kinetis devices come with an SPI-like interface called RzPort which can be used to perform flash operation without establishing a debug interface connection. Please note that using the RzPort disables the JTAG debug interface and therefore J-Link can not establish a connection to the target device. To guarantee a proper debug connection, we recommend to assemble a pull-down resistor connected to the chip select signal of the EzPort (EZP_CS) which disables the RzPort.