Kinetisマイクロコントローラ・ナレッジ・ベース

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Kinetis Microcontrollers Knowledge Base

ディスカッション

ソート順:
There is a popular WIFI platform called “GoKit” in China. This testing kit can be use to do some customized application. Not only WIFI communication, kit also support other functions. You can find interfaces listed as below. GoKit Interfaces: I try to use FRDM-KL02 to communicate with this kit to do a WIFI communication application. Board connection as below. This platform has two running mode. One is AirLink mode, and another is normal running mode. AirLink mode is used to WIFI communication or pair. Go to AirLink mode steps: Power on FRDM-KL02 Long press key1 to reset WIFI module. Wait until RED led on. Short press Key2 to go into configuration mode, wait until RED led flash on WIFI module. Open demo APP, select “adding device”, input SSID password. Waiting for configuration finish. Command Format HOF: 2bytes, value 0xFFFF Length: 2bytes Cmd:1byte SN:1byte Flags:2bytes DATA: Xbytes Checksum:1byte WIFI acquire device information MCU inform WIFI into configure mode MCU reset WIFI WIFI inform MCU status WIFI ask for reset Illegal command For detail code, I will post another thread for your reference.
記事全体を表示
       FreeRTOS is a high quality, risk free, supported, free RTOS, and now it is already successful to porting more 35 architectures. As a popular RTOS, more and more embedded engineers considering it for their next project.        Next, I’m going to show you the steps of creating a MAPS-K22 FreeRTOS demo by IAR and I’ve also attached a template demo and FreeRTOS source code (Fig 1). Fig 1 FreeRTOS source code directories and files     1. Copy the FreeRTOS source code to ~\MAPSK22_SC\Libraries     2. Create FreeRTOS_Source group in the workspace, then add the source code (Fig 2) Fig 2 3. Add an application code in the main.c This is a very simple configuration. It creates two tasks, one software timer, and also uses a button interrupt. The two tasks communicate via a queue. The receiving task toggles the LED3 each time a value is received. Pressing user button K5 generates an interrupt. The interrupt service routine for which resets a software timer, then turn the LED1 on. The software timer has a five second period. The timer will expire when K5 has not been pressed again for a full five seconds. The callback function that executes when the timer expires simply turn the LED1 on again. Therefore, pressing K5 will turn the LED1 on, and the LED1 will remain on until a full five seconds pass without the button being pressed again. 4. Modify the Include Directories 5. Run the FreeRTOS demo After build the modified application code, then run it on MAPS-K22 board (Fig 3) Fig 3 IMPORTANT! Cortex-M FreeRTOS port specific configuration Configuration items specific to this demo are contained in ~\MAPSK22_SC\Libraries\RTOS\config\K22F51212\iar. The constants defined in this file can be edited to suit your application. In particular configTICK_RATE_HZ This sets the frequency of the RTOS tick interrupt. The supplied value of 1000Hz is useful for testing the RTOS kernel functionality but is faster than most applications require. Lowering this value will improve efficiency. configKERNEL_INTERRUPT_PRIORITY and configMAX_SYSCALL_INTERRUPT_PRIORITY See the RTOS kernel configuration documentation for full information on these configuration constants. configLIBRARY_LOWEST_INTERRUPT_PRIORITY and configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY These are equivalents to configKERNEL_INTERRUPT_PRIORITY and configMAX_SYSCALL_INTERRUPT_PRIORITY, but presented in a form suitable for passing into the Freescale NVIC_SetPriority() library function. The NVIC_SetPriority() function expects priorities to be in the range of 0 to 15 - 0 being the highest priority and 15 being the lowest priority.
記事全体を表示
1 Abstract Stepper motor can be controlled by the electrical pulse signal with the open loop system, it use the electrical pulse signal realize the angular movement or linear movement.  The speed and position of the stepper motor is determined by the pulse frequent and the pulse number. Stepper motor can be used in the low speed area application, with higher work efficiency and low noise. KE02 is the 5V kinetis E series MCU, it is based on ARM Cortex M0+ core, KE series are designed to maintain high robustness for complex electrical noise environment and high reliability application. For these advantages, KE02 is fit the Stepper motor control application. This document is mainly about how use the KE02 realize the Stepper motor speed, step and direction control. It can use the UART in the PC to control the Stepper motor speed. The following picture is the control diagram.                                                                              Fig.1 2. Motor control parameter calculation      Just as Fig.1 shows, KE02 should control the EN, DIR, PWM signal to the motor driver, then realize the stepper motor control. EN is the motor driver enable signal, 0 is enable, 1 is disable; DIR is the stepper motor direction control, 0, clockwise, 1 anticlockwise; PWM is the pulse signal to control the step and speed for the stepper motor.       Stepper motor is 1.8’, it means a round have 360’/1.8’= 200 steps. But because the Motor driver have the divider, it is 32, so one stepper motor round should have 200*32 = 6400 steps.       KE02 system, it use the external 10Mhz crystal, and configure both core and bus frequent to 20Mhz,  it use FTM0 module as the motor pulse generate module, bus clock with 32 prescale used as the FTM0 clock source, choose up counter. If need to change the motor speed and control step, just control the FTM PWM frequent and PWM counter. For Stepper motor, one FTM period means one motor step. From the reference manual of KE02, we get that, the FTM period in up counting mode is: (MOD-CNTIN+1)*period of the FTM counter clock, if want to change the frequent of motor, just calculate the MOD of FTM is ok, then count the number of the FTM cycle, now assume CNTIN =0, then: Tftm= (32/20Mhz)*(MOD+1) From the Stepper Motor and it’s driver, we get that one step time is : Tmstep= 60/(V*6400) V is the speed of Motor, the unit is round/minute. Because Tftm=Tmstep, then we know: MOD= (60/(V*6400))*(20Mhz/32)-1                     (F1) In this document, we calculate the speed of 150 round/minute, 110 round/minute, 80 round/minute, 50 round/minute and 0.1 round/minute, according to (F1), we can get the MOD for each speed as the following: 150 round/minute   MOD=38 110 round/minute   MOD=52 80 round/minute     MOD=72 50 round/minute     MOD=116 0.1 round/minute    MOD=58592 If each speed need to do 10 Stepper motor round, then just control the speed counter number to: 10*6400=64000. 3. MCU pin assignment PTF0 : DIR PTF1 : EN PTA0 : PWM PTC6 : UART1_RX PTC7 : UART1_TX 4. code writing (1)FTM initial code void STEEPMOTOR_PWM_Init(uint16 MODdata) {                    SIM_SCGC |= SIM_SCGC_FTM0_MASK;                 FTM0_SC = 0;                 FTM0_C0SC = 0 ;                 FTM0_C0SC = FTM_CnSC_MSB_MASK |FTM_CnSC_ELSA_MASK ;                 FTM0_C0V = 0;                 FTM0_C0V = MODdata>>1;                 FTM0_MOD=MODdata;                 FTM0_SC |=FTM_SC_CLKS(1) | FTM_SC_PS(5) | FTM_SC_TOIE_MASK                 enable_irq(17); //enable interrupt } MODdata can choose the different Stepper motor speed, eg, 150 round/minute, MODdata is 38. (2) interrupt service function void FTM0_IRQHandler(void) {                                 FTM0_SC  &= ~FTM_SC_TOF_MASK;//clear the TOF flag. roundcount++;                 if(roundcount >= 64000) {FTM0_C0SC = 0x00; FTM0_SC &= ~(FTM_SC_TOIE_MASK);} } It can used for the step counter, and when reach the 10round, then stop the motor( stop the FTM output). (3)Speed choose with UART input void Motor_Speed_GPIO_CTRL_30round(void) {                 char motormode=0;                 uint32 COMPDATA=0;                                 printf("\n 1 for 150 round/minute\n\r");                 printf("\n 2 for 110 round/minute\n\r");                 printf("\n 3 for 80 round/minute\n\r");                    printf("\n 4 for 50 round/minute\n\r");                    printf("\n 5 for 0.1 round/minute\n\r");                 motormode = UART_getchar(PC_TERM_PORT);                                     switch(motormode)                                 {                                    case '1':                                                       STEEPMOTOR_PWM_Init(38);//150 round/minute                                                         break;                                   case '2':                                                       STEEPMOTOR_PWM_Init(52);//110 round/minute                                                         break;                                   case '3':                                                                       STEEPMOTOR_PWM_Init(72);//80 round/minute                                                          break;                                   case '4':                                                                       STEEPMOTOR_PWM_Init(116);//50 round/minute                                                         break;                                   case '5':                                                                       STEEPMOTOR_PWM_Init(58592);//0.1 round/minute                                                         break;                                                                                default: break;                                 }                                 while( roundcount < 64000 ) {} //10 round                                 Disable_PWM;                                 printf("\n %c 10round PWM is finished ", motormode);                                 roundcount=0; } 5 DEMO About the test code, please find it from the attachment.
記事全体を表示
Revise History: Version 23: NXP kinetis bootloader GUI upgrade from v1.0 to v1.1: added 04 extended linear address record  and 02 sector address record processing for hex format. This article describes how to do in-system reprogramming of Kinetis devices using standard communication media such as SCI. Most of the codes are written in C so that make it easy to migrate to other MCUs. The solution has been already adopted by customers. The pdf document is based on FRDM-KL26 demo board and Codewarrior 10.6.  The bootloader and user application source codes are provided. GUI and video show are also provided. Now the bootloader source code is ported to KDS3.0, Keil5.15 and IAR7.40 which are also enclosed in the SW package. Customer can make their own bootloader applications based on them. The application can be used to upgrade single target board and multi boards connected through networks such as RS485. The bootloader application checks the availability of the nodes between the input address range, and upgrades firmware nodes one by one automatically. ​ Key features of the bootloader: Able to update (or just verify) either single or multiple devices in a network. Application code and bootloader code are in separated projects, convenient for mass production and firmware upgrading. Bootloader code size is small, only around 2K, which reduces the requirement of on chip memory resources. Source code available, easy for reading and migrating. GUI supports S19,HEX and BIN format burning images. For more information, please see attached document and code. The attached demo code is for KL26 which is Cortex - M0+ core. For Cortex-M4 core demo, refer this url: https://community.freescale.com/docs/DOC-328365 User can also download the document and source code from Github: https://github.com/jenniezhjun/Kinetis-Bootloader.git Thanks for the great support from Chaohui Guo and his team. NOTE: The bootloader and GUI code are all open source, users can revise them based on your own requirement. Enjoy Bootloader programming 🙂
記事全体を表示
This demo is about driving TFT LCD by FlexBus module on MAPS-K22 board.       MAPS-K22 brief description: High performance Freescale ARM Cortex™ M4 SoC MK22FN512VLL12​ with 120MHz core clock, 512KB Flash and 128K RAM. Support Graphic LCD by Flexbus interface. Power supply from Micro USB 5V. Support ISO7816 smart card by UART interface. Support connector for Peripheral, Application and Socket MAPS board. SDK 1.0 Software release FlexBus Overview       The FlexBus module is a hardware module that: Provides memory expansion and provides connection to external peripherals with a parallel bus Can be directly connected to the following asynchronous or synchronous slave-only devices with little or no additional circuitry: External ROMs Flash memories Programmable logic devices Other simple target (slave) devices Block diagram Pin functions Pins allocation Demo illustration       After run the demo, the TFT LCD will display the Freescale logo as below, and I’ve also attached the demo. Welcome to download it.
記事全体を表示
Hello Kinetis community. Attached there is a guide on how to modify an existing KDS project to be loaded using the KBOOT Flash Resident bootloader. Basically it explains 2 procedures: 1- Manipulating linker file to move application and vectors. 2- Adding data for the Bootloader Configuration Area (BCA). I am also including 3 adapted KDS v3.0.0 example projects ready to be used with KBOOT Flash Resident bootloader in a FRDM-K22F: - Baremetal project. - KSDK project. - KSDK project with Processor Expert support. The application simply toggles the red, green and blue LEDs sequentially. I hope you find the document and projects useful! Regards! Jorge Gonzalez
記事全体を表示
Basic baremetal example to use I2C registers configuration. Original code obtained from TWR-K64F, usable on FRDM-K64F with adjustment. I hope it's useful.
記事全体を表示
This document explains a potential issue where interrupts appear to be disabled after enterring debug mode. This is as a result of the NMI being active when debug is enabled.
記事全体を表示
FFT presentation for metering customers, targeted especially for KM3x / KM3x_256 devices. It briefly describes: How to Use it, and Why to Use it.
記事全体を表示
Kinetis KV10 chip is the entry point of the V Series product, which are designed for a wide range of BLDC, PMSM and ACIM motor control and digital power conversion applications. KV10 is using ARM Cortex-M0+ core, the core frequency could up to 75MHz. And KV10 provides various feature powerful modules, such as ADC modules (2x 16-bit ADCs with two capture and hold circuits and up to 1.2 MS/s samples rate in 12-bit mode — simultaneous measurement of current and voltage phase, reduced jitter on input values improving system accuracy 12-bit mode) and DMA modules (4-channel DMA — reduced CPU loading for improved application performance). The demo is using PDB hardware trigger two ADC modules conversion (12-bit single-ended mode) at the same time; the two ADC modules will trigger each related DMA channels to transfer ADC result to ADC buffer located at SRAM (start from 0x2000_0000) when finish each conversion. The ADC DMA channel 0 will link to trigger DMA channel 2 to transfer ADC result from ADC result buffer to SPI FIFO. When DMA channel 2 transfer done, in related interrupt service routine will software trigger PDB to start the next round of ADC conversion. Below is the processing chart: For the customer requires to transfer 9 ADC conversion results out (5 of ADC0 and 4 of ADC1) , the ADC buffer need interleaved storage result from two ADC modules. Below diagram shows the detailed info: Below is the test result and test environment. It will take almost 15.4us to get and transfer all 9 12-bit ADC conversion results. The demo code is attached. The project is based on TWR-KV10Z32 Sample Code Package could be downloaded from here. Wish it helps.
記事全体を表示
The installation file containing MKM34Z256 training examples programmed using Kinetis-M bare metal drivers and compiled using IAR EWARM 7.40.1. These examples explain programming steps for GPIO, Low Power Timer, Sigma Delta ADC, Memory Math Arithmetic Unit, and LCD on-chip peripherals. In addition, you will learn how to create simple FreeRTOS and 1-phase power meter applications. All examples including their handouts will be installed on your PC in c:\Freescale\KM34Z75_EXAMPLES subfolder. For more information about each example, please refer to its handout.
記事全体を表示
For Jorge_Gonzalez Subject: MKE04 interrupt latency in Kinetis microcontrollers This is the code I was using to measure interrupt latency. David Hollinrake
記事全体を表示
最近在论坛、QQ群里好多人都在讨论低功耗设计,想到之前遇到的一个客户也有这方面的一个要求,顺着他的想法做了一个在低功耗模式下使用ADC的例子。客户要做的是一个恒温控制,在设定温度范围内让MCU进入休眠状态,只有在超过温度范围后才唤醒MCU进行温度调节。话不多说,让我们开始例程介绍。 运行平台: FRDM-25Z IARv7.3 在KL25_SC代码包中platinum工程上修改 Low Power Mode 简介 飞思卡尔Kinetis系列MCU基于90纳米TFS技术,使得MCU在低功耗模式下,拥有良好的性能和功耗表现,KL系列更是被评为业内最低功耗的MCU。KL25Z 功耗模式总共有 11 种,分别是:Run、VLPR、Wait、VLPW、Stop、VLPS、LLS、VLLS3、VLLS2、VLLS1、VLLS0,能够满足客户对MCU各种低功耗的配置要求,在深度睡眠模式下智能外设能够处理相应数据而不需要唤醒内核。    图1 在本设计中需要在低功耗模式下监控温度,热电偶的电信号需要用到ADC进行采样,查手册可知ADC能够运行的最低功耗模式是VLPS模式。VLPS模式下大部分外设仍然可以使用,但需要注意的是在VLPS模式下总线时钟是禁止的,因此在进入VLPS模式前应该将ADC的时钟设为ADACK,不然它进入VLPS模式后就嗝屁了。VLPS模式下只能采用硬件触发来触发ADC采样,本例采用的是LPMR定时器来触发ADC采样。VLPS模式下可以采用中断唤醒方式,本例采用ADC中断唤醒。当然也可以采用异步DMA通道来搬运ADC转换结果,搬运完成后自动回到VLPS模式下,感兴趣的话也可以试一下这种方式哈。   图2 代码介绍:    int main (void) {      #ifdef CMSIS  // If we are conforming to CMSIS, we need to call start here     start(); #endif          lptmr_init(1000,LPTMR_USE_LPOCLK);   //trigger ADC per 1000ms     // 初始化代码中设置LPO作为lptmr的时钟源,保证lptmr在VLPS下能够正常工作;     init_ADC16();                                                                                          //初始化ADC,设置ADC硬件触发源为lptmr,使能ADC范围比较模式,即当转换结果小于C1V,大于C2V时保存结果;     enable_irq(ADC0_irq_no);                                                                      //在进入低功耗模式前使能ADC中断。     printf("Enter VLPS mode...\r\n");     clockMonitor(OFF);     enter_vlps();     while(1)   {                  if(flag_wakeup == 1)           {             flag_wakeup = 0;             ADC0_SC2 &= ~ADC_SC2_ACFE_MASK;              disable_irq(ADC0_irq_no);                                                              //退出后,为调节温度需关闭范围比较模式,同时关闭ADC中断,采用查询模式;             printf("Wake up from VLPS..\n");             printf("adcresult = %d\n",adcresult);           }                              if((ADC0_SC1(0) & ADC_SC1_COCO_MASK) == ADC_SC1_COCO_MASK)     //查询转换结果           {             adcresult = ADC0_R(0);             printf("wake up adcresult = %d\n",adcresult);             if((adcresult>= 4000) && (adcresult<= 5000))                                   //当调节到ADC结果再次进入调节范围时,准备进入低功耗模式;             {               ADC0_SC2 |= ADC_SC2_ACFE_MASK;                                         //为实现监控,重新使能范围比较模式和ADC中断。               enable_irq(ADC0_irq_no);               printf("Enter VLPS mode...\n");               clockMonitor(OFF);               enter_vlps();             }           }              } }        实验结果:      设置比较值为4000~5000,打印结果如下: 图3       好了,就这些了,第一次写技术文章,很浅显的东西说了一大堆,比较乱,望批评指正哈。       附件为参考代码。
記事全体を表示
   CodeWarrior v10.6 and KDS are integrated development tools which are based on Eclipse, these two IDEs provide easy way to build project when using the GUI, but some engineers still want to build their projects from command line to do automated builds. This document provides examples on how to do it! Build project in CodeWarrior from command line: For a CW v10.6 created project, CW provides the “Make” tool and can also generate the needed “MakeFile” to build this project out of eclipse GUI. The below are the steps: Create and new project “k22_makefile” in CW v10.6, you will see there are two build configurations: RAM & FLASH Launch “cmd prompt” in Windows and go to “eclipse” folder of CW installation Now, you can generate the makefile for configuration FLASH by executing the below command ecd.exe –generateMakefiles –project “C:\workspace_cmd\k22_makefile” –config FLASH Now, checking the “FLASH” subfolder in project location, you will see “makefile” is generated. 4.To use “make” tool convenient, we can define an environment variable pointing to {CW}\gnu\bin where “make” is located. See command as below: 5. Go to the configuration folder “FLASH” where the project’s makefiles are located and run the follow commands to build the project. %MCU_BIN%\make.exe PS: to get more information of make and ecd, please just run the below command: Ecd.exe –help Make.exe –help Build project in KDS from command line: Compare with CodeWarrior, it is much easier to build an application in command mode. KDS provides a command “eclipse.exe” with which you can build a project with only two steps. In this example, I have created an application with name “cmd_ke02”, and the workspace path is “C:\wks_kdscmd”. To build the application in cmd, please first launch command mode in Windows system and then go to {KDS}\eclipse. Then, you need import the application into current workspace in the below command: eclipsec.exe -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data "C:\wks_kdscmd" -import "C:\wks_kdscmd\cmd_ke02" then, build the project with the below command: eclipsec.exe -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data "C:\wks_kdscmd" -build "cmd_ke02" For more details of building project from command line in KDS, please refer: http://mcuoneclipse.com/2014/09/12/building-projects-with-eclipse-from-the-command-line/
記事全体を表示
Project USB: Connecting USB to CAN with K20   In this project, the internal CAN Controller of the K20 is used to monitor the CAN bus. The connection to the PC is realized by the internal USB Controller. The USB stack is implemented as HID device especially for the K20.   The software runs on a self made hardware board. The connection to CAN is visualized with a Qt program, running on every Win7 PC.   Result: K20_CAN2USB.zip Original Attachment has been moved to: K20_CAN2USB.zip
記事全体を表示
There with phase shifting when using two different FTM modules to output PWM signals. Although the two FTM modules using the same clock source (bus clock), there still exists the phase shifting status. Please check attached video about phase shifting. FTM Global Time Base(GTB) introduction The global time base (GTB) is a FTM function that allows the synchronization of multiple FTM modules on a chip. The following figure shows an example of the GTB feature used to synchronize two FTM modules. In this case, the FTM A and B channels can behave as if just one FTM module was used, that is, a global time base. K65’s FTM0 provides the only source for the FTM global time base. The other FTM modules can share the time base as shown in the following figure: The code description:    // Configure ftm params with frequency 2MHz for CLK        ftm_pwm_param_t ftmParamCLK = {             .mode                   = kFtmEdgeAlignedPWM,   //PWM mode             .edgeMode               = kFtmLowTrue,           //PWM Low-true pulses (clear Output on match-on)             .uFrequencyHZ           = 200000u,         //2MHz clock frequency             .uDutyCyclePercent      = 50,                //Duty cycle 50%             .uFirstEdgeDelayPercent = 0,                        };    //using FTM0 & FTM3 GTB feature    FTM_HAL_SetClockSource (FTM0, kClock_source_FTM_None);   //disable FTM0 clock source    FTM_HAL_SetClockSource (FTM3, kClock_source_FTM_None);   //disable FTM3 clock source      FTM_HAL_SetGlobalTimeBaseCmd(FTM0, true);   //enable FTM0 GTBEEN    FTM_HAL_SetBdmMode(FTM0, kFtmBdmMode_11);   //enable FTM0 BDMMODE    FTM_HAL_SetGlobalTimeBaseCmd(FTM3, true);   //enable FTM3 GTBEEN    FTM_HAL_SetBdmMode(FTM3, kFtmBdmMode_11);   //enable FTM3 BDMMODE        FTM_HAL_SetClockSource (FTM0, kClock_source_FTM_SystemClk);   //disable FTM0 clock source    FTM_HAL_SetClockSource (FTM3, kClock_source_FTM_SystemClk);   //disable FTM3 clock source      FTM_HAL_SetCounter(FTM0, 0U);        //clear TFM0 counter value to 0    FTM_HAL_SetCounter(FTM3, 0U);        //clear FTM3 counter value to 0      FTM_HAL_SetGlobalTimeBaseOutputCmd(FTM0, true);      //enale FTM0 GTBEOUT Please check attached video about after using GTB feature, the FTM0_CH4 and FTM3_CH1 PWM output signals. How to output two PWM output signals at one FTM module with KSDK? The two PWM output signal will provides the same clock frequency with different duty cycle. The two PWM output signal need use the same PWM mode. Please check below code to enable K65’s FTM0 module output two PWM signals. // Configure ftm params with frequency 2MHz for CLK        ftm_pwm_param_t ftmParamCLK = {             .mode                   = kFtmEdgeAlignedPWM,   //PWM mode             .edgeMode               = kFtmLowTrue,           //PWM Low-true pulses (clear Output on match-on)             .uFrequencyHZ           = 200000u,         //2MHz clock frequency             .uDutyCyclePercent      = 50,                //Duty cycle 50%             .uFirstEdgeDelayPercent = 0,                        }; // Configure ftm params with frequency 2MHz for CLK                ftm_pwm_param_t ftmParamSH =         {              .mode                   = kFtmEdgeAlignedPWM,   //PWM mode              .edgeMode               = kFtmLowTrue,   //PWM Low-true pulses (clear Output on match-on)              .uFrequencyHZ           = 200000u,        //2MHz clock frequency              .uDutyCyclePercent      = 75,     //Duty cycle 75%              .uFirstEdgeDelayPercent = 0,         };     // Initialize FTM module,     // configure for software trigger.     memset(&ftmInfo, 0, sizeof(ftmInfo));     ftmInfo.syncMethod = kFtmUseSoftwareTrig;  //Using software trigger PWM synchronization     FTM_DRV_Init(BOARD_FTM_INSTANCE, &ftmInfo);  //FTM0 initialization     FTM_DRV_SetClock(BOARD_FTM_INSTANCE, kClock_source_FTM_SystemClk, kFtmDividedBy1); //Enable FTM0 counter clock     FTM_DRV_PwmStart(BOARD_FTM_INSTANCE, &ftmParamCLK, BOARD_FTM_CHANNEL); //Enable PWM output at FTM0_CH4     FTM_HAL_SetClockSource(FTM0, kClock_source_FTM_None); //Disable FTM0 counter clock     FTM_DRV_PwmStart(BOARD_FTM_INSTANCE, &ftmParamSH, BOARD_FTM_CHANNEL5);   //Enable PWM output at FTM0_CH5 The tested code also be attached, please using it with KSDK V1.2 software. Wish it helps.
記事全体を表示
Hi team :      I would like to share an experience to you . Any comments would be welcome .      The RTC 32.7668KHz clock can only be sourced from an external crystal that is challenged of some space restricted case . The internal reference clock will be required to support RTC at this moment . Of cause , the IRC accuracy maybe not compete with external crystal , but in this case space is the major concern . However , Kinetis RTC not support clock sourced from IRC . We make a workaround to enable RTC reference to IRC . The detail please refer to attachment . The sample code is build with KDS V3.0 for FRDM-K64F . Best regards, David
記事全体を表示
Simple guide to setting up a PIT to create a 1 second reccuring interrupt that toggles an LED without the use of processor expert.
記事全体を表示
飞思卡尔拥有成套的电机控制处理器产品、强大的工具和专家支持,为大量应用提供高性价比且节能的电机控制解决方案,您可以在飞思卡尔官网电机控制主页上找到相应的电机控制参考方案。链接如下: http://www.freescale.com/zh-Hans/webapp/sps/site/homepage.jsp?code=MOTORCONTROLHOME 下文也列出BLDC和PMSM常用的控制参考方案,方便查询。 BLDC(无刷直流电机)参考设计 M0+方案 AN4776 - BLDC motor control with Hall sensor based on FRDM-KE02Z 附代码包AN4776SW AN4869 - 基于FRDM-KE04Z和Tower Board的BLDC电机正弦波控制 附代码包AN4869SW AN4796 - 基于FRDM-KE02Z和Tower Board的无传感器BLDC电机控制 附代码包AN4796SW AN4862 - 利用MKV10x实现三相BLDC无传感器控制   附代码包AN4862SW DRM144 - Three-phase BLDC sensorless motor control application AN4870 - Tuning 3-Phase BLDC motor sensorless control using MKV10  附代码包AN4870SW DRM151 - 采用Kinetis KEA128 MCU的3相无传感器BLDC电机控制参考设计 M4方案 AN4376 - 基于 kinetis 和 MQX 的带霍尔传感器的无刷直流电机控制 AN4254 - 在Freescale MQX实时操作系统下进行电机控制 DRM135 - 3-phase BLDC sensorless control with Kinetis MCU (MQX) 附代码包DRM135SW AN4597 - BLDC Sensorless Algorithm Tuning Three-Phase BLDC Sensorless Motor Control Using the MKV4x In Quadcopter Application 附代码包AN5169SW DSC方案 AN4413 - BLDC Motor Control with Hall Sensors Driven by DSC  附软件包AN4413SW AN1916 - 基于 56800/E 数字信号处理器和霍尔传感器的三相 BLDC电机控制 DRM025 - 3-Phase BLDC Motor Control with Hall Sensors Using 56F805 Designer DRM022 - 3-Phase BLDC Drive Control with Hall Sensors Reference Design AN1913 - 3-phase BLDC Motor Control with Sensorless Back-EMF ADC Zero Crossing Detection using DSP 56F80x AN1914 - 3-Phase BLDC Motor Control with Sensorless Back EMF Zero Crossing Detection Using DSP56F80x DRM108 - 采用 MC56F8006 的 BLDC 无传感器参考设计 DRM077 - PMSM and BLDC Sensorless Motor Control using the 56F8013 Device Designer DRM078 - 3-Phase BLDC Drive Using Variable DC Link Six-Step Inverter Designer DRM027 - 3-Phase Sensorless BLDC Motor Control with Back-EMF Zero Crossing Detection Using 56F805 Designer DRM098 - Direct PFC Using the MC56F8013 DRM070 - Three-Phase BLDC Motor Sensorless Control Using MC56F8013/23 Design DRM026 - 3-Phase BLDC Motor Control with Sensorless BACK-EMF ADC Zero Crossing Detection Using 56F805 AN1961 - 3-Phase BLDC Motor Control with Quadrature Encoder Using the 56F800/E PMSM(永磁同步电机)参考设计 M0+方案 AN5049 - Three-Phase PMSM Sensorless FOC Using the MKV10Z32 with Automated Motor Parameters Identification 附代码包AN5049SW AN4935 - 利用Kinetis KV10实现适用于风扇的PMSM无传感器磁场定向控制 (FOC)   附代码包AN4935SW DRM148 - 无位置PMSM矢量控制参考设计 M4方案 DRM128 - PMSM Vector Control with Quadrature Encoder on Kinetis AN4911 - 利用MKV31F实现三相PMSM无传感器FOC  附代码包AN4911SW AN5004 - Sensorless PMSM Control on MKV46F256 Using Kinetis SDK 附代码包AN5004SW AN4912 - Tuning 3-Phase PMSM Sensorless control application using MCAT Tool DRM140 - PMSM Sensorless Vector Control on Kinetis AN4489 - Using CMSIS-DSP Algorithms with MQX and Kinetis MCUs AN4381 - Configuring the FlexTimer for position and speed measurement AN3729 - Using FlexTimer in ACIM/PMSM Motor Control Applications MCLIBCORETXM4UG - Set of General Math and Motor Control Functions for Cortex M4 core PMSMCONUG - PMSM Vector Control with Encoder on Kinetis AN4680 - PMSM electrical parameters measurement DSC方案 AN4656 - PMSM FOC of Industrial Drives using the 56F84789 PMSMUG - PMSM Field-Oriented Control Using MC56F84789 DSC With Encoders DRM098 - Direct PFC Using the MC56F8013 DRM029 - 3-Phase PM Synchronous Motor Control with Quadrature Encoder Using 56F805 Designer DRM102 - PMSM Vector Control with Single-Shunt Current-Sensing Using MC56F8013/23 Design DRM018 - 3-Phase PM Synchronous Motor Torque Vector Control Using 56F805 Designer DRM036 - Sine Voltage Powered 3-Phase Permanent Magnet Synchronous Motor with Hall Sensors Designer AN5014 - Three-Phase PMSM Sensorless FOC using MC56F82748 and MC56F84789 with Automated Motor Parameter Identification  附代码包AN5014SW DRM110 - Sensorless PMSM Control for an H-axis Washing Machine Drive Designer DRM099 - Sensorless PMSM Vector Control with a Sliding Mode Observer for Compressors Using MC56F8013 DRM139 - Dual Sensorless PMSM Field-Oriented Control With Power Factor Correction on MC56F84789 DSC AN4608 - 在MC56F84789上使用PWM和ADC,驱动双PMS电机FOC AN4583 - MC56F84789 Peripherals Synchronization for Interleaved PFC Control                 若文档链接有变动或失效,请在飞思卡尔官方网站上通过文档名称(如AN4912、DRM139等)搜索相应文档。
記事全体を表示
Hey All, Check out the unboxing video for UAV Drone designed using Kinetis V series MCUs to be showcased in Freescale Technology Forum 2015 at booth 249. The Kinetis V series 32-bit MCUs are based on ARM Cortex M cores and specially designed to enable motor control and power conversion applications. Please visit Kinetis V Series Webpage for more information. This drone is powered by Kinetis KV5x MCU (First Kinetis MCU with the latest ARM Cortex M7 Core). The Kinetis KV5x is used in Electronic Speed Control (ESC) unit and a single Kinetis KV5x MCU chip is used to control 4 Brushless DC motors which typically is controlled by four 8 bit MCUs. Along with controlling four motors, the KV5x MCU has enough performance and peripheral headroom so that it can be used as a flight controller and communication interface with connectivity features such as CAN and Ethernet. Kinetis KV5x is ideal solution for industrial IOT with the applications such high performance motor control and power conversion and real time control. Please visit Kinetis KV5x Series Webpage for more information. There is another drone in the Analog section at Freescale Technology Forum based on Kinetis KV4x MCU (based on ARM Cortex M4 core) and Freescale GD3000 3-Phase Brushless DC Gate driver. The Kinetis KV4x MCU is used to control 4 Brushless DC motors and is the cost optimized version of Kinetis KV5x MCUs. Please check out the Kinetis based drone demo as well as other cool demos at Freescale Technology Forum. PS: I apologize for the quality of the video. Working on the better video and editing skills.  Thanks, Mohit Kedia
記事全体を表示