Kinetis Microcontrollers Knowledge Base

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

Kinetis Microcontrollers Knowledge Base

Discussions

Sort by:
Hi All: when someone program FSL MCU  by theirself program tool, and the flash size is over 64KByte , please reference the document. the document is chinese version Br Felix
View full article
I need to connect multi phy device with a single cpu. I want realize a follow hardware (see picture MultiPhys.jpg ). My dubt is if this schematic is correct. I need to send frame either PHY1 or PHY2. My application is like a gateway, it sends messages to network in selective way ( and it receives from every PHYs device ). Is it possible connect many PHY device with one RMII bus? what is the correct way to connect many PHY device on RMII bus? Anyone knowns documents that describe multi Phy configurations ?
View full article
Some of our customers encountered clock stretching issue when using the I2C. Actually the first should been in mind is the clock stretching is usually done by the slave, not the master.  In the case for the Kinetis as master to connect with I2C device, the clock stretching should been done by the slave device. In this case the slave device should hold the clock signal low until it has data available. There isn’t anything that needs to be done to enable clock stretching on the master side. So how the code do with the clock stretching? The slave should toggling read_start high first and reading the data register to actually start the transfer. Be remember that the read from the data register is what actually triggers the transfer. Customer always missed this point.
View full article
Fat File System for SD card using SPI for Kinetis-K60, K22 and K20
View full article
在工业热电偶数据采集与处理方面,ADI,MAXIM的模拟芯片几乎占据了90%以上的市场,尽管他们的单片售价高的吓人。1片16位的AD芯片没有个2个美金是买不到的,24位的更不用多说。现在他们的竞争对手来了,飞思卡尔针对表计市场推出的基于M0+内核的KM1x,KM3x,片上集成24位的Σ-Δ模拟前端, 其中2路带有独立的可编程最高32倍PGA,无论是市场上应用最多的K型热电偶、还是专注于低温测量的T型热电偶,通过合理的配置都可以满足他们极宽范围的量程。确切的讲,KMxx和这两种产品根本不能算是一个数量级的PK对手,无论从资源上还是从价格上。但是尽管这样,就一定能打败竞争对手吗?首先得有的说服力的参考设计吧,不着急,已经开始设计了。 处理器:MKM33Z128CLH5 暂定功能: 1. K型热电偶+T型热电偶兼容采集处理,板上预留2种热电偶接口,带冷端温度补偿功能 2. 按键切换热电偶类型 3. 段码式LCD显示采集的实时温度,状态显示 4. 低功耗演示,面向手持式设备市场 5. 音乐变调蜂鸣器 主要针对竞争目标:Maxin的 MAX31855KASA (T型热电偶) 关于精度嘛,等参考设计完成了测试一下就知道了。 以上参考设计敬请等待,也欢迎多提宝贵建议。
View full article
Producto dirigido para terapias visuales y motrices. Consiste en una matriz de 6x3 LEDs, una columna verde, una amarilla y una roja. Aleatoria mente, se encenderá un LED que se encuentra hasta arriba, y ese irá bajando por la columna de su color hasta llegar al ultimo. Cuando eso suceda, se deberá presionar el botón del color correspondiente. Si esto se realiza correctamente, se suma un punto, de lo contrario se restan tres y suena un buzzer. Los puntos se despliegan en pantalla. La velocidad del juego se puede controlar con un potenciometro y un motor Servo se mueve dependiendo del puntaje.
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
As most of people familiar with FRDM-K64F which is a bit old but it is still a hot device in the market. This document focused on the ADC measurement to verify the deviation. In general, the sample code were modified /come with MCUXpresso SDK, which is an ADC polling example. ADC reading was done by two ways: 1) Polling the status register of ADC conversion complete flag until ADC conversion is done. 2) CPU core is in sleep right after ADC conversion is started by software trigger. Interrupt is generated when ADC conversion is done and CPU core wakes up by this interrupt. The value of ADC reading is measured 5000 times. And, it is averaged, also calculate max/min value. Finally, the standard deviation is calculated based on the 5000 measured value. PRINTF is a terminal console and print out by semi-hosting. Interrupt method or polling method can been selected by the define of INTERRUPT or POLLING. #define INTERRUPT 0   //ADC conversion wait for “INTERRUPT” should be defined to 1 #define POLLING 1   //ADC conversion wait for “POLLING” should be defined to 1
View full article
      Kinetis SDK是针对于Kinetis系列MCU所做的软件开发套件,又称为KSDK。它由强大的外设驱动代码库,协议栈库与示例代码库等部分组成,能够简化和加快对于Kinetis 系列MCU的应用开发。另外,Kinetis SDK是免费的工具,而且所有的硬件抽象和外设驱动软件均开放完整源代码。目前最新版本为2.0,支持 Kinetis 主流MCU,随后会不断更新完善。对于SDK支持MCU的更新情况,可登陆以下KSDK的下载页面了解。       有关KSDK的更多信息可以从网址www.nxp.com/ksdk 获得。
View full article
FFT presentation for metering customers, targeted especially for KM3x / KM3x_256 devices. It briefly describes: How to Use it, and Why to Use it.
View full article
Kinetis E series MCUs target to applications where require high performance on EMC/ESD. With 5V power supply and robust IO design, Kinetis E series MCUs can help customer for a robust design. Here take a Microwave Oven demo as example, shares how to make a robust design with Kinetis E Series MCU, from hardware, software perspective.
View full article
最近,有客户反映在IAR6.6 环境中,即便在程序中配置了Kinetis的加密字段“0x40C -0x40F”,但在实际程序运行中发现这些加密位并没有被真正的写进去。现根据Colleagues的分析,结合个人的理解总结如下,描述不清楚之处希望能提出宝贵意见。 原因:新版本的IAR 6.6 为了防止用户在使用Kinetis过程中误操作导致芯片被锁死,默认将加密位Disable了,在烧录Flash的时候设了最后一道闸门,将0x40C -0x40F的值统一成0xFFFFFFFE (解密模式)。 如果要完成加密, 可以修改其Flash Loader配置。 证据:在C:\Program Files\IAR Systems\Embedded Workbench 6.5_2\arm\config\flashloader\Freescale文件夹中,查看FlashK60Dxxx128K.board文件可以看到如下描述,其中<args_doc>与</args_doc>可以理解为一些注释,需要按解决方法的步骤设置。 <args_doc>.....--enable_config_write - allow programming of 0x40C - 0x40F with user supplied data, in other case flashloader after erase of block 0 will write 0xFFFFFFFE (unsecure state).</args_doc> 解决方法: 1) 打开IAR的Options配置框,选择Debuger的Download 标签,勾选如下图所示的选项,可以看到此项目中对应的.board文件; 2) 点击edit按钮, 显示如下对话框,两处分别对应着包含不同Flash Memory的器件设备; 3) 对于不包含FlexNVM的器件,选择0x0-0xfffffff对应的条目,然后选择Edit; 4) 在下面的对话框中的extra edit 项目中填写 “--enable_config_write” , 它意味着打开了在烧录Flash的时候设置的最后一道闸门,使能了用户对加密字段“0x40C -0x40F”的配置。关于此参数选项含义,可以查看下面框中parameters description的描述。 5) 选择OK , 回到上级对话框,如下图可以看到“--enable_config_write”作为一个Extra Parameters显示出来; 6)再次选择OK,回到上层对话框。 此处不用担心OK后修改的配置会替换Flash Loader中的默认配置,因为系统会自动保存刚才的修改到一个新的board文件,并存储到当前工程的文件目录中; 7) 选择“save ”,保存; 8) 选择"OK”,然后开始下载。 9) 如果以后需要加密的时候, 可以使用新的board文件, 不需要加密的时候,选择使用IAR下面的board文件。      至此,完成整个配置过程。 关于在J_flash中选择使用加密: 1)在Jflash中选择project settings; 2)在Project settings栏选择CPU标签,勾选Device选项,并点击Freescale MKL25Z128xxx4后面的方框; 3)在如下窗口Manufacturer中选择Freescale,找到对应的Device,选择带有"allow security"的选项,就可以支持加密了。否则即便在程序中Kinetis的加密字节设置了加密,代码也不会实     际的运行。
View full article
Today the universal motor is still widely used in home appliances such as vacuum cleaners, washers, hand tools, and food processors. The operational mode, which is used in this application, is closed loop and regulated speed. This mode requires a speed sensor on the motor shaft. Such a sensor is usually an incremental sensor or a tachometer generator. The kind of motor and its drive have a high impact on many home appliance features like cost, size, noise, and efficiency. Electronic control is usually necessary when variables speed or energy savings are required. MCUs offer the advantages of low cost and attractive design. They can operate with only a few external components and reduce the energy consumption as well as the cost. This circuit was designed as a simple schematic using key features of a Kinetis L MCU. For demonstration purposes, the Freescale low cost Freedom KL25z development platform was used. This application note describes the design of a low-cost phase angle motor control drive system based on Freescales’s Kinetis L series microcontroller (MCU) and the MAC4DC snubberless triac. The low-cost single-phase power board is dedicated for universal brushed motors operating from 1000 RPMs to 15,000 RPMs. This application note explains both HW and SW design with an ARM Kinetis L series MCU. Such a low-cost MCU is powerful enough to do the whole job necessary for driving a closed loop phase angle system as well as many others algorithms.        -Freedom development platform with universal motor drive board extension The phase angle control technique is used to adjust the voltage applied to the motor. A phase shift of the gate’s pulses allows the effective voltage, seen by the motor, to be varied. All required functions are performed by just one integrated circuit and a small number of external components. This allows a compact printed circuit board (PCB) design and a cost-effective solution. Learn more about the Kinetis L series Freedom Board Get the full application note in the link bellow:
View full article
1.jicheng0622-AET-电子技术应用 2.wuyage-AET-电子技术应用 3.fanxi123-AET-电子技术应用
View full article
Anis Jarrar, Freescale design engineer, explains how his team developed Kinetis and how the result of their "chasing nanowatts" concept resulted in a highly scalable, ultra low power MCU. 32-bit Kinetis MCUs represent the most scalable portfolio of ARM® Cortex™-M4 MCUs in the industry. The first phase of the portfolio consists of five MCU families with over 200 pin-, peripheral- and software compatible devices with outstanding performance, memory and feature scalability. Enabled by innovative 90nM Thin Film Storage (TFS) flash technologu with unique FlexMemory (configurable embedded EEPROM), Kinetis features the latest low-power innovations and high performance, high precision mixed-signal capability. Kinetis MCUs are supported by a market-leading enablement bundle from Freescale and ARM 3rd party ecosystem partners. http://www.freescale.com/kinetis
View full article
1. CycloneMAX,    支持 Kinetis, ColdFire V2/V3/V4, Power MPC5xx/8xx, Qorivva MPC5xxx, DSC, MAC7xxx    PE Micro, http://www.pemicro.com/ 2. Flasher ARM     支持ARM公司全系列内核,包括传统的ARM7, ARM9和ARM11,已经新的Cortex-A, Cortex-M和Cortex-R系列,可以给目标板供电.    Segger, SEGGER - The Embedded Experts - Flasher ARM 3. Flasher Portable    支持ARM公司全系列内核,包括传统的ARM7, ARM9和ARM11,已经新的Cortex-A, Cortex-M和Cortex-R系列,电池供电,便携式烧写器.    Segger, SEGGER - The Embedded Experts-Flaser Portable 4. SmartPRO    支持 Kinetis, S12, S12X, ColdFireV2.    周立功,http://www.zlgmcu.com/ 5. MCP-104    支持飞思卡尔ARM based Microcontroller Kinetis.    祥佑科技(Micetek), http://www.micetek.com 6. 西尔特编程器,http://www.xeltek.com 7. 河洛编程器,http://www.hilosystems.com.tw
View full article
[中文翻译版] 见附件 原文链接: https://community.nxp.com/docs/DOC-335320
View full article
Here you can find both the code and project files for the PWM project, in this example a single PWM channel belonging to the Flextimer 0 (PTC10/FTM_CH12) is enabled to provide a PWM signal with a 500ms period, the signal's duty cycle increases its period every 100ms, to visually observe the signal connect a led from the A5 pin in the J4 connector to GND (J3, pin 14). Code: #include "mbed.h" //PWM output channel PwmOut PWM1(A5); int main() {     PWM1.period_ms(500);     int x;     x=1;         while(1)     {         PWM1.pulsewidth_ms(x);         x=x+1;         wait(.1);         if(x==500)         {             x=1;         }     } }
View full article
Here you can find the code and project files for the Interrupt example, in this example 2 KBI interrupts are enabled, one assigned to SW2 and another to SW3, during the main routine the blue led is turned on, when the interrupt routines are triggered the blue led is turned off and the red or green led blink once, the interrupt was configured to detect falling edges only. Code: #include "mbed.h" DigitalOut Red(LED1); DigitalOut Blue(LED3); InterruptIn Interrupt(SW2); void blink() {     wait(.4);     Red=1;     Blue=0;     wait(.4);     Blue=1;     wait(.4); } int main() {     Interrupt.fall(&blink);     Blue=1;     while (1)     {         Red=!Red;         wait(.4);     } }
View full article
Hello Freedom community users Bheema has posted on the Element14 community a very clear tutorial (accessible following the link below) to create from scratch a basic project example featuring the SLCD of the FRDM-KL46Z with Processor Expert. Freescale Freedom development platform: [FRDM-K... | element14 Those steps should be very useful to create your own project featuring SLCD display and better understand the constraints of this peripheral. Happy SLCD Displaying Greg
View full article