飞思卡尔项目书
飞思卡尔MQX实时操作系统用户手册(中文)

2.1 MQX 的组织结构 ..................................................................................5 2.2 初始化....................................................................................................6 2.3 任务管理................................................................................................6 2.4 调度........................................................................................................7 2.5 存储管理................................................................................................7
2.10.1 格式化 I/O ................................................................................. 11 2.10.2 I/O 子系统 ................................................................................... 11 2.11 检测工具 ............................................................................................ 11 2.11.1 日志............................................................................................. 11 2.11.2 轻量级日志 ................................................................................. 11 2.11.3 内核日志.....................................................................................12 2.11.4 栈的运用.....................................................................................12 2.12 出错处理............................................................................................12 2.12.1 任务出错代码.............................................................................12 2.12.2 异常处理.....................................................................................12 2.12.3 实时测试.....................................................................................12 2.13 队列操纵............................................................................................13 2.14 命名组件............................................................................................13 2.15 嵌入式调试........................................................................................13
飞思卡尔半导体 加速度传感器高亮度LED刹车灯 说明书

飞思卡尔半导体文件编号:AN3380 应用笔记第0版,12/2006©Freescale Semiconductor,Inc., 2007. All rights reserved. General Business Information加速度传感器高亮度LED刹车灯作者:Matt Ruff and Wolfgang BihlmayrAutomotive Systems EngineeringAustin, Texas and Munich,Germany加速度传感器高亮度LED 刹车灯的应用是针对摩托车驾驶人员的安全性所设计的。
从理论上讲,它可用于任何机动车辆,尤其适用于两轮车的驾驶员。
在交通中摩托车驾驶人员很难被看到,特别是在加速和减速比汽车快的时候更甚。
这些组合因素增加了摩托车驾驶人员受伤和致命的几率。
g-传感器刹车灯提供了与机动车辆减速度成正比的高强度可变光强的光输出,从而为摩托车后面的驾驶员提供有价值的信息。
刹车灯使用封装在一起的MMA7260Q 三轴向、低g加速计,以及高度集成的飞思卡尔MM908E625系统;该封装器件中还有HC908EY16 微型控制器和完全自我保护且智能的模拟电路。
HC908EY16读取来自加速计三个轴向的加速和减速数据,并控制系统和驱动8个高亮度LED。
目录1 系统基本说明. . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . 21.1 系统主要特点 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.2 系统结构图. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.3 系统的基本状态. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 加速计: 系统的核心 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . 52.1 使用 MMA7260Q测量减速度. . . . . . . . . . . . . . . . . . . . . . . . . . . 52.2 采集加速度/减速度数据. . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . 62.3 振动和噪声管理. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 驱动高亮度LED. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . 103.1 带有 MM908E625的基本HBLED半桥通道驱动. . . . . . . . . . .. 103.2 附加的LED控制电路. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 附加的系统特征 . . . . . . . . . . . . . . . . . . . . . . .. .. . . . .. .. .. . . . . . . . 125 软件设计. . . . . . . . . . . . . . . . . . . . . . . . . . . .. .. . . . . . .. . . . . . . . . . . 135.1 软件状态机. . . . . . . . . . . . . . . . . . . . . . .. . .. . . . . .. . . . . . . . . 135.2 加速计的初始化和校准. . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . 146 展望. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . .. . . . . . . . . . . . . . . 157 参考文献. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . 168 电路图. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . .. . . . . . . . . . . . . . 17 8.1 材料清单 . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . .. . . . . . . . . . . . . 18系统基本说明加速度传感器高亮度 LED 刹车灯, 第0版2General Business Information飞思卡尔半导体1 系统基本说明1.1系统主要特点加速度传感器刹车灯是一种亮度输出正比于机动车辆减速度的刹车灯。
飞思卡尔8位单片机MC9S08JM60开发板实践教程共40页word资料

第一章搭建实验环境系统时钟设置#include "App\Include\App.h"#ifndef _MCG_C#define _MCG_C//oscillator 12MHZ 倍频为24MHZ()先8分频后16倍频void S_MCGInit(void)/* the MCG is default set to FEI mode, it should be change to FBE mode*/MCGC2[7:6] BDIV总线频率分频因子–选择由MCGC1寄存器中CLKS位决定的时钟源的分频。
这控制总线频率。
00 编码0 –时钟1分频01 编码1 –时钟2分频(复位后默认)10 编码2 –时钟4分频11 编码3 –时钟8分频[5] RANGE频率范围选择–选择外部振荡器或者外部时钟源的频率范围。
1 选择1MHz到16MHz外部振荡器的频率范围。
(1MHz到40MHz的外部时钟电源)的高频率范围0 选择32kHz到100kHz外部振荡器的频率范围。
(32kHz到1MHz的外部时钟电源)的低频率范围[4] HGO高增益振荡器选择–控制外部振荡器操作模式。
1 配置外部振荡器为高增益运行0 配置外部振荡器为低功耗运行[3] LP低功耗选择–控制在忽略模式中FLL(或者PLL)是否为无效1 FLL(或PLL)在忽略模式(低功耗)中为无效的。
0 FLL(或PLL)在忽略模式中为无效的。
[2] EREFS外部参考时钟选择–为外部参考选择时钟源1 选择振荡器0 选择外部时钟源[1] ERCLKEN外部参考时钟使能–使能外部参考时钟作为MCGERCLK1 MCGERCLK激活0 MCGERCLK 无效[0] EREFSTEN外部参考时钟停止使能MCGC2 0b0011 0110 激发外部时钟(晶振)(没有使能)MCGC2=MCGC2_RANGE_MASK|MCGC2_HGO_MASK|MCGC2_EREFS_MASK|MCGC2_ERCLK EN_MASK;while(!MCGSC_OSCINIT);//MCGSC寄存器中OSCINIT(第1位)为1,表示由EREFS位选择的晶振被初始化。
机电学院第七届飞思卡尔智能车大赛策划书

机电学院第七届飞思卡尔智能车大赛策划书活动背景:在当前受金融危机的情况下,我国大学生的就业问题面临着前所未有的挑战,为我院学生能在就业上占据优势,为我院学生创造更好的就业前景,切实提高我院大学生的专业技能,顺应国家改变经济发展方式的潮流,体现节能减排的思想,更是为了全面贯彻落实“科教兴国战略”和深入实践科学发展观以及落实“十二五”规划的重要举措,从而促进我国经济又好又快发展,而举办此次活动。
活动目的:为挖掘我院学生的创新潜力,增强我院学生的合作意识,提高学生的团结协作能力,促进学生的学与用相结合,培养我们学生的动手实践能力,加强课内教学与社会产业的有效联系,加快我院校园文化建设的进程,创造良好的学习氛围,把学生的综合素质提高到更高的水平,为学生提供一个展示自己才能、展示自我的重要平台。
同时全面提升我院学生的设计及制造能力,更重要的是要通过这样的活动提升我院学生就业创业能力,进一步拓宽就业创业渠道,努力打好基础,从而为实现我国“十二五”规划的各项指标奠定基础和作出应有的贡献。
主办单位:机电学院学生工作室承办单位:机电学院团总支学生会协办单位: 机电学院学生会网络信息部活动对象:机电学院全体全日制普通本科学生活动时间:2011年5月8日~2011年7月2日活动地点:西校区室内篮球场组队规则:以团队的形式报名参赛(每队人数为3—8人)活动形式:参赛作品必须为完整的、能在规定程序的轨道上行走的智能车,由学生团队完成,要求对作品的设计思路、创新之处、这样设计的理由及其市场前景进行书面阐述。
(2500以上,可附图、表、数据等)活动内容:参加的团队可以根据自己的见解,从汽车的外形、发动机、节能、环保、智能化等方面进行自主创新设计,设计的作品最好能做到节能、环保兼顾。
活动步骤:一、赛前筹备:1、5月8日召开各班团支书会议,传达比赛的内容,要求团支书传达会议内容及相关注意事项,并积极动员班内同学踊跃参与,要求大二、大三每个班至少有两支队伍参赛;(大一的可以自由参加。
飞思卡尔 MCF5282UM 用户手册说明书

MCF5282 and MCF5216 ColdFire®Microcontroller User’s ManualDevices Supported:MCF5214MCF5216MCF5280MCF5281MCF5282Document Number: MCF5282UMRev. 32/2009How to Reach Us:Home Page:Web Support:/supportUSA/Europe or Locations Not Listed: Freescale Semiconductor, Inc.Technical Information Center, EL5162100 East Elliot RoadTempe, Arizona 852841-800-521-6274 or +1-480-768-2130/supportEurope, Middle East, and Africa:Freescale Halbleiter Deutschland GmbHTechnical Information CenterSchatzbogen 781829 Muenchen, Germany+44 1296 380 456 (English)+46 8 52200080 (English)+49 89 92103 559 (German)+33 1 69 35 48 48 (French)/supportJapan:Freescale Semiconductor Japan Ltd. Headquarters ARCO Tower 15F1-8-1, Shimo-Meguro, Meguro-ku,Tokyo 153-0064Japan0120 191014 or +81 3 5437 9125***************************Asia/Pacific:Freescale Semiconductor China Ltd.Exchange Building 23FNo. 118 Jianguo RoadChaoyang DistrictBeijing 100022China+86 10 5879 8000**************************Freescale Semiconductor Literature Distribution Center P.O. Box 5405Denver, Colorado 802171-800-441-2447 or +1-303-675-2140Fax: +1-303-675-2150*********************************************Information in this document is provided solely to enable system and software implementers to use Freescale Semiconductor products. There are no express or implied copyright licenses granted hereunder to design or fabricate any integrated circuits or integrated circuits based on the information in this document.Freescale Semiconductor reserves the right to make changes without further notice to any products herein. Freescale Semiconductor makes no warranty, representation or guarantee regarding the suitability of its products for any particular purpose, nor does Freescale Semiconductor assume any liability arising out of the application or use of any product or circuit, and specifically disclaims any and all liability, including without limitation consequential or incidental damages. “T ypical” parameters that may be provided in Freescale Semiconductor data sheets and/or specifications can and do vary in different applications and actual performance may vary over time. All operating parameters, including “T ypicals”, must be validated for each customer application by customer’s technical experts. Freescale Semiconductor does not convey any license under its patent rights nor the rights of others. Freescale Semiconductor products are not designed, intended, or authorized for use as components in systems intended for surgical implant into the body, or other applications intended to support or sustain life, or for any other application in which the failure of the Freescale Semiconductor product could create a situation where personal injury or death may occur. Should Buyer purchase or use Freescale Semiconductor products for any such unintended or unauthorized application, Buyer shall indemnify and hold Freescale Semiconductor and its officers, employees, subsidiaries, affiliates, and distributors harmless against all claims, costs, damages, and expenses, and reasonable attorney fees arising out of, directly or indirectly, any claim of personal injury or death associated with such unintended or unauthorized use, even if such claim alleges that Freescale Semiconductor was negligent regarding the design or manufacture of the part.Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners.© Freescale Semiconductor, Inc. 2009. All rights reserved.MCF5282UMRev. 32/2009OverviewColdFire CoreEnhanced Multiply-Accumulate Unit (EMAC)CacheStatic RAM (SRAM)ColdFire Flash Module (CFM)Power ManagementSystem Control Module (SCM)Clock ModuleInterrupt Controller ModulesEdge Port Module (EPORT)Chip Select ModuleExternal Interface Module (EIM)Synchronous DRAM Controller ModuleDMA Controller ModuleFast Ethernet Controller (FEC)Watchdog Timer ModuleProgrammable Interrupt Timer (PIT) ModulesGeneral Purpose Timer (GPT) ModulesFlexCAN ModuleGeneral Purpose I/O ModuleI 2C Module 345789101112131516171819246202526212322DMA TimersQueued Serial Peripheral Interface Module (QSPI)UART Modules1227282930313233A Chip Configuration Module (CCM)Queued Analog-to-Digital Converter (QADC)Reset Controller ModuleDebug SupportIEEE 1149.1 Test Access Port (JTAG)Mechanical DataElectrical CharacteristicsMemory MapB Revision History Signal Descriptions 14Overview ColdFire Core Enhanced Multiply-Accumulate Unit (EMAC)Cache Static RAM (SRAM)ColdFire Flash Module (CFM)Power Management System Control Module (SCM)Clock Module Interrupt Controller Modules Edge Port Module (EPORT)Chip Select Module External Interface Module (EIM)Signal Descriptions Synchronous DRAM Controller Module DMA Controller Module Fast Ethernet Controller (FEC)Watchdog Timer Module Programmable Interrupt Timer (PIT) Modules General Purpose Timer (GPT) Modules FlexCAN Module General Purpose I/O Module I 2C Module 34578910111213141516171819246202526212322DMA Timers Queued Serial Peripheral Interface Module (QSPI)UART Modules 1227282930313233AChip Configuration Module (CCM)Queued Analog-to-Digital Converter (QADC)Reset Controller Module Debug Support IEEE 1149.1 Test Access Port (JTAG)Mechanical Data Electrical Characteristics Memory Map B Revision HistoryChapter1Overview1.1Key Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-11.1.1Version 2 ColdFire Core . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-71.1.1.1 Cache . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-71.1.1.2 SRAM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-71.1.1.3 Flash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-81.1.1.4 Debug Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-81.1.2System Control Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-81.1.3External Interface Module (EIM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-91.1.4Chip Select . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-91.1.5Power Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-91.1.6General Input/Output Ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-91.1.7Interrupt Controllers (INTC0/INTC1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-91.1.8SDRAM Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-101.1.9T est Access Port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-101.1.10UART Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-101.1.11DMA Timers (DTIM0-DTIM3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-111.1.12General-Purpose Timers (GPT A/GPTB) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-111.1.13Periodic Interrupt Timers (PIT0-PIT3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-111.1.14Software Watchdog Timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-111.1.15Phase Locked Loop (PLL) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-111.1.16DMA Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-111.1.17Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-12 1.2MCF5282-Specific Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-121.2.1Fast Ethernet Controller (FEC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-121.2.2FlexCAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-121.2.3I2C Bus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-121.2.4Queued Serial Peripheral Interface (QSPI) . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-131.2.5Queued Analog-to-Digital Converter (QADC) . . . . . . . . . . . . . . . . . . . . . . . . . 1-13Chapter2ColdFire Core2.1Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-12.1.1Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1 2.2Memory Map/Register Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-22.2.1Data Registers (D0–D7) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-42.2.2Address Registers (A0–A6) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-42.2.3Supervisor/User Stack Pointers (A7 and OTHER_A7) . . . . . . . . . . . . . . . . . . . 2-52.2.4Condition Code Register (CCR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-62.2.5Program Counter (PC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-72.2.6Cache Control Register (CACR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-72.2.7Access Control Registers (ACR n) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-72.2.8Vector Base Register (VBR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-72.2.9Status Register (SR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-82.2.10Memory Base Address Registers (RAMBAR, FLASHBAR) . . . . . . . . . . . . . . . 2-8 2.3Functional Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-92.3.1Version 2 ColdFire Microarchitecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-92.3.2Instruction Set Architecture (ISA_A+) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-142.3.3Exception Processing Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-152.3.3.1 Exception Stack Frame Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-172.3.4Processor Exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-182.3.4.1 Access Error Exception . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-182.3.4.2 Address Error Exception . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-192.3.4.3 Illegal Instruction Exception . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-192.3.4.4 Divide-By-Zero . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-202.3.4.5 Privilege Violation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-202.3.4.6 Trace Exception . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-202.3.4.7 Unimplemented Line-A Opcode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-212.3.4.8 Unimplemented Line-F Opcode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-212.3.4.9 Debug Interrupt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-212.3.4.10 RTE and Format Error Exception . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-212.3.4.11 TRAP Instruction Exception . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-222.3.4.12 Unsupported Instruction Exception . . . . . . . . . . . . . . . . . . . . . . . . . . 2-222.3.4.13 Interrupt Exception . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-222.3.4.14 Fault-on-Fault Halt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-222.3.4.15 Reset Exception . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-222.3.5Instruction Execution Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-252.3.5.1 Timing Assumptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-262.3.5.2 MOVE Instruction Execution Times . . . . . . . . . . . . . . . . . . . . . . . . . . 2-262.3.5.3 Standard One Operand Instruction Execution Times . . . . . . . . . . . . . 2-282.3.5.4 Standard Two Operand Instruction Execution Times . . . . . . . . . . . . . 2-282.3.5.5 Miscellaneous Instruction Execution Times . . . . . . . . . . . . . . . . . . . . 2-302.3.5.6 EMAC Instruction Execution Times . . . . . . . . . . . . . . . . . . . . . . . . . . 2-312.3.5.7 Branch Instruction Execution Times . . . . . . . . . . . . . . . . . . . . . . . . . . 2-32Chapter3Enhanced Multiply-Accumulate Unit (EMAC)3.1Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-13.1.1Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-13.1.1.1 Introduction to the MAC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2 3.2Memory Map/Register Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-33.2.1MAC Status Register (MACSR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-33.2.2Mask Register (MASK) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-53.2.3Accumulator Registers (ACC0–3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-63.2.4Accumulator Extension Registers (ACCext01, ACCext23) . . . . . . . . . . . . . . . . 3-7 3.3Functional Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-83.3.1Fractional Operation Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-103.3.1.1 Rounding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-103.3.1.2 Saving and Restoring the EMAC Programming Model . . . . . . . . . . . . 3-113.3.1.3 MULS/MULU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-123.3.1.4 Scale Factor in MAC or MSAC Instructions . . . . . . . . . . . . . . . . . . . . 3-123.3.2EMAC Instruction Set Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-123.3.3EMAC Instruction Execution Times . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-133.3.4Data Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-143.3.5MAC Opcodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-14Chapter4Cache4.1Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-14.1.1Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-14.1.2Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1 4.2Memory Map/Register Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-24.2.1Cache Control Register (CACR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-34.2.2Access Control Registers (ACR0, ACR1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-6 4.3Functional Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-74.3.1Interaction with Other Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-74.3.2Memory Reference Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-84.3.3Cache Coherency and Invalidation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-84.3.4Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-84.3.5Cache Miss Fetch Algorithm/Line Fills . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-9Chapter5Static RAM (SRAM)5.1SRAM Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-1 5.2SRAM Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-1 5.3SRAM Programming Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-15.3.1SRAM Base Address Register (RAMBAR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-15.3.2SRAM Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-35.3.3SRAM Initialization Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-35.3.4Power Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-4Chapter6ColdFire Flash Module (CFM)6.1Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-1 6.2Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-2 6.3Memory Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-46.3.1CFM Configuration Field . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-56.3.2Flash Base Address Register (FLASHBAR) . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-56.3.3CFM Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-76.3.4Register Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-86.3.4.1 CFM Configuration Register (CFMCR) . . . . . . . . . . . . . . . . . . . . . . . . . 6-86.3.4.2 CFM Clock Divider Register (CFMCLKD) . . . . . . . . . . . . . . . . . . . . . . . 6-96.3.4.3 CFM Security Register (CFMSEC) . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-106.3.4.4 CFM Protection Register (CFMPROT) . . . . . . . . . . . . . . . . . . . . . . . . 6-126.3.4.5 CFM Supervisor Access Register (CFMSACC) . . . . . . . . . . . . . . . . . 6-136.3.4.6 CFM Data Access Register (CFMDACC) . . . . . . . . . . . . . . . . . . . . . . 6-146.3.4.7 CFM User Status Register (CFMUSTAT) . . . . . . . . . . . . . . . . . . . . . . 6-156.3.4.8 CFM Command Register (CFMCMD) . . . . . . . . . . . . . . . . . . . . . . . . . 6-16 6.4CFM Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-166.4.1Read Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-176.4.2Write Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-176.4.3Program and Erase Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-176.4.3.1 Setting the CFMCLKD Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-176.4.3.2 Program, Erase, and Verify Sequences . . . . . . . . . . . . . . . . . . . . . . . 6-186.4.3.3 Flash Valid Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-196.4.3.4 Flash User Mode Illegal Operations . . . . . . . . . . . . . . . . . . . . . . . . . . 6-216.4.4Stop Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-216.4.5Master Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-22 6.5Flash Security Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-226.5.1Back Door Access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-236.5.2Erase Verify Check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-23 6.6Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-23 6.7Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-23Chapter7Power Management7.1Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-1 7.2Memory Map and Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-17.2.1Programming Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-17.2.2Memory Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-27.2.3Register Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-27.2.3.1 Low-Power Interrupt Control Register (LPICR) . . . . . . . . . . . . . . . . . . 7-27.2.3.2 Low-Power Control Register (LPCR) . . . . . . . . . . . . . . . . . . . . . . . . . . 7-4 7.3Functional Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-57.3.1Low-Power Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-57.3.1.1 Run Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-57.3.1.2 Wait Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-67.3.1.3 Doze Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-67.3.1.4 Stop Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-67.3.1.5 Peripheral Shut Down . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-67.3.2Peripheral Behavior in Low-Power Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-67.3.2.1 ColdFire Core . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-67.3.2.2 Static Random-Access Memory (SRAM) . . . . . . . . . . . . . . . . . . . . . . . 7-67.3.2.3 Flash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-77.3.2.4 System Control Module (SCM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-77.3.2.5 SDRAM Controller (SDRAMC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-77.3.2.6 Chip Select Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-77.3.2.7 DMA Controller (DMAC0–DMA3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-77.3.2.8 UART Modules (UART0, UART1, and UART2) . . . . . . . . . . . . . . . . . . 7-87.3.2.9 I2C Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-87.3.2.10 Queued Serial Peripheral Interface (QSPI) . . . . . . . . . . . . . . . . . . . . 7-87.3.2.11 DMA Timers (DMAT0–DMAT3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-87.3.2.12 Interrupt Controllers (INTC0, INTC1) . . . . . . . . . . . . . . . . . . . . . . . . . 7-97.3.2.13 Fast Ethernet Controller (FEC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-97.3.2.14 I/O Ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-97.3.2.15 Reset Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-97.3.2.16 Chip Configuration Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-97.3.2.17 Clock Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-107.3.2.18 Edge Port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-107.3.2.19 Watchdog Timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-107.3.2.20 Programmable Interrupt Timers (PIT0, PIT1, PIT2 and PIT3) . . . . . 7-107.3.2.21 Queued Analog-to-Digital Converter (QADC) . . . . . . . . . . . . . . . . . . 7-117.3.2.22 General Purpose Timers (GPTA and GPTB) . . . . . . . . . . . . . . . . . . 7-117.3.2.23 FlexCAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-117.3.2.24 ColdFire Flash Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-137.3.2.25 BDM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-137.3.2.26 JTAG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-137.3.3Summary of Peripheral State During Low-Power Modes . . . . . . . . . . . . . . . . 7-13Chapter8System Control Module (SCM)8.1Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-1 8.2Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-1 8.3Memory Map and Register Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-2 8.4Register Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-28.4.1Internal Peripheral System Base Address Register (IPSBAR) . . . . . . . . . . . . . 8-28.4.2Memory Base Address Register (RAMBAR) . . . . . . . . . . . . . . . . . . . . . . . . . . 8-38.4.3Core Reset Status Register (CRSR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-58.4.4Core Watchdog Control Register (CWCR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-58.4.5Core Watchdog Service Register (CWSR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-7 8.5Internal Bus Arbitration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-78.5.1Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-88.5.2Arbitration Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-98.5.2.1 Round-Robin Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-98.5.2.2 Fixed Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-98.5.3Bus Master Park Register (MP ARK) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-9 8.6System Access Control Unit (SACU) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-118.6.1Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-118.6.2Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-128.6.3Memory Map/Register Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-128.6.3.1 Master Privilege Register (MPR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-138.6.3.2 Peripheral Access Control Registers (PACR0–PACR8) . . . . . . . . . . . 8-13。
飞思卡尔半导体用户指南说明书

Freescale Semiconductor User’s Guide1OverviewThe Freescale Freedom development platform is a set of software and hardware tools for evaluation and development. It’s ideal for the rapid prototyping ofmicrocontroller-based applications. The Freescale Freedom KL26Z hardware (FRDM-KL26Z) is a capable and cost-effective design featuring a Kinetis L seriesmicrocontroller, the industry’s first microcontroller built on the ARM® Cortex™-M0+ core.FRDM-KL26Z can be used to evaluate the KL16 and KL26 Kinetis L series devices. It features a KL26Z128VLH4, a device boasting a maximum operating frequency of 48MHz, 128KB of flash, a full-speed USB controller, and numerous analog and digital peripherals. The FRDM-KL26Z hardware is form-factor compatible with the Arduino™ R3 pin layout, providing a broad range of expansion board options. The on-board interfaces include an RGB LED, a 6-axis digital sensor (combining a 3D accelerometer and 3Dmagnetometer), ambient light sensor, and a capacitive touch slider.The FRDM-KL26Z features the Freescale open standard embedded serial and debug adapter known as OpenSDA.Doc Number:FRDMKL26ZUGRev. 0, 10/2013Contents1.Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.Reference documents . . . . . . . . . . . . . . . . . . . . . . . . . 23.Getting started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24.FRDM-KL26Z hardware overview . . . . . . . . . . . . . . 25.FRDM-KL26Z hardware description . . . . . . . . . . . . . 5FRDM-KL26Z User’s GuidebyFreescale Semiconductor, Inc.Reference documentsThis circuit offers several options for serial communications, flash programming and run-control debugging.2Reference documentsThe table below provides a list of reference documents for the FRDM-KL26Z hardware. All of these documents are available online at /FRDM-KL26Z.Table1. FRDM-KL26Z reference documentsFilename DescriptionFRDM-KL26Z Quick Start Package Quick Start Guide and supporting files for getting started with the FRDM-KL26Z FRDM-KL26Z User’s Guide This document—overview and detailed information for the FRDM-KL26ZhardwareFRDM-KL26Z Pinouts Spreadsheet of pin connections for all MCU pins. Includes pinout for the I/Oheaders, Arduino R3 compatibility chart, and OpenSDA MCU pinout.FRDM-KL26Z Schematics PDF schematics for the FRDM-KL26Z hardwareFRDM-KL26Z Design Package Zip file containing all design source files for the FRDM-KL26Z hardware OpenSDA User’s Guide Overview and instructions for use of the OpenSDA embedded debug circuit3Getting startedSee the FRDM-KL26Z Quick Start Package for step-by-step instructions to get started with the FRDM-KL26Z. See the Jump Start Your Design section on /FRDM-KL26Z for the Quick Start Package and software lab guides.4FRDM-KL26Z hardware overviewThe features of the FRDM-KL26Z include:•MKL26Z128VLH4 in a 64 LQFP package•Capacitive touch slider•FXOS8700CQ accelerometer and magnetometer•Tri-color (RGB) LED•Ambient light sensor•User push button•Flexible power supply options – USB, coin cell battery, external source•Battery-ready, power-measurement access points•Easy access to MCU I/O via Arduino™ R3 compatible I/O connectors•Programmable OpenSDA debug interface with multiple applications available including:—Mass storage device flash programming interface—P&E Debug interface provides run-control debugging and compatibility with IDE toolsFRDM-KL26Z hardware overview—CMSIS-DAP interface: new ARM standard for embedded debug interface—Data logging applicationFigure1 shows a block diagram of the FRDM-KL26Z design. The primary components and their placement on the hardware assembly are pointed out in Figure2.Figure1. FRDM-KL26Z block diagramFRDM-KL26Z hardware overview! (Figure2. FRDM-KL26Z feature call-outsFRDM-KL26Z hardware description5FRDM ‐KL26Z hardware description5.1Power supplyThere are multiple power supply options on the FRDM-KL26Z. It can be powered from either of the USB connectors, the VIN pin on the I/O header, an on-board coin cell battery, or an off-board 1.71-3.6V supply from the 3.3V pin on the I/O header. The USB and VIN supplies are regulated on-board using a 3.3V linear regulator to produce the main power supply. The other two sources are not regulated on-board. Table 2 provides the operational details and requirements for the power supplies.Table 2.Power supply requirementsNote that the OpenSDA circuit is only operational when a USB cable is connected and supplying power to J10. However, protection circuitry is in place to allow multiple sources to be powered at once.Figure 3 shows the schematic drawing for the power supply inputs and the on-board voltage regulator.Figure 3. Power supply schematicIn addition, regulated power can be supplied to J3 pin 10 from an external source through P5-9V_VIN by populating the board with an optional voltage regulator, e.g. a 7805 style regulator in a TO-220 package, thus providing a high current supply to external devices. To prevent voltage sag under a high load, C23,Supply Source Valid RangeOpenSDA Operational?Regulated on-board?OpenSDA USB (J7)5V Yes Yes KL26Z USB (J5)5V No Yes V in 4.3-9V No Yes 3.3V pin 1.71-3.6V No No Coin cell battery1.71-3.6VNoNoFRDM-KL26Z hardware descriptionC24, C25 & C28 should be populated with appropriately sized capacitors to match the regulator chosen. See Figure4.Figure4. Optional voltage regulator schematicTable3. FRDM-KL26Z power suppliesPowerDescriptionSupply NameP5-9V_VIN Power supplied from the V in pin of the I/O headers (J3 pin 16)P5V_SDA Power supplied from the OpenSDA USB connector (J10). A Schottky diode provides back drive protection.P5V_KL26Z Power supplied from the KL26Z USB connector (J6). A Schottky diode provides back drive protection P3V3_VREG Regulated 3.3V supply. Sources power to the P3V3 supply rail with an optional back drive protection Schottky diode.12P3V3_BATT Coin cell battery supply voltage. Sources power to the P3V3 supply rail with the option of adding a back drive protection Schottky diode.3P3V3Main supply rail for the FRDM-KL26Z assembly. May be sourced from P3V3_VREG, P3V3_BATT, or directly from the I/O headers (J3 pin 8).P3V3_KL26Z KL26Z MCU supply. Header J5 provides a convenient means for energy consumption measurements.4 P3V3_SDA OpenSDA circuit supply. Header J15 provides a convenient means for energy consumptionmeasurements.4P5V_USB Nominal 5V supplied to the I/O headers (J3 pin 10). Sourced from either the P5V_KL26Z or P5V_SDA supply through a back drive protection Schottky diode.FRDM-KL26Z hardware description5.2Serial and debug adapter (OpenSDA)OpenSDA is an open standard serial and debug adapter. It bridges serial and debug communications between a USB host and an embedded target processor as shown in Figure 5. The hardware circuit is based on a Freescale Kinetis K20 family microcontroller (MCU) with 128 KB of embedded flash and anintegrated USB controller. OpenSDA features a mass storage device (MSD) bootloader, which provides a quick and easy mechanism for loading different OpenSDA applications such as flash programmers, run-control debug interfaces, serial-to-USB converters, and more. See the OpenSDA User’s Guide for more details.Figure 5. OpenSDA high-level block diagramOpenSDA is managed by a Kinetis K20 MCU built on the ARM® Cortex™-M4 core. The OpenSDA circuit includes a status LED (D8) and a pushbutton (SW2). The pushbutton asserts a reset signal to the KL26Z target MCU. It can also be used to place the OpenSDA circuit into Bootloader mode. OpenSDA MCU RESET can be isolated from SW2 by cutting the trace between pins on J13. SPI and GPIO signals1By default the linear regulator, U1, is a 3.3V output regulator. However, this is a common footprint that would allow the user to modify the assembly to utilize an alternative device such as a 1.8V or 2.5V regulator. The KL26Z microcontroller has an operating range of 1.71V to 3.6V.2D2 is bypassed by J14. By default, the pins of J14 are shorted together, to reduce the voltage drop across D2. To use D2, cut the trace between the pins of J14.3If a coin cell battery is to be used, add a small amount of solder to the coin cell ground pad before adding the battery holder. Also, it is recommended to populate D1 as a protection diode when using a coin cell battery.4J5 and J15 are not populated by default. The two pins of these headers are in parallel with 0 Ω resistors. In addition, J5 is also in parallel with a 10 Ω resistor. To measure the energy consumption of the KL26Z, either a voltmeter or an ammeter may be used. To use a voltmeter, R3 (0 Ω) must be removed before connecting the voltmeter probes to the pins of J5. Both R3 and R2 (10 Ω) must be removed to measure current with an ammeter. For the OpenSDA MCU, energy consumption can be measured by removing R4 (0 Ω) and connecting ammeter probes to the pins of J15.FRDM-KL26Z hardware descriptionprovide an interface to the SWD debug port of the KL26Z. Additionally, signal connections are available to implement a UART serial channel. The OpenSDA circuit receives power when the USB connector J10 is plugged into a USB host.5.2.1Debug interfaceSignals with SPI and GPIO capability are used to connect directly to the SWD of the KL26Z. These signals are also brought out to a standard 10-pin (0.05”) Cortex Debug connector (J7). It is possible to isolate the KL26Z MCU from the OpenSDA circuit and use J7 to connect to an off-board MCU. To accomplish this, cut the trace on the bottom side of the PCB that connects J8 pin 1 to J8 pin 2. This will disconnect the SWD_CLK pin to the KL26Z so that it will not interfere with the communications to an off-board MCU connected to J7.Figure6. SWD debug connectorNote that J7 is not populated by default. A Samtec FTSH-105-02-F-D or compatible connector can be added to the J7 through-hole connector. A mating cable, such as a Samtec FFSD IDC cable, can then be used to connect from the OpenSDA of the FRDM-KL26Z to an off-board SWD connector.5.2.2Virtual serial portA serial port connection is available between the OpenSDA MCU and pins PTA1 and PTA2 of the KL26Z. Several of the default OpenSDA Applications provided by Freescale, including the MSD Flash Programmer and the P&E Debug Application, provide a USB communications device class (CDC) interface that bridges serial communications between the USB host and this serial interface on the KL26Z.5.3KL26Z microcontrollerThe target microcontroller of the FRDM-KL26Z is the KL26Z128VLH4, a Kinetis L series device in a 64 LQFP package. The KL26Z MCU features include:FRDM-KL26Z hardware description•32-bit ARM Cortex-M0+ core—Up to 48 MHz operation—Single-cycle fast I/O access port•Memories—128 KB flash—16 KB SRAM•System integration—Power management and mode controllers—Low-leakage wakeup unit—Bit manipulation engine for read-modify-write peripheral operations—Direct memory access (DMA) controller—Computer operating properly (COP) Watchdog timer•Clocks—Clock generation module with FLL and PLL for system and CPU clock generation—4 MHz and 32 kHz internal reference clock—System oscillator supporting external crystal or resonator—Low-power 1kHz RC oscillator for RTC and COP watchdog•Analog peripherals—16-bit SAR ADC w/ DMA support—12-bit DAC w/ DMA support—High speed comparator•Communication peripherals—Two 16-bit Serial Peripheral Interfaces (SPI)—USB dual-role controller with built-in FS/LS transceiver—USB voltage regulator—Two I2C modules—One low-power UART and two standard UART modules—One I2S module•Timers—One 6-channel Timer/PWM module—T wo 2-channel Timer/PWM modules—2-channel Periodic Interrupt Timer (PIT)—Real time clock (RTC)—Low-power Timer (LPTMR)—System tick timer•Human-Machine Interfaces (HMI)—General purpose input/output controllerFRDM-KL26Z hardware description—Capacitive touch sense input interface hardware module5.3.1Clock sourceThe Kinetis KL26 microcontrollers feature an on-chip oscillator compatible with three ranges of input crystal or resonator frequencies: 32-40 kHz (low freq. mode), 3-8 MHz (high frequency mode, low range) and 8-32 MHz (high frequency mode, high range). The KL26Z128 on the FRDM-KL26Z is clocked from an 8 MHz crystal.5.3.2USB interfaceThe Kinetis KL26 microcontrollers feature a dual-role USB controller with on-chip full-speed andlow-speed transceivers. The USB interface on the FRDM-KL26Z is configured as a full-speed USB device. J6 is the USB connector for this interface.Figure7. USB connector schematicIn order to enable USB host functionality on the FRDM-KL26Z, it is necessary to populate J9 and R8 as shown in Figure7. However, there is no electrical protection provided. Use the USB host functionality at your own risk.FRDM-KL26Z hardware description 5.3.3Serial portThe primary serial port interface signals are PTA1 and PTA2. These signals are connected to both the OpenSDA and to the J1 I/O connector. Note that the OpenSDA connection can be isolated from J1 by removing R13 & R14, if required.5.3.4ResetThe PTA20/RESET signal on the KL26Z128 is connected externally to a pushbutton, SW2, and also to the OpenSDA circuit. However, J13 has been provided to isolate the OpenSDA MCU from SW2. Isolating the RESET line allows a more accurate measurement of the target device’s power consumption in low-power modes. The reset button can be used to force an external reset event in the target MCU. The reset button can also be used to force the OpenSDA circuit into bootloader mode. See Section5.2, “Serial and debug adapter (OpenSDA), for more details.5.3.5DebugThe sole debug interface on all Kinetis L Series devices is a serial wire debug (SWD) port. The primary controller of this interface on the FRDM-KL26Z is the onboard OpenSDA circuit (see Section5.2, “Serial and debug adapter (OpenSDA)). However, an unpopulated 10-pin (0.05”) Cortex Debug connector, J7, provides access to the SWD signals. The Samtec FTSH-105-02-F-D or compatible connector can be added to the J7 through-hole debug connector to allow for an external debug cable to be connected.5.4Capacitive touch sliderTwo Touch Sense Input (TSI) signals, TSI0_CH9 and TSI0_CH10, are connected to capacitive electrodes configured as a touch slider. Freescale’s Touch Sense Software (TSS) provides a software library for implementing the capacitive touch slider.5.56-axis accelerometer and magnetometerA Freescale FXOS8700CQ low-power, six-axis accelerometer and magnetometer is interfaced through an I2C bus and two GPIO signals as shown in Table4. By default, the I2C address is 0x1D (SA0 pulled high).Table4. Accelerometer signal connectionsFX0S8700CQ KL26Z128SCL PTE24SDA PTE25INT1PTD0INT2PTD1FRDM-KL26Z hardware descriptionFigure 8. FXOS8700CQ schematic diagram5.6RGB LEDThree PWM-capable signals are connected to a red, green, blue LED, D7. The signal connections are shown in Table 5.Table 5. RGB LED signal connectionsFigure 9. RGB LED schematic diagramRGB LEDKL26Z128Red cathodePTE29Green cathodePTE31Blue cathodePTD511PTD5 is also connected to the I/O header on J2 pin 10 (also known as D13).FRDM-KL26Z hardware description5.7Ambient light sensorAn ambient light sensor is connected to ADC0_SE3 (PTE22). This sensor may be isolated from PTE22 by removing R36.5.8Input/Output connectorsThe KL26Z128VLK4 microcontroller is packaged in a 64-pin LQFP. Some pins are utilized in on-board circuitry, but many are directly connected to one of four I/O headers.The pins on the KL26Z microcontroller are named for their general purpose input/output port pin function. For example, the 1st pin on Port A is referred to as PTA1. The I/O connector pin names are given the same name as the KL26Z pin connected to it, where applicable.FRDM-KL26Z hardware descriptionNote that all pinout data is available in spreadsheet format in FRDM-KL26Z Pinouts. See Section2, “Reference documents” for details.5.9Analog reference voltageThe onboard ADC of the KL26Z128VLH4 MCU uses the Reference V oltage High (VREFH) and Reference V oltage Low (VREFL) pins to set high and low voltage references for the analog modules. On the FRDM-KL26Z, by default VREFH is attached to P3V3_KL26Z (3.3V Supply). VREFL is connected to GND. Figure10 illustrates this circuitry.Figure10. FRDM-KL26Z VREFH circuit schematicIf desired, VREFH can use a VDDA independent reference by adding R11 and a Zener diode (D6). R10 (0 Ω resistor) must be removed when implementing this option. Alternatively, VREFH can be attached to an external source through AREF by removing R10 and populating R9 with a 0 Ω resistor.5.10Arduino compatibilityThe I/O headers on the FRDM-KL26Z are arranged to allow compatibility with peripheral boards (known as shields) that connect to Arduino™ and Arduino-compatible microcontroller boards. The outer rows of pins (the even numbered pins) on the headers share the same mechanical spacing and placement as the I/O headers on the Arduino Revision 3 (R3) standard.FRDM-KL26Z hardware descriptionRefer to the FRDM-KL26Z Pinouts spreadsheet for a compatibility chart showing how all the functions of the KL26Z signals on the I/O connectors map to the pin functions available on the Arduino Uno R3.Document Number:FRDMKL26ZUG Rev. 010/2013Information in this document is provided solely to enable system and software implementers to use Freescale products. There are no express or implied copyright licenses granted hereunder to design or fabricate any integrated circuits based on the information in this document.Freescale reserves the right to make changes without further notice to any products herein. Freescale makes no warranty, representation, or guarantee regarding the suitability of its products for any particular purpose, nor does Freescale assume any liability arising out of the application or use of any product or circuit, and specifically disclaims any and all liability, including without limitation consequential or incidental damages. “Typical” parameters that may be provided in Freescale data sheets and/or specifications can and do vary in different applications, and actual performance may vary over time. All operating parameters, including “typicals,” must be validated for each customer application by customer’s technical experts. Freescale does not convey any license under its patent rights nor the rights of others. Freescale sells products pursuant to standard terms and conditions of sale, which can be found at the following address: /SalesTermsandConditions.How to Reach Us:Home Page:Web Support:/supportFreescale, the Freescale logo, and Kinetis are trademarks of FreescaleSemiconductor, Inc., Reg. U.S. Pat. & Tm. Off. ARM is the registered trademark ofARM Limited. ARM Cortex-M0+ is the trademark of ARM Limited. All other product orservice names are the property of their respective owners.© 2013 Freescale Semiconductor, Inc.。
飞思卡尔单片机应用实验指导书

飞思卡尔单片机应用实验指导书机械工程学院机械电子工程教研室实验一飞思卡尔嵌入式实验系统入门一GPIO控制实验一、头验目的:熟悉CodeWarrior集成开发环境及飞思卡尔嵌入式实验开发系统掌握AW60GPIO吉构及控制方法掌握CodeWarrior工程结构及创建汇编工程熟悉汇编指令及应用汇编语言编程方法二、实验内容1.运用CodeWarrior新建工程,进行工程程序编辑、编译、下载、调试2.利用飞思卡尔嵌入式实验开发系统根据实验需要进行硬件连接3.根据连接在PTDH上的两个拨动开关的状态,控制接中PTB口上的八个LED&在以下四种不同状态:八个LE而一灭循环;四个灯交替亮一灭;一个LE9移流水灯;两个LED&移流水灯。
实验接线原理图导线持括点*5V沏门阻挑JJ33JD J3图1-1 I/O 口实验接线图三、实验步骤1 .将飞思卡尔嵌入式实验开发系统实验箱接上电源,写入器 BDMg 头插接入核心卡BD 瞰,US 以接入 PCM USBq 。
2 . PCM 上启动CodeWarrior ,新建工程LED.mcp (注意设置工程保存路径)3 .观察工程文件结构,查看相应文件。
4 .在main.asm 中编辑工程主文件5 .编辑相关子程序6 .编译,如果有错误修改,直至编译通过7 .链接、下载,调试观察 LED 丁现象四、思考题1 . CodeWarrior 建立工程有什么工程框架文件,这些文件的作用?2 .嵌入式开发系统有哪些主要元器件?3 .如果采用模块化设计方法,将系统初始化、V VccPTB 口 PTD0 PTD1 PTD2 PTD3 PTD4 PTD5 PTD6 PTD7PTD 口导线接插点拨码开关 口 GNDLEDT 控制、延时程序等各自形成文件,导线接插点PTB0 PTB1 PTB2 PTB3 PTB4 PTB5 PTB6 PTB7工程应用这些文件时应注意什么?4.上拉电阻和下拉电阻分内置的和外接的,内置的电阻一般只有几K或十几K,外接电阻可以是几M十几Mg至更大。
飞思卡尔半导体 56F801x 系列设备应用笔记说明书

飞思卡尔半导体应用笔记文档号: AN3102第0版, 2005年9月目录©飞思卡尔半导体(中国)有限公司, 2005-2008. 版权所有. 初稿,本手册可能会在未经通知的情况下更新1引言56F801x 系列设备与其它56800E 系列设备相比,有很多不同的特征和改进功能。
本应用笔记将对这些不同功能进行详细介绍,以帮助用户了解更多相关知识。
2一体化RAM56F801x 系列设备采用了与先前56800E 设备不同的存储模型。
该系列设备的RAM 结构体系经过修改后,在程序和数据存储映像图中均可使用,这也使开发人员需要考虑这些修改所带来的影响。
• RAM 是一个单一的存储块,可以出现在程序和数据存储映像图中。
虽然在两个图中的地址不同,但对应的是相同的物理块。
• 为了适应RAM 的一体化功能,飞思卡尔半导体公司的CodeWarrior 修改了使用的存储配置文件。
程序空间和数据空间之间在一体化RAM 中的动态(联接时)分配,请参见应用示例。
1引言. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12一体化RAM. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13时钟. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23.1内部时钟 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33.2外部时钟 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34输入/输出(I/O )引脚的复用. . . . . . . . . . . . . . . . . . . . . . . 45带LIN 从机模式的SCI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66SPI 的输入/输出问题 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76.1主机模式 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76.2从机模式 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77ADC 变动. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77.1独立的并行扫描定时 . . . . . . . . . . . . . . . . . . . . . . . . . . . 77.2定时触发器的ADC 同步输入. . . . . . . . . . . . . . . . . . . . 87.3VREF 的选择 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88定时器的输入/输出 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89PWM 控制 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .109.1传统的PWM 操作 . . . . . . . . . . . . . . . . . . . . . . . . . . . .129.2ADC 控制PWM 输出. . . . . . . . . . . . . . . . . . . . . . . . . .149.3提供PWM 控制的定时器驱动ADC 采样 . . . . . . . . .179.4定时器控制PWM 输出 . . . . . . . . . . . . . . . . . . . . . . . .199.5由外部引脚控制的PWM 输出 . . . . . . . . . . . . . . . . . .229.6带ADC 采样触发的由外部引脚控制的PWM 输出 .2310节能功能. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2411参考资料. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2556F801x 系列设备的特殊功能作者:Les Lewis56F801x 系列设备的特殊功能, 第0版初稿,本手册可能会在未经通知的情况下更新时钟飞思卡尔半导体23时钟图1展示了56F801x 的片内时钟合成(OCCS)模块框图。
飞思卡尔单片机课程设计

飞思卡尔单片机课程设计一、课程目标知识目标:1. 理解飞思卡尔单片机的基本结构、工作原理及功能特点;2. 掌握飞思卡尔单片机的编程语言和开发环境;3. 学会使用飞思卡尔单片机进行简单的电路设计和控制。
技能目标:1. 能够运用所学知识,设计并实现基于飞思卡尔单片机的实际应用项目;2. 培养学生动手操作、调试程序的能力;3. 提高学生团队协作、问题解决的能力。
情感态度价值观目标:1. 培养学生对电子技术、编程的兴趣和热情;2. 培养学生严谨的科学态度,养成良好的实验习惯;3. 增强学生的创新意识,鼓励他们勇于尝试、探索新知。
课程性质:本课程为实践性较强的课程,旨在让学生通过动手实践,掌握飞思卡尔单片机的应用。
学生特点:学生具备一定的电子技术基础知识,对编程有一定了解,但实践经验不足。
教学要求:教师需引导学生主动参与实践,注重启发式教学,关注学生的个体差异,提供针对性的指导。
1. 熟悉飞思卡尔单片机的硬件结构和编程方法;2. 能独立完成简单的飞思卡尔单片机项目设计;3. 具备一定的编程调试能力,能够解决实际应用中的问题;4. 增强团队合作意识,提高沟通与协作能力。
二、教学内容1. 飞思卡尔单片机基础知识:介绍飞思卡尔单片机的硬件结构、工作原理、性能参数等,对应教材第一章内容。
2. 飞思卡尔单片机编程环境:学习飞思卡尔单片机的编程语言和开发工具,如CodeWarrior、Kinetis Design Studio等,对应教材第二章内容。
3. 基本I/O口编程:讲解如何控制飞思卡尔单片机的输入输出口,实现LED 灯、按键等基础控制功能,对应教材第三章内容。
4. 中断与定时器编程:学习中断处理程序编写和定时器使用,掌握时间控制、事件响应等技巧,对应教材第四章内容。
5. 串行通信编程:介绍飞思卡尔单片机串行通信接口的使用,包括UART、SPI、I2C等,对应教材第五章内容。
6. 模拟量与数字量转换:学习ADC、DAC等模块的使用,实现模拟量与数字量的相互转换,对应教材第六章内容。
飞思卡尔QY4II实验系统使用手册

目录第一章实验系统概述 (1)1.1概述 (1)1.2总体说明 (1)第二章MC68HC908QY4概述 (3)2.1MC68HC908QY4MCU的性能概述 (3)2.2内部结构简图 (4)2.3引脚功能 (5)2.4存储空间分配图 (6)2.5中断向量表 (8)第三章QY4II型硬件电路原理 (10)3.1显示部分 (10)3.2键盘输入部分 (11)3.3模拟量输入 (12)3.4模式选择 (12)3.5PWM脉宽输出 (13)3.6JP6串行通信 (13)3.7JP1管脚定义 (14)第四章CODEW ARRIOR使用入门 (15)4.1环境配置 (15)4.2C ODE W ARRIOR安装说明 (15)4.3打开工程 (16)4.4创建项目 (18)4.5编译连接 (22)4.6在线编程 (23)4.7利用V ISUALIZATIONTOOL进行脱机仿真 (30)第五章C语言调用汇编的语法规则 (35)第六章PROCESSOR EXPERT应用 (38)6.1创建工程 (38)6.2编译调试 (47)6.3在线编程 (50)第一章实验系统概述1.1概述天津工业大学FreescaleMCU/DSP研发中心开发的MC68HC908QY4实验系统实现了实验板与CodeWarrior的完美结合,它提供了一个好的学习环境,从而达到快速入门和提高的效果。
该板融合了PE公司的ICS功能,通过按键一次,可以实现上位机和目标板的连接。
QY4本身是16脚的芯片,4KBflash,128字节RAM,具有定时器通道、键盘中断、AD通道等接口,该系统板扩展了4个LED数码管和6个按键,模拟量输入、PWM输出等,功能完善,我们开发的电路板在调试状态13个端口留给用户使用(PTA0被占用),运行状态14个端口均可以给用户使用。
MC68HC908QY4系统可以直接和Codewarrior相连,下载程序,在线单步运行、断点调试、连续运行、修改寄存器(包括PC)和存储单元等特点,可以很方便地进行教学,适于大学本科及大专、高职的学生作为入门教学系统。
飞思卡尔8位单片机实用教程说明书

图书基本信息书名:《飞思卡尔8位单片机实用教程》13位ISBN编号:978712108999210位ISBN编号:7121089998出版时间:2009-6出版社:曾周末、李刚、陈世利、 周鑫玲 电子工业出版社 (2009-06出版)页数:222版权说明:本站所提供下载的PDF图书仅提供预览和简介以及在线试读,请支持正版图书。
更多资源请访问:前言飞思卡尔原是全球领先的半导体公司,为汽车、消费电子、工业控制、网络和无线市场设计并制造嵌入式半导体产品。
飞思卡尔系列单片机由于其低成本和高性能的特点越来越受到用户的青睐。
本书介绍的MC9S08QG8单片机采用高性能、低功耗HCS208飞思卡尔8位微控制器为内核,是一款集成度很高、功能丰富、适用于各种应用的低价位单片机。
本书将给大家介绍它的一些主要功能及特性,包括灵活多样的低功耗模式、3.3V电压下的Flash编程、片内调试仿真器、高速ADC、IC总线、片内比较器等。
本书共12章,深入浅出地从一般单片机的基础知识人手,引出飞思卡尔8位单片机基础知识、最小系统设计,进而有步骤地、详略得当地介绍飞思卡尔8位单片机的寄存器与片内存储器、指令系统与汇编程序设计、中断系统等基本功能,并在之后的章节中,详细而又有针对性地一一介绍了集成在这款单片机内部的其他功能模块,比如定时器和比较器、异步串行通信、SPI、IC、模/数转换等功能模块。
本书还介绍了飞思卡尔单片机与MCS51单片机的区别,学过5l单片机的人会很快掌握其要点。
在本书最后一章里,有针对性地介绍了S08系列单片机c语言编程,并详细介绍了Code Warrior IDE调试软件的使用方法。
本书给出的所有例题都在实验板上运行验证过。
总之,本书力求通过最简洁的语言和表述方式、最通俗易懂的应用举例,向广大读者全面地介绍MC9S080G8单片机的功能及特性,以求能够为大专院校的学生及各相关领域的工作者提供一些帮助。
参加本书编写的还有天津大学精仪学院的薛彬、汤其剑、刘世廷、高雅彪、叶德超、黄邦奎、孙晔等研究生。
飞思卡尔半导体 如何在M68HC08、HCS08和HCS12 微控制器上应用IIC模块 说明书

飞思卡尔半导体文件编号:AN3291 应用笔记第1版,03/2007Specifications and information herein are subject to change without notice. ©Freescale Semiconductor,Inc., 2007. All rights reserved.General Business Information如何在M68HC08、HCS08和HCS12微控制器上应用IIC模块作者: Stanislav Arendarik应用工程师捷克共和国,罗斯诺夫1 简介此应用笔记是如何在飞思卡尔的微控制器上应用IIC模块的一个示例。
IIC模块可以分别在主模式或从模式下使用。
在这种情况下,由于IIC 总线主要用于在微控制器(MCU)和IIC外设之间的通信,因此在主模式时与串行EEPROM进行通信。
IIC总线可以在两个微控制器(MCU)之间直接进行通信,然而SPI总线却更适用于这种应用。
此应用笔记总结了通用IIC总线状态和定义,并提供了如何与串行EEPROM进行通信的示例(24C16和24C512)。
您可以轻松地用另外一个IIC器件取代EEPROM,但是必须改变将其标识为从器件的IIC地址字节。
目录1 简介…………… . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . 12 IIC 总线摘要………….. . . . …. . . . . . . . . . . . . . . . . . . . . . . . . . . . 22.1 IIC总线术语.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22.2 位传输. ………….. . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . 22.3 起始条件和停止条件(START and STOP Conditions)...... . 32.4 总线通信. . ……………………….. . . . . . . . . . . . . . . . . . . . 32.5 控制字节………………………. . . . . . . . . . . . . . . . . . . . .. . . 32.6 地址字节……….... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42.7 应答………… . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . 42.8 读/写格式………………………………......…..…... . . . . . . .. 53 用于微控制器的IIC软件程序. ………. . . . . . . . . . . . . . . . . . . . . . . 53.1 IIC的初始化. … . . . …….. . . . . . . . . .. .. . . . .. .. .. . . . . . . . 63.2 写入功能. . . . . . . . . . . . . . . . . . . . . .. . . . . . .. . . . . . . . . . . 73.3 读取功能 .. . . . . . . . . . . . . . . . . . . . .. . .. . . . . .. . . . . . . . . 93.4 中断应用举例. . . . . . ……………. . . . . . . . . . . .. . . . . . . . . 133.4.1 MCU作为主机.. . . . . . . . . . . .. .. . . . . . . . . . . . . . . 133.4.2 MCU作为从机. . . . . . .. . . . . . . .. . . . . . .. . . . . . . 164 结论. . . ……... . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . .. . . . . . . .. . . 17IIC总线摘要2 IIC 总线摘要IIC总线是基于主机和从机间线与(开漏)连接的双向、两线式总线。
飞思卡尔半导体 MPC560xS系列 32位微控制器 说明书

MPC560xS結構圖INTCJTAGNDILINFlex ADC LCDDSPII2CeMICS200FlexCANSUISMD SSDFlash (ECC)Flash(ECC)SRAM(ECC) EEPROM(仿真)圖形SRAM概述MPC560xS系列是最新一代32位Power Architecture®微控制器(MCU),能滿足汽車 儀錶板應用中的彩色薄膜電晶體(TFT)顯示 屏要求。
平臺架構包括直接驅動TFT顯示屏的 片上顯示控制單元(DCU)。
此外,如果需要 增加存儲空間,系統內存還可以通過片上串行 外設接口(SPI)進行擴展。
MPC560xS系列為您提供經濟高效的入門級儀錶板解決方案, 它能夠擴展您的設計,滿足您的性能需求。
應用• 儀錶板• 中央顯示屏生態系統MPC560xS系列MCU的支持工具同飛思卡爾MPC5500的支持工具類似,因此提供了一個廣泛的成熟工具和軟件廠商網絡。
此外,它還具有一個高性能Nexus 5001調試接口。
2008年下半年將提供開發支持:• 內置CAN、LIN 接口的汽車電子評估板(EVB)• 編譯器• 調試器• JTAG和Nexus 5001接口以下軟件支持將在2008年下半年提供:• 來自第三方的OSEK解決方案• CAN和LIN驅動• AUTOSAR套件Color Indicator Bar/Volume no.32位微控制器MPC560xS系列用于儀錶板的Power Architecture® MCUColor Indicator Bar/Volume no.Freescale 和Freescale 標識是飛思卡爾半導體公司的商標。
所有其他產品或服務的名稱是各自所有者的財產。
Power Architecture 和 字標、Power 和 標識、以及相關標記是.許可的商標和服務標記。
©飛思卡爾半導體公司2009年版權所有。
飞思卡尔智能车竞赛设计方案

飞思卡尔智能车竞赛设计方案清晨的阳光透过窗帘,洒在书桌上那厚厚一摞方案草稿上。
我泡了杯咖啡,打开电脑,准备着手写这个“飞思卡尔智能车竞赛设计方案”。
10年的方案写作经验告诉我,这是一个充满挑战的任务,但也是展示自己才华的舞台。
一、项目背景飞思卡尔智能车竞赛是一场针对大学生的科技竞赛,旨在培养创新精神和实践能力。
参赛队伍需要设计一款智能车,通过传感器、控制器、执行器等部件,使车辆在规定的赛道上自主行驶,完成各种任务。
这场比赛既考验技术,也考验团队协作。
二、设计方案1.车辆整体设计车辆整体设计要兼顾美观、实用和稳定性。
外观上,我们采用流线型设计,减少空气阻力;内部结构紧凑,降低重心,提高稳定性。
车辆尺寸符合比赛规定,确保在赛道上行驶自如。
2.传感器配置(1)激光雷达:用于实时获取车辆周围环境信息,绘制三维地图。
(2)摄像头:用于识别赛道标志、障碍物等。
(3)超声波传感器:用于检测前方障碍物距离,避免碰撞。
(4)红外传感器:用于检测赛道边缘,防止车辆出轨。
3.控制器设计(1)路径规划:根据传感器信息,实时规划车辆行驶路径。
(2)速度控制:根据赛道状况,调整车速,确保稳定行驶。
(3)避障策略:当检测到前方有障碍物时,及时调整行驶方向。
4.执行器设计(1)电机驱动:驱动车辆前进、后退、转向。
(2)舵机:用于调整摄像头角度,获取更多赛道信息。
(3)电磁阀:用于控制车辆制动。
三、团队协作一个优秀的团队是项目成功的关键。
我们团队成员各司其职,密切配合:1.项目经理:负责整体进度把控,协调各方资源。
2.硬件工程师:负责车辆整体设计和传感器、执行器选型。
3.软件工程师:负责控制器设计和程序编写。
4.测试工程师:负责车辆调试和性能测试。
四、项目实施1.初期准备:收集比赛相关信息,了解赛道状况,确定设计方案。
2.设计阶段:根据设计方案,绘制图纸,选型采购。
3.制作阶段:组装车辆,调试传感器、控制器和执行器。
4.测试阶段:进行多次试验,优化控制策略,提高车辆性能。
飞思卡尔半导体公司MC33797四通道点火驱动器IC技术数据说明书

飞思卡尔半导体公司 文档编号:MC33797技术数据第6.0版,2014年2月©飞思卡尔半导体公司,2006 - 2014。
保留所有权利。
四通道点火驱动器IC四通道点火驱动器IC 是一款用于汽车安全气囊模块的完整点火诊断和部署接口。
拥有全面的诊断和系统控制功能,可实现故障安全操作。
该器件包含一个兼容串行外设接口(SPI)的8位接口,支持微处理器控制。
该器件可用于标准的四通道点火驱动器IC ,或用于高边和低边点火驱动器位于不同点火驱动器IC 时的交叉耦合状态。
高边和低边的输出驱动器均受到保护,不会受对电池或对地临时短路的影响。
限流阈值由外部电阻设置。
该器件采用SMARTMOS 技术。
特性 • 四通道高边和低边2.0 A FET 开关 • 外部可调的FET 限流功能 • 可调限流范围:0.8至2.0 A • 通过与SPI 通信实现单个通道限流检测以及定时持续时间测量 • 用于诊断和FET 开关激活的8位SPI • 高边安全传感器状态诊断 • 点火装置的电阻和电压诊断 • 点火驱动器IC 可用于交叉耦合驱动器点火应用(将高边和低边FET 开关置于不同的点火驱动器IC 上)EW 后缀(无铅) 98ARH99137A 32引脚SOICW应用 • 汽车安全气囊展开 • 安全带自动锁止• 计算机控制模型火箭点火器 • 远程发射烟花焰火表演• 采矿和建筑施工中计算机控制的雷管点火 •军用或警用武器系统图1. 33797简化应用电路图337972 模拟集成电路器件数据飞思卡尔半导体公司1 可订购部件表1. 可订购部件版本注1. 要订购以带/卷形式提供的零件,请在部件编号后面添加R2后缀。
内部功能框图33797模拟集成电路器件数据飞思卡尔半导体公司3内部功能框图图2.33797简化内部功能框图引脚连接337974 模拟集成电路器件数据飞思卡尔半导体公司引脚连接图3. 引脚功能说明表2. 引脚功能说明引脚连接33797模拟集成电路器件数据飞思卡尔半导体公司5表2. 引脚功能说明(续)电气特性最大额定值337976 模拟集成电路器件数据飞思卡尔半导体公司电气特性最大额定值表3. 最大额定值所有电压都是相对于地而言,除非另有说明。
飞思卡尔项目书

飞思卡尔智能车比赛项目参赛时间:2011.7.16 — 2011.7.20赛前准备时间:2010.7 ---2011.7飞思卡尔智能车比赛简介:为加强大学生实践、创新能力和团队精神的培养,促进高等教育教学改革,受教育部高等教育司委托(教高司函[2005]201号文,附件1),由教育部高等学校自动化专业教学指导分委员会(以下简称自动化分教指委)主办全国大学生智能汽车竞赛。
该竞赛是以智能汽车为研究对象的创意性科技竞赛,是面向全国大学生的一种具有探索性工程实践活动,是教育部倡导的大学生科技竞赛之一。
该竞赛以“立足培养,重在参与,鼓励探索,追求卓越”为指导思想,旨在促进高等学校素质教育,培养大学生的综合知识运用能力、基本工程实践能力和创新意识,激发大学生从事科学研究与探索的兴趣和潜能,倡导理论联系实际、求真务实的学风和团队协作的人文精神,为优秀人才的脱颖而出创造条件。
该竞赛由竞赛秘书处设计、规范标准硬软件技术平台,竞赛过程包括理论设计、实际制作、整车调试、现场比赛等环节,要求学生组成团队,协同工作,初步体会一个工程性的研究开发项目从设计到实现的全过程。
该竞赛融科学性、趣味性和观赏性为一体,是以迅猛发展、前景广阔的汽车电子为背景,涵盖自动控制、模式识别、传感技术、电子、电气、计算机、机械与汽车等多学科专业的创意性比赛。
该竞赛规则透明,评价标准客观,坚持公开、公平、公正的原则,力求向健康、普及、持续的方向发展。
该竞赛以飞思卡尔半导体公司为协办方,得到了教育部相关领导、飞思卡尔公司领导与各高校师生的高度评价,已发展成全国30个省市自治区近300所高校广泛参与的全国大学生智能汽车竞赛。
2008年起被教育部批准列入国家教学质量与教学改革工程资助项目中科技人文竞赛之一(教高函[2007]30号文)。
全国大学生智能汽车竞赛原则上由全国有自动化专业的高等学校(包括港、澳地区的高校)参赛。
竞赛首先在各个分赛区进行报名、预赛,各分赛区的优胜队将参加全国总决赛。
飞思卡尔

飞思卡尔光电组计划书
本组分4大模块:MC9S12单片机模块,驱动模块,传感器模块,机械设计。
单片机模块由刘澈负责:6大模块,引脚定义,IDE的用法及调试。
驱动模块由姜森负责:电机驱动(MC33886,舵机及直流电机),电源管理
传感器模块由金铭负责:光电传感器原理,芯片型号、传感器布局
机械测速模块由苑庆爽负责:驱动布局,测速及信号反馈。
时间安排:
(1)寒假期间根据分工,第一,查阅资料对自己的模块有个初步认识,第二,在初步认识的基础上,对自己的模块子模块做进一步的学习。
第三,运用自己所学自己独立做一些小的东西来增加熟练程度。
(2)假期回来根据每个人所学再作进一步的商讨,做出一份详细计划,协调各个模块及各个模块的布局。
然后根据模块一起商讨算法。
(3)三月中始焊接。
(4)四月调试。
(5五月交成品。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
飞思卡尔智能车比赛项目
参赛时间:2011.7.16 — 2011.7.20
赛前准备时间:2010.7 ---2011.7
飞思卡尔智能车比赛简介:
为加强大学生实践、创新能力和团队精神的培养,促进高等教育教学改革,受教育部高等教育司委托(教高司函[2005]201号文,附件1),由教育部高等学校自动化专业教学指导分委员会(以下简称自动化分教指委)主办全国大学生智能汽车竞赛。
该竞赛是以智能汽车为研究对象的创意性科技竞赛,是面向全国大学生的一种具有探索性工程实践活动,是教育部倡导的大学生科技竞赛之一。
该竞赛以“立足培养,重在参与,鼓励探索,追求卓越”为指导思想,旨在促进高等学校素质教育,培养大学生的综合知识运用能力、基本工程实践能力和创新意识,激发大学生从事科学研究与探索的兴趣和潜能,倡导理论联系实际、求真务实的学风和团队协作的人文精神,为优秀人才的脱颖而出创造条件。
该竞赛由竞赛秘书处设计、规范标准硬软件技术平台,竞赛过程包括理论设计、实际制作、整车调试、现场比赛等环节,要求学生组成团队,协同工作,初步体会一个工程性的研究开发项目从设计到实现的全过程。
该竞赛融科学性、趣味性和观赏性为一体,是以迅猛发展、前景广阔的汽车电子为背景,涵盖自动控制、模式识别、传感技术、电子、电气、计算机、机械与汽车等多学科专业的创意性比赛。
该竞赛规则透明,评价标准客观,坚持公开、公平、公正的原则,力求向健康、普及、持续的方向发展。
该竞赛以飞思卡尔半导体公司为协办方,得到了教育部相关领导、飞思卡尔公司领导与各高校师生的高度评价,已发展成全国30个省市自治区近300所高校广泛参与的全国大学生智能汽车竞赛。
2008年起被教育部批准列入国家教学质量与教学改革工程资助项目中科技人文竞赛之一(教高函[2007]30号文)。
全国大学生智能汽车竞赛原则上由全国有自动化专业的高等学校(包括港、澳地区的高校)参赛。
竞赛首先在各个分赛区进行报名、预赛,各分赛区的优胜队将参加全国总决赛。
每届比赛根据参赛队伍和队员情况,分别设立光电组、摄像头组、电磁组、创意组等多个赛题组别。
每个学校可以根据竞赛规则选报不同组别的参赛队伍。
全国大学生智能汽车竞赛组织运行模式贯彻“政府倡导、专家主办、学生主体、社会参与”的16字方针,充分调动各方面参与的积极性。
全国大学生智能汽车竞赛一般在每年的10月份公布次年竞赛的题目和组织方式,并开始接受报名,次年的3月份进行相关技术培训,7月份进行分赛区竞赛,8月份进行全国总决赛。
飞思卡尔智能车比赛技术要求:
全国大学生智能汽车竞赛是以飞思卡尔公司的16位单片机MC9S12DG128B为核心控制器,利用视频传感器或红外传感器采集路况信息,并进行相应的算法处理以达到路径识别的目的,通过算法策略来控制模型车高速稳定地在跑道上行驶。
主电机的驱动主要采用飞思卡尔的MC33886直流电动机驱动驱动芯片,具有电流大,负载能力强,发热量小的优点。
舵机需要的是6V电压,由于电池电压只有7.2V,普通的6V 稳压芯片需要较大的压差才能实现平稳的输出,所以选用LM1117低压差可调稳压芯片。
控制电路的5V电源使用LM2940,此芯片具有电流大压差小的特别,非常适合用于本智能车,为系统的各功能模块提供了稳定、可靠的工作电源,为智能车的稳定工作提供了有力的保证。
软件系统部分主要包括以下与路径识别系统相关模块的算法:
(1)CCD视频传感器数据采集模块;
(2)图像处理和路径识别模块;
(3)用PID算法实现的速度调节模块;
(4)舵机转向控制模块;
(5)键盘显示模块;
(6)调节车模各个参数的人际交流模块。
飞思卡尔智能车比赛研发周期:一年
飞思卡尔智能车比赛阶段标注:
2010.7 -- 2010.8 报名及初步了解
2010.8 -- 2010.10 知识补充
2010.10 – 2011.5 制作阶段
2011.6 – 2011.7 最后冲刺阶段。