MK22DX128M5 - FlexNVM configuration, PEMicro Multilink

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MK22DX128M5 - FlexNVM configuration, PEMicro Multilink

775 Views
jstark
Contributor II

I'm trying to configure the FlexNVM block on an MK22DX128M5 micro using a PEMicro Multilink debug interface. I'm currently running MCUXpresso IDE v10.1.1 [Build 606] [2018-01-02] under Mint 18, which is based upon Ubuntu 16.04.1. For my application, I want to allocate the full 64 k flash block for EEPROM storage, 64 bytes of FlexRAM with 1/4 assigned to subsystem A and 3/4 assigned to subsystem B. These configuration parameters correspond to the following settings if I'm interpreting the Reference Manual correctly:

EESPLIT: 2'b01

EESIZE: 4'b1000

DEPART: 4'b0100 or 4'b1011

In the Debug pulldown -> Debug Configurations... -> Debugger dialog, I'm selecting "Emergency Kinetis Device Recovery by Full Chip Erase" under Addtional Options. In the Advanced Options dialog, I select "Enable partitioning for the device", with a value of 1804. If I then click "OK" to close the Advanced Options dialog, then "Apply" followed by "Debug" on the Debugger Configuration dialog, the device is programmed and I will eventually end up in the debugger.

Following this sequence, I do not see that the device is configured as expected. Inspecting the EEPROM Data Set Size and FlexNVM Partition Code registers at addresses 0xfd and 0xfc, respectively, I find values of 0x05 and 0x71. Neither makes sense and write operations to FlexRAM are not preserved across power cycles.

It's not clear to me that I'm attempting to use the configuration tool provided by the debugger correctly, so that may be the root of the problem. Since I can type the string "abcd" into the partitioning code dialog window but not "0x1804" nor the decimal equivalent of that value, I presume that the value I do enter is in fact hexadecimal. Also, the Erase Options pulldown on that page is always grayed-out, so perhaps attempts to erase the value presently stored in the flash IFR are being ignored or rejected. I've also noted that the values stored at addresses 0xf0, 0xf4 and 0xf8 are 0x00000559, 0x0000561, 0x000000569, respectively, so the value 0x00000571 that I'm seeing could possibly be part of a pattern.

Any assistance in understanding this process or guidance which will enable me to perform this configuration successfully will be most appreciated.

0 Kudos
2 Replies

597 Views
jstark
Contributor II

The device I'm using is MK22DX128M5, not MK20... That device is supported in MCUXpresso (as it was in KDS) and an SDK is available. It appears, given some information I've learned from the PE Micro forum, that perhaps the device is being partitioned as expected. What doesn't make sense at the moment are the values I'm reading from addresses 0xfc and 0xfd. If I find an answer to that question, I'll post a follow-up in this thread.

0 Kudos

597 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi,

But it seems MCUXpresso does not support K20DX128M5. There is no SDK for this chip. Which SDK do you use?

I think you can refer to eeprom demo SDK_2.3.0_TWR-KE18F\boards\twrke18f\driver_examples\flash\flexnvm_eeprom. Kinetis device has same flash structure. There are also some application notes you can use, like an4282 and an5338.

Regards,

Jing

0 Kudos