Kinetis K80 FAQ

Document created by Anthony Huereca Employee on Dec 16, 2015Last modified by Anthony Huereca Employee on Jan 8, 2016
Version 5Show Document
  • View in full screen mode

This document covers some of the more common questions about the new Kinetis K8x family. Any new specific issues or questions should be posted into it's own thread, and will be added to this document as appropriate.

 

Kinetis K80 Basics

What is the K8x family?

It is a new Kinetis family of Cortex-M4F devices, running up to 150MHz, that include 256K of Flash and 256K of SRAM. It features FS USB, SDRAM, QuadSPI, SPI, I2C, LPUART, and much much more.

 

How does the Kinetis K8x family differ from other Kinetis K families?

The K8x family offers the same advantages and compatibility as other Kinetis K families, but also offers several new features not found on other Kinetis K families:

  • QuadSPI Support
  • Dual Voltage Domains (independent VDDIO domain down to 1.8V for QuadSPI or other interfaces)
  • EMVSIM (Euro, MasterCard, Visa Serial Interface Module)
  • FlexIO

 

Additionally the K81 and K82 families offer the following new security modules:

  • LTC (Low Power Trusted Cryptography)
    • Encryption / Decryption algorithms in hardware (as opposed to using mmCAU s/w libs)
  • OTFAD (On The Fly AES Decryption)
    • Zero latency decryption when executing encrypted code from QuadSPI
  • Secure RAM
    • 2KB of Secure Session RAM

 

Because of the addition of a second voltage domain and QuadSPI, there is no hardware pin compatibility with previous Kinetis derivatives. However there is significant module and enablement re-use, so if you’re familiar with other Kinetis devices, it will be easy to get started with the K80.

 

Where can I find reference manuals, datasheets, and errata?

These can be found on the K8x documentation pages.

 

Detailed information on the K81 is under NDA, so please contact your NXP sales representative for those documents.

 

What’s the difference between the different K8x devices?

K80 is the base version, which includes QuadSPI controller, SDRAM controller, FS USB, and much more.

K81 adds DryIce Tamper Detect and the LTC/OTFAD modules

K82 adds just the LTC/OTFAD modules

 

K80 and K82 families have the same pin out for their respective packages. The pinout for K81 is slightly different but can still be compatible.

 

What boards are available to evaluate the K80 family?

FRDM-K82F: A Freedom board with a 100LQFP K82 device. Also includes dual QuadSPI, touch pad, Arduino compatible footprint, and FlexIO header compatible with OV7670 camera.

 

TWR-K80F150M: A Tower board with 121XFBGA K80 device. Includes dual QuadSPI, SDRAM, EVMSIM, SDCard holder, touch pads, and more.

 

TWR-POS-K81: A Point of Sale reference design board in tower form factor. This board is only available via your NXP sales representative.

 

The K8x MCU Family Hardware Tools selection guide has more details on board differences.

 

What packages are available?

The 100 LQFP and 121 XFBGA packages are lead packages available today. The 144 LQFP package and the WLCSP are part of the Package Your Way (PYW) program, and you should contact your NXP sales representative if interested in those packages.

 

What is the difference between K8x and KL8x families?

The KL8x family shares many of the same features as the K8x family. The biggest differences are that the KL8x family uses the Cortex-M0+ core (instead of Cortex-M4F), has a lower max clock speed, and has less internal Flash and RAM. It also reduces the instances of peripherals available, but still includes QuadSPI, FlexIO, LTC, and BootROM peripherals like on the K80. See the KL8x Fact Sheet for more details. KL8x devices will be available in the first quarter of 2016.

 

Software/Tools

Where can I find instructions and details on the hardware used to evaluate the K8x family?

FRDM-K82F: http://nxp.com/frdm-k82f/startnow

TWR-K80F150M: http://nxp.com/twr-k80f150m/startnow

 

Which version of Kinetis SDK supports the K8x family?

Kinetis Software Development Kit (KSDK) support is split depending on the evaluation platform.

 

For TWR-K80F150M, support can be found in the Kinetis SDK 1.3 Mainline Release.

 

For FRDM-K82F, support can be found in the Kinetis SDK FRDM-K82F Stand-alone release.

 

Note that the FRDM-K82 standalone release is truly standalone, and does not require the mainline release to be installed.

 

How do I run the FRDM-K82F OV7670 camera demo?

See this Community post: https://community.freescale.com/docs/DOC-329438

 

How can I use the micro SD card reader on the TWR-K80F150M?

Because the SD card signals are shared with the QuadSPI signals, the SD card slot is not connected by default. See section 3.14 of the TWR-K80F150M User Guide for details on how to connect it, with the understanding that QuadSPI will not be available on the board while using SDHC.

 

How do I use the SDRAM on the TWR-K80F150M?

See section 3.9 of the TWR-K80F150M User Guide. Due to the layout of the board, the OpenSDA UART feature cannot be used while running the SDRAM as jumpers J6 and J8 need to be removed.

 

 

QuadSPI

What is QuadSPI Flash? Why should I use it?

QuadSPI is a name for a popular type of serial NOR flash memory that is SPI compatible, but also allows for multiple data lines (up to 4 per device, or 8 if done in parallel) with bi-directional data for increased memory bandwidth. The QuadSPI controller on the K8x also allows for Execute-In-Place (XIP) mode so that code can be executed out of this external memory. QuadSPI memory can be used for either extra memory storage or for extra code space, or a combination of both. After initialization, it appears as a readable area of memory starting at 0x6800_0000 (as well as at the alias regions).

 

How can I program the QuadSPI?

There is an example application in Kinetis SDK that shows how to program the QuadSPI at C:\Freescale\KSDK_1.3.0\examples\twrk80f150m\driver_examples\qspi

 

For programming an entire application, the ROM bootloader can be used. Details are in the K80 Bootloader Tools Package.

 

The Kinetis Bootloader QuadSPI User's Guide that comes as part of that package describes all the steps needed to get up and running with QuadSPI. There is also an example Kinetis SDK application that runs out of QuadSPI at C:\Freescale\KSDK_1.3.0\examples\twrk80f150m\demo_apps\hello_world_qspi_alias

 

What performance tips are there if doing QuadSPI XIP?

A few key performance factors:

  • Ensure both the data and instruction cache is enabled
  • Use as many data lines as possible (4, or 8 if available in dual/octal modes)
  • Use DDR mode
  • Any critical code should be placed in Flash/RAM for fastest performance
  • If using XIP, code should be executed out of the QuadSPI aliased address space which starts at 0x0400_0000.

A more detailed app note is under development.

 

How do I debug code located in QuadSPI?

You must make use of the aliased QuadSPI address space at 0x0400_0000. There is an example of this in the hello_world_qspi_alias example in Kinetis SDK. Due to the architecture of the M4 core on Kinetis, breakpoints cannot be set in the 6800_0000 address space, which is why the alias address space is provided.

 

What app notes are available for the QuadSPI?

Because the QuadSPI module found on the K8x family has also been used on other NXP devices, there are some app notes available that can be useful for QuadSPI development. Note that some of the implementation details and features as described in the app notes will be different for K8x, so please use the K8x reference manual for full details.

AN4186

AN4512

AN4777

 

ROM Bootloader

Where can I find more information on the bootloader that comes built into the silicon of the K8x family?

Download the K80 Bootloader Tools package.

 

If interested in QuadSPI, the Kinetis Bootloader QuadSPI User's Guide that comes as part of that package describes all the steps needed to get up and running with QuadSPI.

 

The other information found on the Kinetis Bootloader website is also useful as this is what the ROM Bootloader is based off of.

 

What interfaces does the ROM Bootloader support?

The ROM Bootloader on the K8x family can interface via LPUART, I2C, SPI, or USB HID (via BLHost) to erase and program both the internal flash and/or QuadSPI flash. This is the same bootloader found on other Kinetis devices, but also includes some more advanced features to support QuadSPI.

 

How can I enter bootloader mode?

By default, when using a Kinetis SDK project, the bootloader is disabled and the code immediately jumps to the address in Flash pointed at location 0x4.

 

By asserting the NMI pin at reset though, the part can be forced to enter bootloader mode. This is useful for programming the QuadSPI or interfacing with the bootloader in other ways. This feature is controlled via the FOPT[BOOTPIN_OPT] bit, which the Kinetis SDK code sets to '0' to enable the NMI pin to enter bootloader mode.

 

The NMI button on each board is:

FRDM-K82F: SW2

TWR-K80F150M: SW2

 

The FOPT register (at 0x40C) can be modified to always go into Bootloader mode if desired. Details are in boot chapter of the K80 reference manual.

 

Where is the bootloader configuration data found in Kinetis SDK?

The Bootloader Configuration Area (BCA), which begins at address 0x3C0, is defined in C:\Freescale\KSDK_1.3.0\platform\devices\MK80F25615\startup\system_MK80F25615.c starting on line 133. You must also add the define BOOTLOADER_CONFIG in the project settings to let the linker files know to program this BCA area.

 

The FOPT configuration register (at 0x40D) is defined in C:\Freescale\KSDK_1.3.0_K82\platform\devices\MK82F25615\startup\<compiler>\startup_MK80F25615.s and by default is set to 0x3D which disables the bootloader, but does enable the option to enter bootloader via the NMI pin at reset (see previous question)

 

How can I use the UART port on the FRDM-K82F with the BootROM?

The OpenSDA/UART lines on the FRDM-K82F use LPUART4, which is not used by the BootROM. If you would like to use the serial UART lines to interact with the BootROM, you can blue wire a connection from either J24 or J1, and connect to R32 (RX) and R36 (TX). This was due to muxing trade-offs.

 

The OpenSDA/UART lines on the TWR-K80F150M are connected to UART1 and thus no modification is necessary for that board.

 

Also keep in mind that you can use the USB interface with the BLHost tool on both boards with no modification.

 

The examples in Kinetis SDK setup the QuadSPI Configuration Block (QCB) data using a qspi_config.bin file. How can I generate my own custom QCB file?

There is a C file that come as part of Kinetis SDK (C:\Freescale\KSDK_1.3.0\examples\twrk80f150m\demo_apps\hello_world_qspi\qspi_config_block_generator.c) or in the KBoot zip file, that can be compiled with various toolchains on a host computer, that will then produce a .bin file. You could import this file, and then after compilation, run it, and it will write out the new .bin to your hard drive.

 

There is a tool under development that simplifies this process by reading in that example .bin file and then you can modify the fields in the app, and then it will write out the modified .bin file.

 

Can I jump directly to QuadSPI for Execute in Place (XiP) after booting?

Yes. However note that you must still put the Bootloader Configuration Area (BCA) into internal flash. And you also may want to put the QuadSPI Configuration Block (QCB) in flash as well since it needs to be read before the QuadSPI is setup. Thus even if all your code is in QuadSPI address space, the internal flash must also be written at least once to put in the configuration data. Once you have that set though, then you can develop code by only programming the QuadSPI address space.

 

 

Troubleshooting

I’m having debugger connection issues when using an external debugger, like a Segger JLink. Why?

It’s likely that the OpenSDA circuit is interfering, and thus needs to be isolated via jumpers on the board.

For TWR-K80F150M: Pull J16 and J17

For FRDM-K82F: Pull J6 and J7

 

Also make sure you are using the correct debug header for the K8x device on the board:

For TWR-K80F150M: J11

For FRDM-K82F: J19

 

Where is the CMSIS-DAP/OpenOCD debug configuration for the K8x family in Kinetis Design Studio?

KDS 3.0 does not support programming the K8x family via the CMSIS-DAP interface. You will need to change the OpenSDA app on the board to either J-Link or P&E as described in the K8x Getting Started guides (Part 3).

 

I can't get OpenSDA on the FRDM-K82F into bootloader mode.

Make sure jumper J23 is on pins 1-2 to connect the reset signal to the OpenSDA circuit. On some early versions of the board this was incorrectly installed on pins 2-3 instead.

 

When using IAR with the default CMSIS-DAP debug interface, I sometimes get the error: “Fatal error: CPU did not power up”

This is an issue in some older versions of IAR. Upgrade to at least version 7.40.5 which fixes this.

 

When using KDS with the JLink interface with the FRDM-K82F board, I get an error.

If you see the error "The selected device 'MK82FN256XXX15' is unknown to this version of the J-Link software." it's because the J-Link driver that comes with KDS 3.0.0 does not know about the K82 family. You can either select a MK80FN256XXX15 device (which is compatible with the K82 on the board) or update the JLink software by downloading and installing the latest JLink Software and documentation pack. At the end of the installation process it will ask to update the DLLs used by the IDEs installed on your computer, so make sure to check the KDS checkbox on that screen.

 

I’m using the P&E OpenSDA App and debugging is not working. I get either "Error reading data from OpenSDA hardware. E17925" or “The system tried to join a drive to a directory on a joined drive” in KDS

If using IAR, make sure you have the latest version (7.40.7 or later)

 

If using KDS, you need to update the P&E plugin in KDS. Go to Help->Check for Updates, and select the P&E debug update. Make sure not to select the other debugger updates as it will break it in KDS 3.0.0 (see this thread)

Attachments

    Outcomes