Kinetis Design Studio Knowledge Base

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

Kinetis Design Studio Knowledge Base

Labels

Discussions

Sort by:
In most of Freescale MCUs, there is only one Flash on chip.  When executes Flash programming we need copy Flash programming routine from Flash to RAM then execute it from RAM.  The reason is that when writing MCU Flash, program is also reading instruction from same Flash, but Flash can’t perform reading and writing parallel. So executing the flash programming routine from RAM can avoid Flash read/write conflict.   In Cotex M0+ core kinetis, Platform Control Register (MCM_PLACR) is added. The MCM_PLACR register selects the arbitration policy for the crossbar masters and configures the flash memory controller. A useful bit I am going to talk about is bit 16 ESFC: Enable Stalling Flash Controller. When this bit enabled, it can stall flash controller when flash is busy.  Setting ESFC bit can well-balance time sequence of Flash reading and writing – when writing Flash, reading Flash instruction can wait, and vice versa. Using ESFC bit can make our flash programming easier. Thus one Flash can write itself, which is not possible for other one Flash MCU without ESFC bit control.   Currently MCM_PLACR is supported in below chips with Cotex M0+ core embedded: MKE02/04/06 SKEA MKL02/04/05/14/15/16/17/24/25/26/27/33/34/36/43/46 MKM13/14/32/33/34/38 MKV10 MKW01     I didn’t find any official Flash Programming demo code on ESFC bit usage so far. So I made sample code under Codewarrior10.6 and KDS2.0 respectively. The demo codes are for MKL25, but the method is available for all Cotex M0+ MCU I listed above. It’s easy to port the flash programming code to other Cotex M0+ chip. Here are porting steps for both KDS and CW environment: - Create new project with project wizard with default setting to create a new project - Copy flash_kinetis_m0.c and flash_kinetis_m0.h to project Source code folder - Include the specific MCU header file in  "flash_kinetis_m0.h", for example  #include "MKL25Z4.h" - Include "flash_kinetis_m0.h" to the related source file:  #include "flash_kinetis_m0.h”   Enjoy Flash Programming!
View full article
KDS V1.0.1 (beta) with FRDM-KL25Z board which has P&E OpenSDA as firmware loaded. Steps shown with creating the project, creating debug configuration for connection and device, then debugging it.
View full article
Video showing project creation with SDK + Processor Expert for FRDM-K64F. SDK only supports CPU_MK64FN1M0VLL12 derivative, so compiler settings are changed. Then the Processor Expert cpu type is changed to chip on the board, plus the Pin Muxing updated. Finally, the project is debugged with OpenOCD and CMSIS-DAP.
View full article
This is the first video of four KDS v3.0.0 videos. The videos shall guide you through installation and using the Kinetis SDK with a FRDM board.   Overview: Installation Kinetis Design Studio Kinetis SDK Kinetis SDK Eclipse Update Creation of SDK project for FRDM-K64F Compile/Build/Debug   List of all videos: 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
View full article
This is the second video of four KDS v3.0.0 videos. The videos shall guide you through installation and using the Kinetis SDK with a FRDM board.   Overview: Introduction to OpenSDA firmware Available firmware applications Putting board iinto bootloader mode Updating firmware Checking the device drivers Updating the bootloader   List of all four videos: 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
View full article
This is the third video of four KDS v3.0.0 videos. The videos shall guide you through installation and using the Kinetis SDK with a FRDM board.   Overview: Debug configurations Building for debug Stepping through source code Inspecting variables Setting breakpoints Disassembly, memory and registers   List of all four videos: 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
View full article
This is the third video of four KDS v3.0.0 videos. The videos shall guide you through installation and using the Kinetis SDK with a FRDM board.   Overview: Overview of Processor Expert and Kinetis SDK Creating a Processor Expert project Adding and configuring devices Generating code Building and running the application   List of all four videos: 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
View full article
Reaction game in KDS   Description:   A project made in KDS using the FRDM-MKL46Z256VLL4 board's LCD screen and the two switches, SW1 and SW3, to create a reaction testing game. Hold the board with both of your thumbs above the two switches. After "rdy" (ready) appears, the screen will either display "left", "righ" (right), or "both" and you must press the appropriate button(s). It will then display your reaction time in milliseconds. You initially get 1000ms to react, this decreases by 25ms for every point you score to a minimum of 500ms. 1 point is given per correct response. If you do not react fast enough, or press the wrong button(s), you lose the game. Once you lose, your score will be displayed and then the game will reset back at "rdy" with the 1000ms time to react.   Issues: You can cheat by pressing both buttons every time, this will not work 100% of the time though.
View full article
- This document introduces how to develop a simple CAN module application on KDS, it is suitable for the beginners to start using the KDS and Processor Expert, and it mainly focus on how to developing a CAN Loopback application, how to use the “Typical Usage” of “help on component”. - About the Sending or Receiving data demo(with interrupt or polling) we can find on  the "Typical Usage" of "help on component" . - Pay attention that , in the Typical Usage code , the Transfer Message ID is 0x123u, while in the CAN_LDD default configuration , the Receive Message ID is 0x7FF, they are should be same . So we should change one of them (In standard frame format, the admissible range is from 0x00 to 0x7FF; in extended format, the range is from 0x00 to 0x1FFFFFFF ), on my project , I change the TX ID from 0x123u to 0x7FFu on the code, about the detail information, please look at the document and application project.   This application hardware is TWR-K21F120M board, software is KDS v3.2.0 .
View full article
NOTE: the screenshots below are for KDS V1.0.1-beta!   After creating a new debug configuration is simple: Select either 'GDB OpenOCD Debugging', 'GDB PEMicro Interface Debugging' or 'GDB SEGGER J-Link Debugging' and use the 'new' button: Verify the project and application settings:   After that, there are a few settings to be checked or set, depending on your connection.   OpenOCD with CMSIS-DAP Make sure '-f kinetis.cfg' is specified as 'Other Options':   P&E with OpenSDA or Multilink Select your Interface, Port and Device Name:   Segger J-Link Make sure you use the correct device name (link to Segger web page (scroll there down!) lists all supported devices). OpenSDAv1 and OpenSDAv2 is using SWD. Disable SWO if not supported by your connection:
View full article
USB Keyboard in KDS   Description:   A project made in KDS using the FRDM-KL25Z128M4 board as a USB keyboard input. The LED will flash red while not connected as a USB keyboard, and flash green when it is. The reset button will press the print screen button. The reset button can be configured to press any possible key as long as they are correctly #defined. Use http://www.usb.org/developers/devclass_docs/Hut1_11.pdf as a reference for keys. Strings may also be output, see the commented out H1DK1_SendStr call in main.c for an example.   Sections of code taken from http://mcuoneclipse.com/2013/06/30/using-the-frdm-kl25z-as-usb-keyboard/
View full article
USB Mouse in KDS   Description:   A project made in KDS using the accelerometer on a FRDM-MKL46Z256VLL4 board to control a USB mouse input. A red LED will flash while not connected as a USB mouse, and green LED will flash when it is. SW1 will right click. SW3 will left click.   Sensitivity of the mouse can be changed by altering the HIDM1_Move command in main.c   Sections of code taken from: - http://mcuoneclipse.com/2012/09/21/tutorial-accelerating-the-kl25z-freedom-board/ - http://mcuoneclipse.com/2013/08/01/using-the-frdm-kl25z-as-a-usb-mouse-device/
View full article
(NOTE: this document gets constantly updated with new information) =============================================================================== Release Notes and News: Kinetis Design Studio V1.1.0 Version Date: 05-Aug-2014 ===============================================================================   Greetings, The Kinetis Design Studio is a complimentary (free of charge) IDE and tool chain to develop, build and debug embedded applications for Freescale Kinetis Devices. It is based on open source software including Eclipse, GNU compiler and GDB Debugger. The Kinetis Design Studio is offered for free, and support for it is provided through this Freescale Kinetis Design Studio Community Forum.   Setup Files and Installation The software can be downloaded from the download section here: Kinetis Design Studio Integrated Development |Freescale. Currently, installation files are provided for Windows 7/8 (.exe) and Ubuntu 32-bit (.deb). NOTE: Installation files for RedHat/Centos (.rpm) have not been released yet, but we expect either a workaround or a fix shortly. NOTE: To have the full device support (e.g. KV31 devices) and Kintetis SDK support, you have to install the Kinetis SDK and install the KDS Eclipse update in <sdk installation>\tools\eclipse_update.   Documentation and Release Notes The documentation page on http://www.freescale.com/kds hosts several documents: Fact Sheet: Information about Kinetis Design Studio User Guide: Installation and Setup, first steps with Kinetis Design Studio Porting Guide: How to port applications from CodeWarrior to Kinetis Design Studio. Release Notes: Information about device support, known issues and workarounds. As the information and release notes are constantly updated, an update of the infomation is provided in the "Release Note Update" section below. Migrating from KDS V1.0.1 (Beta) to KDS V1.1.0 If you have the beta version installed, there is no need to uninstall it. Uninstall it once you migrated everything from the beta to the V1.1.0. If you have a workspace or projects from the beta version, it is recommended that you start with a new workspace (do not share a workspace between different versions!). You should be able to migrate 'normal' projects easily. However, Kinetis SDK projects will not be able to be migrated easily, because there has been a lot of changes. If you are migrating a Kinetis SDK project, then the best advice is to create a new project with KDS V1.1.0 and then move your own files over.   Release Note Updates and News This section contains updates and news after publication of the release notes: 05-Aug-14: Installation for RedHat/Centos 32-bit: the installation files are on hold right now. Watch for an annoucement in this community forum. 05-Aug-14: OpenOCD for FRDM-K22F board: KDS does not support OpenOCD for the K22F on these boards yet. Instead, a Segger (see FRDM-K22F: Debugging with Segger J-Link OpenSDAv2.1 Firmwarehttp://www.segger.com/opensda.html) or P&E debug application can be used until there will be an OpenOCD update for KDS. Watch for an announcement in this community forum.   Thanks for using the Kinetis Design Studio!   =========================================================================== Freescale, the Freescale logo, Kinetis, Processor Expert are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. All other product or service names are the property of their respective owners. ARM is the registered trademark of ARM Limited. (c) 2014 Freescale Semiconductor, Inc. ===========================================================================   Freescale Community Forum: https://community.freescale.com/community/kinetis-design-studio
View full article
This document provides the steps required to successfully build a CodeWarrior 10.6 BeeKit generated project for Kinetis KW2x wireless platform, using the Kinetis Design Studio (KDS), version 2.0.0
View full article
This SD card bootloader demo offers to user a way how to using SD card to update existing firmware. The two project of attachment are the demo code create by CodeWarrior 10.6 and KDS 3.0 . The document of attachment is the application note of the bootloader, you can find the detailed description about the bootloader.   It is easy to be used:      -Hardware: TWR-K60F120      -Software: CodeWarrior 10.6 or KDS 3.0        Getting started :      - Change the name of user application binary file to “app_0x10000_1.bin”, then copy and paste it on SD card;      - Insert the SD card into the TWR-K60F120 board;      - Build and flash “bootloader_sd_k60120m” to the board;      - Press the SW1 button, at the same time, press once the RESET button, thus it will update the user application to the flash.      - Again, only press the RESET button, it will directly run the user application.     Best Regards! Alice
View full article
This project is a re-build of Yayra Kwaku Adugu's E14 project, now built in KDS. The project allows the FRDM KL25Z to utilise an external E14 sensor board for accellerometer, magnetometer and pressure sensor, printing data to terminal.   Unfortunately this project runs afoul of a printf bug in KDS and not all printf calls will display properly. More information/examples of this bug can be seen at Re: printf() weirdness - Using printf() with ConsoleIO and TeraTerm via OpenSDA - issues   Hopefully if/when the printf implementation is fixed in KDS, the project should work fine and display data to terminal.   Project Info: Board used: MKL25Z128VLK4 Terminal Baud Rate: 9600
View full article
After we released the "Kinetis Bootloader to Update Multiple Devices in a Network for Cortex-M4" (Kinetis Bootloader to Update Multiple Devices in a Network for Cortex-M4 ), many customers want to port it to FRDM-K64 board, so here I share it.   - This bootloader is based on KDSv3.2. -About the detail introduce and user guide, please refer to:    https://community.nxp.com/docs/DOC-328365 - There also some points when porting, please check the attachment. - I attached the project source code. And also two user application projects.   Customers can refer to the application and user guide to configure your application project. - The GUI is the same with bootloader for k22, we do not change anything.   BR Alice
View full article
Hello community!   Attached is a document that introduces the usage of version control using SVN and Kinetis Design Studio.     Contents: 2. Overview and concepts      2.1 VisualSVN Server      2.2 TortoiseSVN 3. Installation instructions      3.1 Installing VisualSVN Server      3.2 Installing SVN Eclipse plugins      3.3 Installing TortoiseSVN 4. Using version control      4.1 Creating new repository in VisualSVN      4.2 Putting a project under SVN Control      4.3 Checking out a project from SVN      4.4 Synchronizing changes 5. Conclusion Appendix A - References       You can find more detailed information about version control on the following post created by our colleague Erich Styger:   Version Control with Processor Expert Projects | MCU on Eclipse   And on this document that explains how to use Git and KDS:   FTF-DES-F1149.pdf   I hope you can benefit from this post, if you have questions please let me know.   Best Regards! Carlos Mendoza
View full article
Taking code for a simple LCD function that is used in Code Warrior and modifying it for use in KDS on the FRDM-KL46Z board.
View full article
This is an update to Kinetis Design Studio V3.0.0 which updates it to version V3.1.0. You need KDS V3.0.0 installed in order to install this update. This update includes as well a Processor Expert for Kinetis V3.0.2 update. It is an online update through the Eclipse update mechanism.   Note: the updates are available for offline installation as well from the download section on www.nxp.com/kds   This update fixes a know issue with the dependency to the GNU ARM Eclipse plugins described in Unable to Debug after KDS Update .   Online Update To install the update from the Eclipse update site, the preferred method is to use the menu Help > Check for Updates As this lists many other updates which might cause conflicts, make sure you only select the Kinetis Design Studio 3.1.0 update: Install the update, then in a second update you can install the other KDS updates. Here again, do not select other 3rd party updates as this might cause conflicts: Then go through the installation process.   An alternative method is to use Help > Install New Software and use the following Eclipse Update site: http://freescale.com/lgfiles/updates/Eclipse/KDS (Note: this is an Eclipse update site, not usable for a web browser)     Then select "Kinetis Design Studio 3.1.0" update from the list (shown for Windows host below): Next it will inform about the actions taken. A Somnium portion of the IDE will be removed and replaced: Press 'Next' and go through the update process.   Offline Update The update is available as zip archive which can be downloaded once and then used for an offline installation, pointing to the zip archive as update site.   Go to Kinetis Design Studio Integrated Development |NXP  and click 'Download' in the Download tab:   Select the KDS 3.0.0 for the host you are using: Select the "Kinetis Design Studio 3.1.0" update (screenshot shown for Mac OS X) and download it: In Kinetis Design Studio V3.0, use the menu Help > Install New Software and point to the downloaded file to install it.   For details additional, see the attached release notes.
View full article