Kinetis Software Development Kit Knowledge Base

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

Kinetis Software Development Kit Knowledge Base

Labels

Discussions

Sort by:
So far the composite msd_cdc demo from ksdk 1.3 just supports ram disk application, to have the SD card support just as the dev_msd demo, you have to go through the following steps: Add platform/composite/src/sdcard/fsl_sdhc_card.c and platform\drivers\src\sdhc\fsl_sdhc_irq.c to the project. Add project including path: platform\composite\inc and platform\drivers\inc. Change usb\example\device\composite\msd_cdc\disk.c as attached file      Change usb\example\device\composite\msd_cdc\disk.h as attached file      Change usb\example\device\composite\msd_cdc\hardware_init.c as attached file. Compile the demo and let it go, the PC would recognize the MSD and CDC device,  but might need you install the CDC driver, use the one from the folder of "C:\Freescale\KSDK_1.3.0\examples\twrk60d100m\demo_apps\usb\device\cdc\virtual_com\inf". With SD card inserted , you may see the removable disk, and format the disk just like below: Copy a ~50M file to this disk eject the disk after done, and then pull and plug the device again, you may verify the copied file with fc.exe command This solution has been tested on TWR-K60D100M with TWR-SER, both bm and mqx examples are verified ok, please kindly refer to the attached files for more details.
View full article
Introducing Kinetis SDK v2 Kinetis SDK v2 is available on www.nxp.com/ksdk web page. Click on Build your SDK now to customize the KSDK based on your selection of device or evaluation hardware, RTOS, build system and more.   (Did you see the announcement of MCUXpresso IDE, SDK and Config Tools?  Kinetis SDKv2 is being renamed to MCUXpresso SDK and expanding to cover LPC devices as well.  Check out the MCUXpresso SDK webpage and Community for more information.)   What's New in Kinetis SDK v2? As was true for KSDK v1, v2 is a collection of comprehensive software enablement for NXP Kinetis Microcontrollers. It includes system startup, peripheral drivers, USB and connectivity stacks, middleware, and real-time operating system (RTOS) kernels. The Kinetis SDK also includes getting started and API documentation (online, PDF) along with usage examples and demo applications. However, v2 features several new components and improvements upon v1.   Note: The Kinetis SDK v2.0 Transition Guide provides more details about the differences and things to consider when moving from KSDK v1 to v2.   Updated Peripheral Drivers KSDK v2 eliminates the separate HAL and Peripheral Driver, replacing these two layers with a single driver for each peripheral. The single driver provides both the low-level functionality of the HAL and the non-blocking interrupt-based functionality of the Peripheral Driver. Peripheral drivers in KSDK v2 also eliminate external software dependencies on an OSA, Power Manager, and Clock Manager.  This makes the drivers easier to configure and more suitable for usage outside of the KSDK environment.   Simplified Folder Structure The folder structure of KSDK v2 has been simplified. The image below shows the folder structure for a KSDK v2 build for FRDM-K64F. The boards folder has been elevated to the top level and contains folders for all supported evaluation hardware. Specific board folders contain demo application, driver examples, middleware examples, and RTOS examples—all designed and tested to run on that specific board. The CMSIS folder contains the ARM® CMSIS vendor-independent hardware abstraction layers for Cortex®-M devices including CMSIS-CORE include files and CMSIS-DSP source and libraries.   The devices folder has also been elevated to the top level.  This folder contains sub-folders for each supported Kinetis MCU device.  KSDK v2 does not have a separate platform library.  All peripheral drivers can be found in the drivers folder contained within each device. Here you’ll find all the drivers for the given device.  This greatly simplifies include path requirements and makes it easy to determine which drivers apply to which devices.   You’ll also find middleware, and rtos folders at the top level that contain subfolders with source code for all middleware components and RTOS kernels supported.   RTOS Support One of the most notable changes in KSDK v2 is the focus on FreeRTOS.  All RTOS examples now use the FreeRTOS kernel.  Micrium μC/OS-II and μC/OS-III kernels are also pre-integrated into the KSDK (under an evaluation license).  RTOS peripheral driver wrappers for FreeRTOS and uC/OS-II & III are also provided that leverage native RTOS services (with no OSA).  These are provided for use as-is or as examples for how to integrate KSDK drivers and middleware with other Operating Systems.   The MQX kernel, stacks and middleware have been removed from the Kinetis SDK.  However, MQX Software is still a supported software suite from NXP that is available in the MQX RTOS and MQX for KSDK v1.3 products. New ports of MQX following the “Classic” architecture (i.e. similar style to MQX v4.x) will soon be available for newer Kinetis devices.  From here forward, the Kinetis SDK will focus on open-source RTOS solutions.   Middleware KSDK v2 features a few new and updated middleware packages. The USB stack is new and now offered under an open source, permissive license. lwIP and FatFS are retained as open source solutions or TCP/IP communications and filesystem support, respectively. There are also two optional cryptography packages, available separately, that have been pre-integrated and tested with the Kinetis SDK: wolfSSL and mbedTLS.   Supported Devices A complete list of support devices has been published in the new MCUXpresso Community.     Toolchain Support KSDK v2 supports the latest versions of: Kinetis Design Studio IAR Embedded Workbench Keil MDK Atollic TrueSTUDIO GNU GCC command line usin CMake   Project Generators Kinetis Design Studio (KDS) and Kinetis SDK v2 An update is available for KDS v3.x that adds a Kinetis SDK v2.x New Project wizard.  See this KDS Community post for details on installing the update.   Stand-alone KSDK Project Generator To quickly create new Kinetis SDK projects, or to clone existing projects, use the Kinetis SDK Project Generator   Configuration Tools Unlike KSDK v1, v2 does not have Processor Expert support available.  A new suite of configuration tools is being created that will build on KSDK v2 and will be rolled out throughout 2016.
View full article
Hello KSDK team!   I created helpful tutorial, how to install new version of KSDK.   1) Go to www.nxp.com/ksdk and click to Download button 2) Now choose the Kinetis SDK v2 & v1.3 click Download button 3) At the moment you are redirected to the Kinetis Expert Site, please go to Build an SDK 4) Please, sign in and click Sign in 5) Select MCU for the work and click Select Configuration 6) Selected MCU is supported by KSDK 2.0, you can download the package, choose the toolchain and Operation System. (Also you can add µC/OS-II and µC/OS-III to your package), click on Build SDK Package 7) Done, check Software Vault tab 😎 Please, go to Preferences 9) Please, fill the Preferences and don´t forget Save 10) After successful filling Preferences you are able to see the package in the window 11) Read the Software Terms and Conditions and agree with them 12) Save the package and you can start with KSDK 2.0   SDK API Documentation v.2.0 is located Kinetis SDK 2.0 API Reference Manual: Introduction Enjoy KSDK 2.0!   All feedbacks are very welcome!   Best Regards, Iva
View full article
Download from Software Development Kit for Kinetis MCUs|NXP   How to: install KSDK 2.0 Using Kinetis Design Studio v3.x with Kinetis SDK v2.0   Kinetis SDK 2.0 API Reference Manual: Introduction   For older versions KSDK, KDS: Kinetis Design Studio Videos, Part 1: Installation of KDS and Kinetis SDK Kinetis Design Studio Videos, Part 2: Installation of OpenSDA Firmware on Freedom Board Kinetis Design Studio Videos, Part 3: Debugging with Kinetis Design Studio Kinetis Design Studio Videos, Part 4: Using Processor Expert in KDS   Installing Kinetis SDK into KDS Kinetis Design Studio V3.0.0- User´s Guide   other documentations you can download from Software Development Kit for Kinetis MCUs|NXP
View full article
Kinetis SDK v2 is here! Introducing Kinetis SDK v2 The first steps with KSDK How to start with KSDK* List of published examples: KSDK list of examples* List of published documents: KSDK list of documents* * All of the source code placed in spaces above is for example use only. NXP does not accept liability for use of this code in the user’s application.
View full article
Documentation for current KSDK 1.3 is located under C:\Freescale\KSDK_1.3.0\doc Application Notes and another documents are located under Software Development Kit for Kinetis MCUs|NXP   There are more documents, which were created:   KSDK 2.0 How to: install KSDK 2.0 Introducing Kinetis SDK v2 Using Kinetis Design Studio v3.x with Kinetis SDK v2.0   KSDK 1.3 How to add SD card support in the composite msd_cdc demo[KSDK 1.3] KSDK Clock configurations and Low Power modes with Processor Expert New Kinetis SDK Project Generator v2 is available! KSDK Project Generator - BUG workaround KSDK 1.3 Documents Plugin in KDS - is available now! KSDK 1.3.0 Documents Plugin for KDS 3.0.0   KSDK 1.2 Interrupt handling with KSDK and Kinetis Design Studio Creating a New USB project with KSDK and Processor Expert support in KDS IAR MQX TAD solution for "Unknown error" in Task error code (with KSDK) How to Add lwIP to KDS3.0 Project How to: Create a New FreeRTOS for KSDK1.2 Project in KDS3.0 How to Create a C++ Project Using MQX RTOS for KSDK1.2 How to implement a USB Device MSD demo based on KSDK PEx components and KDS 3.0 How to: execute the demo HVAC on lwIP TCP/IP Stack in KSDK Kinetis SDK FAQ Adding TAD shell in KSDK shell demo FRDM-KL43Z and KL33Z - standalone package New KSDK 1.2. is available! Getting started with KSDK: Building the demo applications   KSDK 1.1 KSDK 1.1 Release How to create copy of KSDK example in KDS UART Example with KSDK   KSDK 1.0 Create new KSDK Projects Kinetis SDK and FRDM-K64F Sharing one documentation issue in KSDK 1.0 demo user guide
View full article
Examples for current KSDK 1.3 are located under C:\Freescale\KSDK_1.3.0\examples examples for middleware (tcpip, filesystem) under C:\Freescale\KSDK_1.3.0\middleware   There are more examples, which were created:   KSDK 1.3 Rainbow color using FTM PWM with KSDK 1.3 How to use printf() to print string to UART in KDS3.0 + KSDK1.3 Driving 16x2 LCD using KSDK drivers Integrating NFC Controller library with KSDK KL43Z support for sLCD and Touch sense using KDS3.0 +KSDK1.3.0 + Processor expert   KSDK 1.2 Using DMA to Emulate ADC Flexible Scan Mode with KSDK Writing my first KSDK1.2 Application in KDS3.0 - Hello World and Toggle LED with GPIO Interrupt Controlling speed in DC motors and position in servomotors with KSDK [FTM + GPIO] Line scan camera with KSDK [ADC + PIT + GPIO] A simple way to detect the track's center for the Freescale Cup Smart Race FatFs + SDHC data logger with KSDK in Kinetis Design Studio Segment LCD Example for KSDK KSDK GPIO driver with Processor Expert DAC Sinus Demo (using PEx + KSDK 1.2 + KDS 3.0) How to start customized KSDK project based on KSDK demo code   KSDK 1.1 An example project for FIR function implement on KV31 with SDK and CMSIS How to toggle LED in KDS 2.0 with KSDK 1.1.0 and Processor Expert KSDK SPI Master-Slave with FRDM-K64F Configuring Kinetis Software Development Kit (KSDK) to measure distance with ultrasonic transducers A demo project of USB HID bi-directional generic device for Kinetis SDK 1.1.0 Configuring Kinetis Software Development Kit (SDK) to measure distance with infrared (IR) sensor Writing my first KSDK Application in KDS - Hello World and GPIO Interrupt   KSDK 1.0 Writing your first toggle LED application with FRMD-K64F + KDS 1.1.0 + KSDK 1.0.0 Non-Processor Expert Low Power Application Using the SDK KSDK I2C EEPROM Example
View full article
This document includes two chapters , chapter 1 is about how to use printf() to print string in KSDK1.3 project , the usage in project without MQX has been introduced on another document, you can find it here : https://community.freescale.com/docs/DOC-104349 , so in this DOC I only introduce how to use the printf() in KSDK MQX- Lite and KSDK MQX-Standard project .   Chapter 2 introduces how to check which UART port is used when use printf() to print string on the FRDM board and TOWER board .   In sum, only the project of “MQX standard” use it own driver for printf(), so we need delete the driver “fsl_debug_console”. In other SDK+PE projects , they all use the driver of “fsl_debug_console” for printf().
View full article
Hello dear community:   The attached document is an introductory guide to the Clock configuration system and Power manager system in KSDK v1.3 and its configuration using Processor Expert.   Some topics covered:   - KSDK Clock Manager system- Clock manager notification framework - Clock switch callbacks - KSDK Power Manager system - Power manager notification framework - Power mode switch callbacks - Creating and managing clock/power configurations with Processor Expert. - Managing custom clock/power callbacks with Processor Expert.   There is also an example project attached created for the FRDM-KL27Z board, but it can be taken as reference to use a different evaluation board or custom board. This project was developed by colleague Adrian Sanchez Cano.   I hope you find it useful. In case of any doubts please do not hesitate to ask.   Regards! Jorge Gonzalez
View full article
This solution is just for you, who does not enjoy finding documentation for KSDK does not enjoy many opened windows (all in one) often ask where is the documentation for KSDK like an overview will appreciate embedded help   For detailed information please see KSDK 1.3.0 Documents Plugin for KDS 3.0.0   I hope you will really invite this tool. Iva
View full article
When you need to create copy/clone of i.g. web_hvac example for FreeRTOS as standalone project, you can face this issue. It is impossible to work with the copy. Why? There is missing folder for RTOS and LIB.   ISSUE: You start to clone example There is missing folder for RTOS Also missing library ksdk_freertos_lib which is needed for the example Impossible to compile the project, because folder mentioned above are missing in the project WORKAROUND: Just add the folder rtos from C:\Freescale\KSDK_1.3.0 The same for the library, you add to the folder from C:\Freescale\KSDK_1.3.0\lib Import .wsd file Wsd file was successfully imported, library is included Build successful finished   I hope this helps you. Iva
View full article
Hello to all,   This document explains how to drive a 16x2 LCD using the KSDK Drivers using the FRDM-KL25Z.     Project Generator, KSDK1.3 and KDS3.0 are used in this example.   I hope you find it useful. David
View full article
For downloading this tool please go to Software Development Kit for Kinetis MCUs|Freescale   Features mentioned in Release Note:   The following features are available with the KSDK Project Generator 1.0 GA tool: Cross platform Operates on Windows, Linux, and Mac OSX Developed in 32-bit Python 2.7 on Windows 7, Ubuntu 14.10, OSX 10.10 & 10.11 Supports KSDK 2.0, KSDK 1.3.0 and 1.2.0 (and is needed to install KSDK 1.2/KSDK 1.3) Quick Generate of development board based KSDK projects Advanced Generate of New KSDK based projects Device or development board based Linked to KSDK installation or standalone RTOS support HAL or Platform library level projects Libraries in standalone projects tailored to device package KDS, IAR EWARM, Keil MDK, and/or Atollic TrueSTUDIO IDE projects Advanced Generate of KSDK ‘demo_apps’ Clones Clone projects located in ‘demo_apps’ folders for each development board Linked to KSDK installation or standalone clones   Known issue for cloning example as standalone project: Please see my workaround here KSDK Project Generator - BUG workaround   Enjoy this tool ! Any feedback is welcome!   Best Regards, Iva
View full article
Hello community,   This document is the continuation of the documents Line scan camera with KSDK [ADC + PIT + GPIO] and Controlling speed in DC motors and position in servomotors with KSDK [FTM + GPIO] which show the ease of use of the peripheral drivers from Kinetis SDK applied to the Freescale Cup smart car. This time I bring to you a document which explains an easy way to detect the track's line from the data acquired with the linear camera.   The required material to run this project is: A Servomotor (the project supports up to two servomotors, one servomotor is included in the smart car kit). Two DC motors (included in the smart car kit). Line scan camera (the project supports up to two cameras). FRDM-KL25Z based on the Kinetis Microcontroller KL25Z. FRDM-TFC shield. Mini-USB cable.   This material can be bought in The Freescale Cup Intelligent Car Development.         If you are interested in participate in the Freescale Cup you could take a look into the groups University Programs, The Freescale Cup Technical Reports TFC - Mexico, TFC - Brazil, TFC - China, TFC - Malaysia, TFC - Japan, TFC - North America, TFC - India, TFC - Taiwan, The Freescale Cup EMEA.   Best regards, Earl Orlando Ramírez-Sánchez Technical Support Engineer Freescale Semiconductor
View full article
This example project shows how to use CMSIS DSP functions to implement a digital filter. The project is based on Kinetis KV31F512.   It first generates a mixed signal which is composed by two sine waves.  Then it uses PDB to trigger DAC every 200 microsecond and output the signal through DAC, so that the mixed signal can be displaying on oscilloscope.   With QEDesign tool, a lowpass filter is designed, the filter coefficients are used directly to initialize the FIR function supplied by CMSIS DSP library. This example calls the FIR functions in CMSIS DSP lib, and the filtered signal is output though DAC module.
View full article
Hello community,   This document is the continuation of the document Line scan camera with KSDK [ADC + PIT + GPIO] which shows the ease of use of the peripheral drivers from Kinetis SDK applied to the Freescale Cup smart car. This time I bring to you a document which explains how to control the speed in DC motors and the position in servomotors with KSDK step-by-step. This document is intended to be an example for the TPM and the GPIO peripheral drivers usage.   The required material to run this project is: A Servomotor (the project supports up to two servomotors, one servomotor is included in the smart car kit). Two DC motors (included in the smart car kit). FRDM-KL25Z based on the Kinetis Microcontroller KL25Z. FRDM-TFC shield. Mini-USB cable.   This material can be bought in The Freescale Cup Intelligent Car Development.         The document Create a new KSDK 1.2.0 project in KDS 3.0.0 explains how to create a new KSDK project for the KL25Z MCU. The result of this document is the project BM-KSDK-FRDM_KL25Z. The document Controlling speed in DC motors and position in servomotors with the FRDM-KL25Z and the Kinetis SDK [FTM + GPIO] explains how to implement an application to control the motors. The result of this document is the project BM-KSDK-FRDM_KL25Z_LINE_SCAN_CAMERA-SERVO-DC_MOTORS.   If you are interested in participate in the Freescale Cup you could take a look into the groups University Programs, The Freescale Cup Technical Reports TFC - Mexico, TFC - Brazil, TFC - China, TFC - Malaysia, TFC - Japan, TFC - North America, TFC - India, TFC - Taiwan, The Freescale Cup EMEA.   Best regards, Earl Orlando Ramírez-Sánchez Technical Support Engineer Freescale Semiconductor
View full article
Problem: Unknown error in Task error code column (in Task List view from MQX TAD) is displayed when debugging MQX project in IAR with KSDK.   Cause: This error means that TAD cannot find mqx.tad file with messages for error codes. In this case code 0x0 means MQX_OK, so it might lead user to believe there is some error with task but it is not. IAR TAD was made before first KSDK release, so there is no way for IAR TAD to find mqx.tad file because it isn’t part of KSDK. It works only when classic MQX is also installed on computer.   IAR TAD finds mqx.tad file this way (written as example for MQX 4.2): It takes _mqx_version_number defined as hex number 0x04020000 in “mqx\source\kernel\mqx.c” Looks into windows registry key of specified MQX version “HKEY_LOCAL_MACHINE\SOFTWARE\Freescale\FreeScale MQX\4.2” Takes its path variable "PATH"="C:\\Freescale\\Freescale_MQX_4_2" Tries to find mqx.tad file in directory specified in PATH or in its child folder "\tools\tad\" (e.g. C:\Freescale\Freescale_MQX_4_2\tools\tad\mqx.tad)   Solution: Use of fake registry key, which will point to classic MQX installation or some blank directory with only mqx.tad file (e.g. C:\fake_mqx\mqx.tad or better C:\Freescale\KSDK_1.2.0\tools\tad\mqx.tad). This registry key must use MQX version specified in used KSDK (for KSDK 1.2 and 1.3 it is 0x05000200, for 1.1 0x05000001 and for 1.0 0x04010000). Registry key might look like this: Then TAD translates error codes to messages successfully and path to mqx.tad file can be checked in Check for errors view under Show MQX TAD Diagnostics. Attached is example registry key with \tad\mqx.tad structure for placing into KSDK\tools directory.
View full article
Hi folks,   I would like to share my experience using lwIP with KSDK1.2, I hope this will be useful for people who is getting started with this TCP/IP stack.   I must admit that I really dislike working over an example application (please do not misunderstand my message, these examples are really nice but just as examples, not to develop new applications over them), the problem is that these project are not stand alone and if they are moved from their original locations it becomes a mess. This is why I always create a standalone projects. For instance I will describe how to run ‘lwip_tcpecho_demo’ and after this, how to reproduce this example as a standalone project.   Running ‘lwip_tcpecho_demo’ Creating a new project with lwIP support using FreeRTOS       I hope you find it useful.   Regards, Carlos
View full article
Because I receive feedback from customers, that it is sometimes complicated to execute this demo, I created short tutorial how to set it and execute it in KDS 3.0.0.   1. Physical connection In case of TWR-K64F, is needed TWR-SER and correctly set jumpers. and for TWR-K64F is needed to set jumper J6 to pins 1 and 2.   Be sure, that the TWR-SER and TWR-K64F is correctly connected (by white line) 2. Network configuration For changing IP address, please go to Network and Sharing Center, choose Change adapter settings Right click on Properties and change the IP address (TCP/IPv4) to 192.168.2.100   3.  Downloading the demo to TWR-K64F Go to KDS, File - Import and browse the demo, which is located at C:\Freescale\KSDK_1.2.0\examples\twrk64f120m\demo_apps\web_hvac\web_hvac_mqx\kds Import all libraries and the demo project and see imported sets in Project Explorer Debug the libraries first and then the project. Be sure, what debugger is used on the board and set the debugger. And now go to Resume!   4. Test the connection Go to cmd and ping to 192.168.2.102 (address of HVAC Server)   5. HVAC Web Server.Go to browser and type the address 192.168.2.102, you will see page for HVAC Web Server. Go to HVAC Demo - HVAC Status and now you can observe the temperatures by pressing button. There are set combinations which means see below. LED1: Simulate the Fan’s state LED2: System in the Heat mode LED3: System in the Cool mode LED4: Simulate the heart beat, increase real temperature (i.e., by hair dryer) to see the LED4 go faster and decrease temperature to see it slow down. So, if is needed increased temperature, push the first button (SW1) and Fan and Heat mode run. LED1 and LED2 will be light on and the temperature will increase.   Enjoy! Iva
View full article