Kinetis Microcontrollers Knowledge Base

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

Kinetis Microcontrollers Knowledge Base

Discussions

Sort by:
Latest version of the AN2295 universal bootloader includes support for IAR 7.6 IDE. - added support for Kinetis E MCUs - Kinetis K,L,M,E,W,V support
View full article
Hi All, all presentations were included in this archive file.
View full article
Hi All, attached bootloader is a short program that allows possibility to update existing firmware in Kinetis-M microcontroller device. It consist of Master PC application and a tiny slave application that runs on target device. It uses UART communication.
View full article
1. AN5218-使用LPUART实现ISO7816接口功能​ 2. AN4373-Cookbook for SAR ADC Measuresments 3. AN5160-低功耗模式下使用UART唤醒Kinetis L系列MCU的方法​ 4. AN4905-Kinetis MCU 上支持无晶振 USB​ 5. AN3298-Kinetis芯片焊接温度曲线控制​ 6. AN5034-FleIO模拟UART​ 7. AN4752-FreeMaster的使用方法​ 8. AN4282-使用Kinetis的FlexMemory作为EEPROM的方法​ 9. AN4655-使用I2C接口引导更新Kinetis L系列MCU​ 10. AN4368-使用U盘方式更新带USB Host功能的Kinetis固件程序​
View full article
Archive file of the Kinetis-M bare-metal drivers and software examples REV 4.1.5 - this version is not yet available @ nxp.com. Release notes 4.1.5 (Apr.22,2016): Added configuration structures for watchdog timer operating in debug mode. Included IAR EWARM 7.60.1 project templates. Modified LLWU Pin Falling Edge Wakeup example. Please refer to How to download and install KM Bare-metal divers
View full article
Installation file containing training examples - unpack and run this file to install code examples.
View full article
Hi All, All training examples were tested on TWR-KM34Z75M board. We will be using the same board during the hands-on. If you have this board, please take it with you. We have in Roznov 15 pcs which will be given for use during the training. We will be using IAR Embedded Workbench for ARM. During installation, we recommend to download a 30 day eval version from IAR home page. The course license will be provided to you in Roznov prior training. Please install the following tool chains prior training: Tool description Link IAR Embedded Workbench for ARM 7.60.1 http://netstorage.iar.com/SuppDB/Protected/PRODUPD/011007/EWARM-CD-7601-11216.exe FreeMASTER 2.0 FreeMASTER 2.0 Application Installation TWR-KM34Z75M training examples Kinetis-M Bare metal drivers and examples 4.1.5
View full article
Hi All, NXP provide a software driver library for Kinetis M devices, the KM bare-metal drivers. It includes support for peripherals and FreeRTOS. :smileyalert:NOTE: Before creating a new FreeRTOS project for KM devices you need to download the KM driver support package and install it. You can find the instructions HERE​. FreeRTOS new project creation The following instructions will guide you to generate a new project for Kinetis M devices with all the bare-metal drivers’ support. You can either select create a new project without FreeRTOS support or with it. In this case the instructions show how to create a FreeRTOS project for IAR 7.5. Go to template folder in the KM drivers package installation folder Run the make_project by Double clicking on it The make-project application guide the user to select the appropriate application. Select the IDE for new project support according to the application requirements. NOTE: The IDEs showed are only the IDEs that its support package is installed. The new project creation also manages the debug options for the project. Select the specific debug option for your new project. Select the KM variant you are using. NOTE: For KM34Z256 devices the default option is MKMxxZ256 and is selected automatically. The creation of the project supports creating linked or standalone projects: o   Create projects in driver’s subfolder: The project will be created in the path KMxxxSWDRV_Rx_x_x\build\supported_ide\projects and all the folders and files inside the project will be linked to the real location setting virtual folders in the workspace. In this case it will not be possible to move the project from that location, doing it will cause building problems. o   Create Standalone project: The standalone project option will let us select the new project location and will link the files to the actual project location. In this case the necessary source code will be copied to a new location. This options is recommended for versions control If option 1 is selected the project will be generated, you can check the project in the mentioned folder. If option 2 is selected following instructions need to be followed. Type the path that will contain the new project. In this path project files will be installed. Type project name and press enter. Project will be created and make_project window will self-close. Project folder structure looks like next: Open the IAR project by double clicking in the .eww file of the new project. FreeRTOS project structure This section will discuss the FreeRTOS default project and main.c file structure. Here a project created for IAR 7.5 is presented as an example. There are two main folders in a FreeRTOS application. The rest of the folders and files are the same for non-RTOS applications. freertos > contains all the FreeRTOS Kernel source code project > Contains files to configure definitions, FreeMaster usage and the main function. NOTE: The main function will be always contained in a file named project_name.c This is the structure of the project_name.c file: By default the main function contains the code to create and start two different tasks. Also, in the same file, the two tasks are defined. The main function initializes the application peripherals and create task A and task B. The xTaskCreate() function creates a new task and adds it to the list of tasks that are ready to run. The functions is defined as: pvTaskCode. Pointer to the task entry function. Tasks must be implemented to never return. pcName. A descriptive name for the task. This is mainly used to ease debugging. Max length defined by configMAX_TASK_NAME_LEN. usStackDepth. The size of the task stack specified as the number of variables the stack can hold - not the number of bytes. For example, if the stack is 16 bits wide and usStackDepth is defined as 100, 200 bytes will be allocated for stack storage. The stack depth multiplied by the stack width must not exceed the maximum value that can be contained in a variable of type size_t. pvParameters. Pointer that will be used as the parameter for the task being created. uxPriority. The priority at which the task should run. pvCreatedTask. Used to pass back a handle by which the created task can be referenced. After creating the two tasks the main functions calls vTaskStartScheduler() that starts the real time kernel. After calling the kernel has control over which tasks are executed and when. The task source code looks like the following: Tasks receive pvParameters parameter, this is the one that this passed when Task is created (refer to the pvPrameters in cTaskCreate function). Each task has an infinite loop, this means the task will run continuously but the RTOS schedules will the one deciding when each task will run according to priority. Default project can be modified by user adding tasks and using RTOS services to create application. If support for a different IDE is needed you just need to change follow the instructions decribed in FreeRTOS project creation and select the IDEs required by your application. References: FreeRTOS manual from THE TOOLCHAIN​ Hope information helps! Happy FreeRTOS coding! Regards, Adrian Cano NXP FAE
View full article
Hi All, NXP provides a software drivers library for Kinetis M devices, the KM bare-metal drivers. It includes support for peripherals and FreeRTOS. Follow the instructions to download and install the software package. Go to the KM3x section in the NXP webpage. Click on the documentation tab In the Application Notes section look for the API reference manual for Kinetis M bare-metal drivers and software examples, download: HTML > Reference Manual and documentation ZIP > Software package Unzip the KMSWDRVAPIRM_SW.zip file into a computer location. Inside the folder you will find several .exe files, select the appropriate file for your application and follow the installation instructions. By default a folder named KMxxxSWDRV_Rx_x_x is created. You can see the folder structure like this build: Build examples project files for the selected IDE. refman: Source files of the HTML Reference Manual src: Source files for drivers: common – common files for projects: device headers, startup routines, etc. drivers – peripheral drivers source code. freemaster – Freemaster source files for communication functions with Freemaster software. freertos – FreeRTOS files, kernel and RTOS support. projects – example projects demonstrating peripherals and modes. toolchain – toolchain support. template – Base projects for supported IDEs and make_project.exe file to create new project for different supported IDEs. If you need support for a different IDE or KM device you just need to extract the appropriate .exe file from the SW package. Hope information helps! Happy Downloading and installing! Regards, Adrian Cano NXP FAE
View full article
Agenda Mastering Kinetis-M Microcontrollers Schedule Module Description Duration Presenter 8:00 Registration 0:30 8:30 Introduction & Welcome 0:15 MM 8:45 MKM34Z256 core and peripherals architecture 1:00 Cano 9:45 DSP fractional, Filter, and FFT-based libraries for general signal processing and metering applications 1:00 LV 10:45 Break 0:15 11:00 Power meter & PLC reference design overview (1ph, 2ph (MKM34Z128), 3ph, 3ph shunt based + sensor node) 1:00 RK 12:00 Introduction to TWR-MKM34Z75, bare-metal drivers, SDK 2.0, FreeRTOS and FreeMaster 1:00 Cano+ID 13:00 Launch in the office 1:00 14:00 Workshop - TWR LCD example (preprogrammed, debugging, SW re-flashing) 0:45 Cano 14:45 Workshop - Using serial bootloader example (learn the way of bootloder integration into application) 0:45 PK 15:30 Workshop - LPTMR and GPIO example (LPTIM & GPIO API, programming interrupt, debugging) 0:45 MM 16:15 Break 0:15 16:30 Workshop - FreeRTOS preemptive multitasking example (basics of FreeRTOS programming) 0:30 MM 17:00 Workshop - High-precision waveform measurement example (SD ADC & FreeMaster programming) 0:45 MM 17:45 Workshop - 64-bit math coprocessor example (mastering DSP instruction set the MMAU) 0:45 MM 18:30 Q&A 0:30 19:00 Dinner @ Brasserie restaurant 2:00 21:00
View full article
The DOC focuses on how to access SDRAM based on K65 SDRAM controller, it describes the hardware connection especially the address connection, the SDRAM controller initialization,the code to access SDRAM.
View full article
Share some information on how to use micro-trace buffer.
View full article
On behalf of EarlOrlando​ Hello community, This document is intended to be a basic guide to get started with the eGUI. If you need a closer view about what this driver is, it is recommended to take a look into the eGUI Introduction document. Before starting, it is needed to download the library from the NXP eGUI website and it is recommended to take a look into the eGUI Reference Manual. For this document, a demo included in the eGUI drivers will be run and then modified to toggle a LED in the TWR-K70F120M board from the eGUI interface displayed in the TWR-LCD-RGB board. Contents. Introduction. 1. About this document. 2. Running the K70 demo on IAR. a. Compiling the TWR-K70F120M MQX libraries. b. Adding the SD card content. c. Download the application to the MCU. 3. Modifying the eGUI demo. a. Creating a new screen. i. Adding a new source file for the new screen. ii. Adding the screen header files. iii. Adding some macro definitions. iv. Defining screen attributes. v. Declaring the screen. vi. Defining a new string. vii. Adding the screen interfaces b. Opening the new screen. c. Creating a new button. d. Toggling the LED. 4. Conclusion. I hope you find this guide useful. Enjoy this guide, any feedback is welcome!
View full article
NXP 的BLE芯片目前包括QN902x 和 Kinetis KW3x两大系列,NXP BLE Solution 主页为:Bluetooth Smart|Bluetooth Low Energy|BLE|恩智浦 1)QN902x系列包括QN9020和QN9021,他们主要区别是封装不同,QN9020为QFN48(6x6mm),QN9021为QFN32(5x5mm)。QN902x的主要技术参数如下: 》Cortex- M0内核 》支持BLE4.1 》96Kb ROM,128Kb SPI Flash ,64Kb RAM 。代码在RAM中执行 》最高工作频率32Mhz 》输出功率:-20~4dBm;接收灵敏度:-95dBm 》功耗:接收电流:9.25mA,发送电流:8.8mA ,sleep mode:3uA 该芯片的datasheet:http://cache.nxp.com/documents/data_sheet/QN902X.pdf?fpsp=1&WT_TYPE=Data%20Sheets&WT_VENDOR=FREESCALE&WT_FILE_FORMAT=pdf… 官方的评估板为QN9020DK,链接为:高度可扩展的QN9020应用开发平台|恩智浦 另外一第三方公司也有一套开发板,可用来评估QN902x芯片,其连接地址为:FireBLE - Firefly wiki 2)KW3x,包括KW30和KW31两个系列,KW30 具体信息可以参考:KW30Z|Kinetis Bluetooth Low Energy MCU|恩智浦 KW31具体信息可以参考:KW31ZlKinetis BLE无线MCU|恩智浦 随便说下,NXP还有一个KW4x系列,该芯片可以同时支持Zigbee和BLE,它包括KW40和KW41,主页分别为:KW40Z|Kinetis BLE & 802.15.4无线MCU|恩智浦 和KW41ZlKinetis BLE & 802.15.4无线MCU|恩智浦
View full article
Dear all :      I would like to share an IoT application note to you. The note will help us to setup a FRDM-K64F to connect to Microsoft Azure and get alarm message from Azure. Detail please refer to attachment. Demonstration : IoT client (FRDM-K64F) report data to Cloud (Microsoft Azure) IoT client receive data from Cloud Could computing IoT client data and take action Tools : FRDM-K64F ( http://www.freescale.com/FRDM-K64F ) Device Explorer ( http://aka.ms/iot-hub-how-to-use-device-explorer ) Visual Studio 2015 SSH client ( PuTTY  or Tera Term ) mbed  ( http://www.mbed.com ) Microsoft Azure ( https://azure.microsoft.com )
View full article
This is an example for the Kinetis KE02Z devices, showing how to program the EEPROM with initial values when the flash is programmed.  The example works on the FRDM-KE02Z40M board, and was written with Kinetis Design Studio (KDS) v3.0.0.  The example also uses Processor Expert (PEx) to configure the UART and erase/program the EEPROM.  The EEPROM programming works with the P&E Micro Multilink Universal debugger, as well as the P&E Micro OpenSDA debugger app for the FRDM-KE02Z40M board. To program the EEPROM with initial values, the application declares constants for the EEPROM locations, and initializes these in the source code in eeprom.c. Compiler pragmas/attributes are used to force the linker to place these constants in EEPROM, using the m_eeprom memory section defined in the linker command file \Project_Settings\Linker_Files\ProcessorExpert.ld.  The P&E Micro flash programming algorithms initialize the EEPROM in 4Byte words. Therefore, any initialized EEPROM locations should be in aligned 4Byte words. This example initializes the first 4Bytes in the EEPROM as 0, 64, 128, 192. The example uses a terminal program to display EEPROM information.  It connects to the OpenSDA COM port on the FRDM-KE02Z40M board using UART1 from the KE02Z. The terminal settings are:   Baud Rate: 38,400   Data: 8bit   Parity: None   Stop: 1bit   Flow Control: None The example prints 5 bytes of EEPROM to the terminal after reset: the 4 initialized bytes, plus the following EEPROM byte which was not initialized. Then the example increments the first byte, and decrements the second byte, and writes the new values back to EEPROM.  The other 3 bytes are not changed. Then the application prints the new EEPROM values of all 5 bytes.  Everytime the MCU is reset, it will print the existing EEPROM data and then the changed data.  Below is the example output from the terminal after initially programming the KE02Z, and then doing a single reset: Terminal output:   KE02Z EEPROM example   EEPROM values after reset = 0 64 128 192 255   EEPROM values after updating = 1 63 128 192 255   KE02Z EEPROM example   EEPROM values after reset = 1 63 128 192 255   EEPROM values after updating = 2 62 128 192 255
View full article
This is an adaptation I made for the original SMTP protocol implementation provided with the KSDK1.3, with the addition of the secure connection using WolfSSL. The example software is currently ported to the FRDM-K64F Kinetis board but it can be implemented for other boards.This demo sends a e-mail using the Gmail SMTP server ( smtp.gmail.com , port 465) through a SSL channel.   How to run the example:   1 - Download the example software attached. You will need to have KDS 3.0 and KSDK1.3 previously installed on the machine. 2 - In KDS, go to File -> Import, select the folder Project of Projects -> Existing Project Sets, then open the file mqx_smtp_ssl_demo.wsd located in the folder \SMTP_SSL_demo_KSDK_1.3.0\examples\frdmk64f\demo_apps\security\smtp_wolfssl\smtp_wolfssl_mqx\kds 3- Build all the libraries and run the example project. 4- To allow SMTP + SSL , you will need to change your Gmail account settings 5- Using a Serial terminal (115200 bps,8N1) connected to the OpenSDA CDC interface (COM port), connect it to see the shell.Type ipconfig init and ipconfig dhcp to init the Ethernet interface and get a valid IP from the router.   6- Type help to see all the commands available. 7- To send a e-mail using the secure channel, you will need a valid gmail account and use the command:        sec_email -f <sender@email.com > -t <recipient@email.com> -s <www.mail.server.com> [-u <Username>] [-p <Password>] [-j <"email subject">] [-m <"text of email message"]>   For example:        sec_email -f user@gmail.com -t recipient@email.com -s smtp.gmail.com -u user@gmail.com -p mypassword -j "email subject" -m "text of email message"   Some additional notes:   - The Certificate Authority (CA) file from Equifax, used for Gmail, is decoded in hexadecimal to a c array and it is located in the file rtcs_smtp_ssl.c , in the \middleware\tcpip\rtcs\source\apps folder:     - To connect to other servers with SSL support, you will need to obtain a valid Certificate Authority file for this server. You can do it in three steps: 1) Verify what is the certificate authority used by the server. One way to do it is using OpenSSL ( OpenSSL  ) ,  with s_client and the option -showcerts to see the server certificates and check the certificate Authority.Gmail uses Equifax as CA 2) After you know the Certificate Authority of the server, you can get the certificate file in pem file format on a e-mail client for PC (e.g. Outlook).In this case , Outlook has the Equifax certificate file.All the certificate files need to start with -----BEGIN CERTIFICATE----- and to finish with -----END CERTIFICATE----- ,as below 3) You need to convert your CA file to a c language array. You can use Bin2h to do the task.        PEM file generated by Equifax before to be converted to a c array   All the files used to build the demo are included on the file attached. The SSL connection using the WolfSSL software is made on the file rtcs_smtp_ssl.c.
View full article