I2C ( Inter-Integrated Circuit ) Module by Alejandro Lozano, Freescale TIC. i2C Protocol Explanation. Connection Diagram. How to configure the registers. Hands-On. Presentación del módulo de I2C ( Inter-Integrated Circuit ) por Alejandro Lozano, Freescale TIC. Explicación del Protocolo I2C. Diagrama de conexión. Explicación de cómo configurar los registros. Hands-On
UART Presentation ( universal asynchronous receiver/transmitter) by Ali Piña, Freescale TIC. Module Explanation Connection Diagram Hands-On. Polling mode. Interrupt Mode. Presentación de UART ( universal asynchronous receiver/transmitter) by Ali Piña, Freescale TIC. a. Explicación del modulo. b. Diagrama de conexión. c. Hands-On. Modo de Poleo Modo de Interrupción
Nested Vectored Interrupt Controller Module by Vicente Gómez Freescale TIC. NVIC Explanation Hands-on IRQ using a pin. Interruption timers. Presentación de la NVIC ( Nested Vectored Interrupt Controller ) por Vicente Gómez, Freescale TIC. Explicación de la NVIC. Hands-On IRQ usando un pin. Timers con interrupción
This is a presentation used to explain the Low Power Timer adapted by Vicente Gómez, Freescale TIC. LPTMR Module Explanation. Connection Diagram. Operation Modes Hands-On Configure a timer so that it generates an interruption every x time. Explicación del Low Power Timer presentado por Vicente Gómez, Freescale TIC.- Explicación de los Modulos LPTMR . Diagrama de conexiones. Modos de operación Hands-on Configurar un timer para que genere una interrupción cada X tiempo.
The Multipurpose Clock Generator module explained by Ali Piña, Freescale TIC. MCG Module Explanation Connection Diagram Operation Modes Hands On Toggle a LED in FEI (FLL engaged Internal) switch to PEE (PLL Engaged External). Watch changes. Switch from different operation modes. El Módulo de MCG (Multipurpose Clock Generator) presentado por Ali Piña, Freescale TIC. Explicación del Modulo MCG. Diagrama de conexiones Modos de operación. Hands-On Togglear un LED en modo FEI (FLL engaged Internal) y cambiar a PEE(PLL Engaged External). Observar cambios. Moverse entre varios modos de operación
General Purpose Input/Output module presented by Jose Maria Casillas, Freescale TIC. Module explanation and alternative pin´s functions. Short explanation on the Bit Manipulation Engine (BME). Hands-On: LED RGB. Push Button. Módulo GPIO (General Purpose I/O) presentado por Jose María Casillas, Freescale TIC. Explicar el modulo y las funciones alternativas de los pines. Breve descripción del Bit Manipulation Engine (BME). Hands-On: LED RGB. Push Button.
Intro to Cortex-M0+ main features presented by Alejandro Lozano, Freescale, TIC. Intro to Cortex M0+. Kinetis L series description. Introducción al Cortex-M0+. Principales características presentadas por Alejandro Lozano, Freescale TIC. Introducción al Cortex-M0+ Descripción de la familia Kinetis L.
中文版： 想到过使用飞思卡尔的Freedom平台当做昂贵的J-Link调试器吗，好吧，这次给你机会了，呵呵。昨天在去SEGGER官网查资料的时候看到了一个suprise，Segger刚刚为OpenSDA平台release了一个可以兼容Jlink功能的firmware。说白了，就是借用OpenSDA当做J-Link用，当然有部分功能是有所限制的，不过瑕不掩瑜，Jlink的高速、稳定及一些特有的功能一直让接触过它的开发者印象深刻，所以能用low-cost的OpenSDA实现高性能的Jlink实在是让人兴奋，包括在下，哈哈，所以还等什么，赶紧露胳膊抹袖子整整吧，呵呵~ 其实这次SEGGER提供的firmware就是OpenSDA的一个Application（我已经上传到本博客最后的附件中了），类似MSD-APP和DBUG-APP等其他的OpenSDA应用，所以它的使用方法类似，具体可以参考我之前的一篇博客《尝鲜OpenSDA方式调试仿真Freedom平台》 http://blog.chinaaet.com/detail/31795.html 。 （1）将firmware更新到OpenSDA的平台之后，再回到normal mode，这样就可以把OpenSDA当J-Link用了。将硬件连接好之后，打开J-Link Commander，弹出的窗口如下图所示，看吧，有点如假包换的J-Link味道了吧，呵呵，而且还有正版的S/N序列号哦。 （2）当然在IAR环境下使用它还需要简单的设置几步，如下图所示，建议不使用flash loader而是使用jlink自带的调试下载引擎，更稳定且速度杠杠的，呵呵： （3）一切都准备好之后，就可以按照J-Link的调试方法调试Kinetis了，呵呵。当然有个最大的好处是，借用J-Link的特性，使用OpenSDA也可以支持Live watch了，可以实时更新观察变量，这点灰常灰常给力，如下图： Limitations： 当然我们也会猜到SEGGER不会那么蠢到自断财路（OpenSDA平台可是非常low-cost的），不然谁还会用那么昂贵的正版J-Link啊，呵呵。所以使用SEGGER提供的这个firmware有以下几点限制： 1）只能用在飞思卡尔平台基于ARM的产品上； 2）只可以调试飞思卡尔的评估板，所以貌似如果用在自己画的板子上可能有问题； 3）还有一个比较遗憾的，那就是不支持使用J-Flash软件（我一直觉着J-Flash很好用）； 4）SEGGER不提供技术支持（这个我觉着无所谓）。 总体来说，还是利好的消息的，我还是灰常灰常看好OpenSDA的应用前景的，连SEGGER都低头兼容了，看来飞思卡尔以后调试器短板有望得到弥补，加油吧，呵呵。 不聊了，附件为更新的固件，未完待续~ /*****************************************************************************************************************************************/ English Version: It feels realy good to see that SEGGER has offered a firmware running on the FRDM OpenSDA platform which makes OpenSDA compatible to J-Link lite, allowing users to take advantage of most J-Link features. It means we can do the same things with high-performance by using the low-cost OpenSDA platform. 1) How to do? The J-Link firmware SEGGER offered is just an OpenSDA Application, so put the FRDM board into Bootloader mode and update the firmware , which is enclosed in the attached, just like other OpenSDA applications . Then put it into normal mode and the J-Link driver will be installed. Open the J-Link Commander, and we will see the diagram below. In IAR IDE, some setup steps need to follow: 2) Why to do? Most inland customers get used to J-Link to debug ARM based products since ARM7 time and the J-Link is realy good debugger by my experience, althougn the legal J-Link is expensive. So we can help the customer to develop and evaluata products with low-cost OpenSDA platform. In addition, live watch in IAR, which can update the varibles in time, is only supported with J-Link engine, which is very important to customer. 3) Limitations May be used with ARM based Freescale devices only; Only debugging on evaluation boards is allowed. Debugging on custom hardware is not supported and not allowed; No production flash programming support; Unlimited breakpoints in flash available for evaluation only; No support is given. 4) Suggestions OpenSDA is a very potential platform. USBDM has also released a firmware which is compatible to OpenSDA recently. So an open source OpenSDA release from P&E is expected and to help customer to custom their own debugger hardware, which can help us to extend our Kinetis products more convenient. Voila, just give a try!
Hi, I have a project created by Processor Expert and CodeWarrior 10.2 for TWR-K20 demo kit. Becasue I have some problem to use the Processor Expert USB HID Keyboard Host of the USB stack 4.1.1, I need to change to add the non-PE USB HID Keyboard Host into the project. Can anyone tell me how to do it? It will be very appreciated to give me a simple 'PE' example project, and add the non-PE USB HID keyboard host stack. Thank you! Stanley
Hello Community fellows! This time I would like to thank BlackNight for giving us great material to work on. There have been several posts inquiring the uses of USB stack and Processor Expert. The examples he has worked on and now shares with all of us, include this and many more useful concepts that you'll find interesting with the use of boards. For this issue he turns his FRDM-KL25Z into a generic USB keyboard device. With a simple button press he is able to send any keyboard actions to his laptop, making such as ‘print screen’ a single button press...isn't that amazing? :smileygrin: Well, I'll say no more, you better check it out yourself! MCU on Eclipse by Erich Styger
R ecently, some customers have provided us with feedback stating they have been experiencing difficulties when connecting Kinetis L series microcontrollers using Multilink Universal probes, after checking the connection and software settings no obvious errors could be found. This recurrent problem has been confirmed by several customers, the problem is caused by a long connection line. My suggestion is to keep connection line length to 10cm or less; otherwise, the IDE may not be able to establish the connection through the Multilink Universal.
Hi, all The default AN2295 UART bootloader doesn't work well on K21/other Kinetis because of using FEI and complicated autocalibration mechanism. I made a simple version to make it works on MK21DX128VMC5, FYI. Readm.txt: UART bootloader for K21. (Default is MK21DX128VMC5) 128KB_Pflash_64KB_Dflash.icf is application link script example for MK21DX128 used together with UART bootloader, UART bootloader use 0x0 - 0xFFF. Q: Why need this patch? A: The original AN2295 use internal RC and FLL output as system clock. The calibration mechanism is not stable. The main change of this patch is to use external cystal plus PLL as system clock to communicate with PC software. Changes to AN2295 1) Add MK21D5.h for K21 support 2) Add AN2295_TWR_K21_cfg.h for K21 support(Copy from AN2295_TWR_K60_cfg.h) 3) AN2295_TWR_K21_cfg.h 1> #define KINETIS_MODEL K21_50MHz 2> #define KINETIS_FLASH FLASH_128K 3> #define BOOT_UART_BASE UART2_BASE_PTR #define BOOT_UART_GPIO_PORT PORTE_BASE_PTR #define BOOT_UART_GPIO_PIN_RX 17 #define BOOT_UART_GPIO_PIN_TX 16 4> #define BOOT_PIN_ENABLE_NUM 7 4) Add mcg folder and mcg.c/mcg.h 5) kinetis_params.h: 1> Modify SRS_REG/SRS_POR_MASK/INIT_CLOCKS_TO_MODULES to meet MK21D5.h 2> Add PORT_PCR_PS_MASK for BOOTLOADER_PIN_ENABLE_INIT to enable Pull-up. 6) bootloader.h: #define BOOT_WAITING_TIMEOUT 500. PC software can't communicate to bootloader if only 1s delay. 7) bootloader.c: 1> #include "mcg.h" 2> Use 25MHz PEE: SIM_CLKDIV1 = ( 0 | SIM_CLKDIV1_OUTDIV1(1) | SIM_CLKDIV1_OUTDIV2(1) | SIM_CLKDIV1_OUTDIV4(1)); (void)pll_init(8000000, /* CLKIN0 frequency */ LOW_POWER, /* Set the oscillator for low power mode */ CRYSTAL, /* Crystal or canned oscillator clock input */ 4, /* PLL predivider value */ 25, /* PLL multiplier */ MCGOUT); /* Use the output from this PLL as the MCGOUT */ 3> Restore to FEI mode before jump to Application: pee_pbe(8000000); pbe_fbe(8000000); fbe_fei(32768); Knowing issues: 1) Don't use virtualCOM from OSJTAG, it's very hard to communicate with PC software. Use RS232 in TWR-SER2. 2) BOOTLOADER_CRC_ENABLE must be 0, otherwise PC software will report unknown protocol version
Hi everyone! I have made a simple touch sensing demo for KL25z Freedom board for fast user friendly test using MSD bootloader (default combined application in Open SDA when you receive the Freedom - Mass Storage Device and serial port). Demo changes the brightness of red led populated on the board and communicate with FreeMaster visualization tool over embedded virtual serial port of Open SDA connection. Touch sensing application is controlled by TSS (touch sensing softwere). For more information about touch sensing and download of TSS go to www.freescale.com/tss The visualization output has 2 separate scope windows: one showing signals captured from electrodes of slider another one showing position of finger on a slider The operation is really simple, just drag and drop the attached *.s19 file into your device using MSD bootloader (as other precompiled projects for Freedom board) open the *.pmp file that is associated with FreeMASTER, choose the correct COM port at speed of 38400 kbps and start communication The demo was made in CodeWarrior 10.4 using TSS library 3.0.1 in Processor Expert tool, source code can be provided if there will be an interest. There is no need to configure MAP file for FreeMaster communication, application uses so called TSA table - it is position independent this way. If you are not familiar with FreeMASTER or not have it installed in your PC - go to www.freescale.com/freemaster to read more and download the free installer, install it and you are good to run the demo. There are two independent snapshots below, showing the response to my finger movement along the slider Enjoy! and keep in touch
Recently I did a porting based on AN4370SW for a customer to support TWR-K20D72M, and with some modification in source code, header file and link file as well, it works well as expected. The following simple describes what I have done: 1.Copy the project file folder for K20D50M "AN4370SW\Source\Device\app\dfu_bootloader\iar_ew\kinetis_k20" and rename is as "kinetis_k20d70m" 2.Change the target settings as well as the flash loader. 3. Replace the header file for K20D50M and include it in derivative.h. The header file for K20D72M can be found from KINETIS_72MHz_SRC(http://cache.freescale.com/files/32bit/software/KINETIS_72MHz_SRC.zip?fpsp=1&WT_TYPE=Lab%20and%20Test%20Software&WT_VENDOR=FREESCALE&WT_FILE_FORMAT=zip&WT_ASSET=Downloads&sr=9) 4.Modify the interrupt table in cstartup_M.s, which is more likely a K60's vertor table. 5.Search the code related with the macro "MCU_MK20D5", and add similar code snippet for K20D72M , You may easily find them by search the keyword "MCU_MK20D7". That code parts include initialization for MCG, and PIT0 and USB interrupt enablements, some definition in bootloader.h . 6. Copy the link file from K20D50M, and modify the PFLASH size,SRAM size and DFLASH size as shown below: Perform MassErase before programming . and then you may press the SW1 on TWR-K20D72M to select which mode to enter after download the application firmware: pressing SW1 to enter bootloader mode and releasing it to enter application mode. 7. Build image for this DFU bootloader. Actually the bareboard projects in KINETIS_72MHz_SRC can be used for that purpose, and only link file needs some modification to put the image starting from 0xA000, since exception table redirection has already been done in these projects. after that, user needs change some settings in the CW projects to use the new link file: and generate S19 file as the output as well as the map file: after compiling , you will have a xxx.afx.s19 file, but that is not the final format, we still need to transform it to bin format, and it can be done by a small tool in "C:\Program Files\Freescale\CW MCU v10.3\MCU\prog" There are some settings for this tool to transform the S19 file, by clicking Burner->Burner Dialog, you will see some option views, please set them as below: Referring to the above figure, maybe you would wonder how to set up the Origin and Length field, actually Origin is the value where the image starts from just as the link file specified , and Length is calculated by the results from the map file. Please refer to the following figure for details. 0x3550 = 0x1c90 + 0x18c0. I also attached the burner's configuration file and image link file as well as the image for reference. Please copy the link file in "KINETIS_72MHz_SRC\build\cw\linker_files". Please kindly refer to the attachment for more details. Hope that helps, B.R Kan