Home
Kinetis SDK v.1.3 Demo Applications User`s Guide
Contents
1. Master Board Connects To Slave Board Pin Name Board Location Pin Name Board Location DC0 SCL Primary Elevator gt DC0 SCL Primary Elevator AT A7 DC0 SDA Primary Elevator gt DC0 SDA Primarv Elevator AS AS GND Primary Elevator gt GND Primary Elevator A6 A6 TWR K60D100M amp TWR K64F120M Master Board Connects To Slave Board Pin Name Board Location Pin Name Board Location PTE10 2C1_SCL Primary Elevator gt PTE10 12C1_SCL Primary Elevator A75 A75 PTE11 12C1 SDA Primary Elevator gt PTE11 12C1 SDA Primarv Elevator B71 B71 GND Primarv Elevator gt GND Primary Elevator A6 A6 TWR K65F180M 8 TWR K80F150M Master Board Connects To Slave Board Pin Name Board Location Pin Name Board Location PTE19 2C0 SCL Primary Elevator b PTE19 12C0_SCL Primary Elevator Pin A7 Pin A7 PTE18 2C0_SDA Primary Elevator b PTE18 I2CO SDA Primary Elevator Pin A8 Pin A8 GND Primary Elevator gt GND Primary Elevator A65 A65 TWR KL25Z48M Kinetis SDK v 1 3 Demo Applications User s Guide 220 Freescale Semiconductor Getting Started Master Board Connects To Slave Board Pin Name Board Location Pin Name Board Location ICI SCL Primarv Elevator gt I2C1_SCL Primary Elevator B22 B22 I2C1_SDA Primary Elevator gt I2C1_SDA Primary Elevator B10 B10 GND Primary Elevator gt GND Pri
2. s e 17 5 3 1 Hardware requirements ke ee ha ES kve Qi RE KA E KE WO DAA ON 17 5 3 2 SOLES requirements gt lt o o 34 cod tecto al konia ek e Bu 17 5 4 Getting Started ap a pk a pa ra ska kora as va HERS RS 18 5 4 1 Pipes ie Demo a o d a bo aud k ej uo o o B Sa i Ga se di dom 19 5 4 2 RE E o o nk he OE Ce GE ee lke i A 19 Kinetis SDK v 1 3 Demo Applications User s Guide iv Freescale Semiconductor Section number Title Page Chapter 6 Bubble Level FTM Demo 6 1 a 2 adon slumo a do a avaj a a ko i o AV Du o GLS Bi EBL E a A EMS 21 6 2 Supported Platforms 21 6 3 System Requirement s s 21 6 3 1 Hardware requirements 4 kus a ue ak 3 4 ka ak kok kk kok RS 21 632 Software requirements gt sv aa sa ca arar 21 6 4 GellingStarlol kk 4 or au aia sos ju e im kokon a pa 21 6 4 1 Hardware DEMOS aaa dela g laeo ela ola te Bla doko kok i kok ko kem ee 21 6 4 2 Prepare tlie bao os ss as spka ka wo a as a aaa a ked OR 22 6 5 RII O e sa ako eka Go Ba Ila lea o a eo 9 22 Chapter 7 Bubble Level TPM Demo 7 1 a 2 oa me l i an le e HH bo OR e PLO EBS EOL ER OMS 23 un Supported Platforms e 23 7 3 System Requirement s s 23 Tad Hardware requirements gg ee A Ba 23 132 Software requirements 3 sv aa sa ca 4480 d b 4 aa doe kik a koko as 23 7 4 Getting Started
3. FlexIO Pins Connects To SPI1 Pins Pin Name Board Location Pin Name Board Location PTDO FLEXIO PI Primary Elevator gt SPI1 MOSI Primary Elevator NO B46 B10 PTD4 FLEXIO PI Primary Elevator gt SPI1 MISO Primary Elevator N1 B48 B11 PTD2 FLEXIO_PI Primary Elevator gt SPI1 SCK Primary Elevator N2 B45 B39 PTD4 FLEXIO PI Primary Elevator gt SPI1 CSn Primary Elevator N3 B44 B59 FRDM KL27Z48M FlexIO Pins Connects To SPII Pins Pin Name Board Location Pin Name Board Location PTDO FLEXIO PI Jl 1 gt SPI1 MOSI J2 18 NO PTD1 FLEXIO_PI Jl 3 gt SPI1 MISO J2 20 NI PTD2 FLEXIO PI Jl 5 gt SPI SCK Jl 11 N2 Kinetis SDK v 1 3 Demo Applications User s Guide 200 Freescale Semiconductor Getting Started PTD3 FLEXIO PI Il 7 gt SPI1 CSn J1 9 N3 TWR K80F150M FlexIO Pins Connects To DSPIO Pins Pin Name Board Location Pin Name Board Location PTBO FLEXIO PI Primary Elevator gt DSPIO SDI Primary Elevator NO A38 B44 PTB1 FLEXIO_PI Primary Elevator gt DSPIO SDO Primary Elevator NI A37 B45 PTB10 FLEXIO P Primary Elevator gt DSPIO SCK Primary Elevator IN4 B70 B48 PTB11 FLEXIO_P Primary Elevator gt DSPIO PCSO Primary Elevator INS B69 B46 slave example TWR KL43Z48M FlexIO Pins Connects To SPI1 Pins Pin Name Board Location Pin Name Board Location PTDO FLEXIO PI Primary Elevator gt SPI1 MISO Primary
4. 263 66 3 1 Hardware requirements o ack 374 ka a o kok kk kok ka 263 66 3 2 Software requirements sasa sa cu a bb i ku va ku koe ik o 4 vala 263 66 4 GellingSBtarlol kk 4 i ees eau kia aas a a sm kokon a kos 264 66 4 1 Hardware PN o ota Sl a la e do i dok kak ii kok kan ko i 4 264 66 4 2 Prepare the example se 49 3 ag sil ee b a ARA RAR eR Oe ARA 264 66 4 3 OI VIES L a a akoo KG ako o drasi Sie li dreed SO Se wh SENS 264 Chapter 67 SDRAMC Example 67 1 IVC e Seg rn OO ka ka oka pa Da ke dea 267 67 2 Supported Platforms i SH Ba a A o G 267 67 3 System Requirement 267 67 3 1 Hardware HOUSES o eS Pes ka ke kva kva ex babe be ss 267 Gia NINE requirements 3 so 33 dad pd da a ae Gee REESE ESS 267 67 4 Getting Started s o oaj SAR daj AO ERR ER OO AO ma i REE ERS 267 67 4 1 Hardware AA a o eee p oe ee ooi So eka o hoko o ae en A 267 67 4 2 PEE tat example se vj a Va AA RR ed a A Be aas 268 67 4 3 KIE NA aa a a PI BAA Or 268 Chapter 68 SLCD Example 68 1 Sv oa ASRS AERA E y 269 68 2 Supported Platforms s s 269 68 3 System Requirement s 269 68 3 1 DIANA KIM DIE sko as aa EE B kij Sie de kiero OM Ge sto 269 68 3 2 Software reguirem nts sss e sa 8a a 3a ada bb KA DA dk ek eee es 269 Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor
5. If selecting playback from the line in source decide whether to perform an FFT analysis to find the fundamental frequency of the audio input Finding the fundamental frequency is best suited for pure tones played into the line in of the TWR AUDIO SGTL card Select filter 1 FFT Find Fundamental Frequency 2 None bi The user is prompted to select from a list of headphone output levels Choose headphone dB level 1 43 0 dB 2 0 0 dB 3 3 0 dB 4 6 0 dB 5 6 7 12 0 dB 24 0 dB 48 0 dB 5 Frequency is 93 Hz The table shows the terminal display after playback has completed and the FFT option was selected These are the options for the wav file option Select player 1 Line In Playback 2 Wav File Playback gt 2 Select Wav file 1 Audio Demo gt Choose headphone dB level 1 43 0 dB 2 0 0 dB Jur 3 90 dB Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 125 Run the demo 6 0 dB 12 0 dB 24 0 dB 48 0 dB YO Of gt 5 The quality of the wav file PCM data depends on the demo system and the compiler This table shows the audio sample rate channels and bit depth of the wav file for the various platforms and compilers Hardware Sample Rate kHz Bit Depth Channels see IAR ARM GN KDS IAR ARM GN KDS IAR ARM GN KDS U G GCC U G GCC U G GCC CC CC CC TW 44 1 44 1 11 11 1
6. 3 sss 4 Rw aa aa gu E pom ok konk kla 24 7 4 1 Pi AIS Seinas oos arla oe laeo ela a Se o doko kok i kok ko kea ee 24 7 4 2 Prepare tbe DEMO os ss ia a ta e e RR a AA RA RA 24 7 5 NIRMOLO 3 sako eka DUO 9 e a e alea ale a Se 9 24 Chapter 8 DAC ADC Demo 8 1 A 3 ardis aaa do a aij a e oo Ba o ERS HBS OLE e ERS 25 8 2 Supported Platforms 25 8 3 System Requirement s s 25 8 3 1 Hardware requirements co oo mos bikom a a a ak ka A aa kk kok a kok ERS 25 Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor Section number Title Page Bide ce o See Lo E OO EH eo OE Om SE s 26 8 4 Getting Started ee ee 26 8 4 1 Hardware configuration o sse rer estes ka Ni Se RK we Se o 26 8 4 2 Hardwate SSMA a ss SA SANS a RRM Pax ks sas ASS SS 26 8 4 3 Prepare the LENO o ar pla prn i RIADO RIE ETA SR EES JIA a SN e a 27 8 5 Run the demo 2 44 644454 44 a k a a a adu 3 a 93 HEE a ka kona RS 27 8 6 Key Functions js 304 a 208 i medal aed RR AR RRA od kea 28 Chapter 10 Flash Demo 10 1 As ooe ESOP A AO MIO IO l EE MO MU MO AL 35 10 2 Supported Platforms 35 10 3 System Requirement s 36 10 3 1 Hardware IKI aza ma pop eot de i e De ie eo SEM Seek S 36 10 3 2 sa o o s so s mon kom Aw ERG eR ORG Raw SU 36 10 4 Getting Started gt gt occ sc eaor ko HRS OR ra EO era a eS e
7. Bare Metal FreeRTOS uC OS ksdk_platform_lib MQX RTOS mqx_ lt board gt mqx_stdlib_ lt board gt 22 5 Getting Started See the wIP TCPIP Stack and Kinetis SDK Integration User s Guide document KSDKLWIPUG for instructions and requirements 22 5 1 Prepare the Demo 1 Connect a USB cable between the PC host and the OpenSDA USB port on the board 2 Open a serial terminal with these settings e 115200 baud rate e 8 data bits e No parity e One stop bit e No flow control 3 Download the program to the target board 4 Either press the reset button on your board or launch the debugger in your IDE to begin running the demo For detailed instructions see a Kinetis SDK User s Guide for your board 22 5 2 Network Configuration Configure the IP address of PC network adapters as shown e 192 168 2 100 22 6 Run the demo Download the program to the target board Connect the Ethernet cable between the PC and the board When successfully connected reset the board to run the demo Open the command window on PC type in ping 192 168 2 102 to test whether the lwIP is running If it is running use an external echo tool to perform the echo request This tool sends UDP packets to the board and checks whether the content sent back from board is the same A similar tool NN un Kinetis SDK v 1 3 Demo Applications User s Guide 98 Freescale Semiconductor Run the demo named echotool can be downloaded from t
8. Send an array out through MISO pin and compare it with received buffer from MOSI pin 70 2 Supported Platforms These Freescale Freedom development platforms and Tower Svstem modules are supported bv the SPI example e FRDM KLOZZ x DMA not supported FRDM KLO3Z x DMA not supported FRDM KL25Z x DMA not supported e FRDM KL26Z e FRDM KL27Z x DMA not supported e FRDM KL43Z e FRDM KL46Z e MRB KWOL e TWR KL25Z48M x DMA not supported e TWR KLA3Z48M e TWR KM34Z75M 703 System Requirement 70 3 1 Hardware requirements e J Link ARM Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 215 7385 Getting Started e PRE Micro Multi link universal e Mini micro USB cable e USB Ato micro AB cable e Hardware Tower System base board for specific device e Personal Computer 70 3 2 Software requirements e The project files are in lt SDK_Install gt examples lt board gt driver_examples spi lt use_ case gt lt toolchain gt e Library dependencies ksdk_platform_lib 704 Getting Started 70 4 1 Hardware settings e SPI master loopback Transfer data through instance 0 of SPI interface MISO pin and MOSI pin are connected e SPI board to board Transfer data through instance 0 of SPI interface SPIO pins of master board are connected with SPIO pins of slave board lt note gt For the MRB KWO01 Open J3 to disconnect PTDA PCSO with DIO4 lt note gt This example r
9. 179 43 2 Supported Platforms sss so 179 43 3 System Requirement s e 180 43 3 1 DIANA IS 9 uo as aa a Simo e Sie de RG Siera Sa o 180 43 3 2 Software reguirem nts sss e 3a 8a a 3a ada Ed KA DA te e koe a HS 180 Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor XIX Section number Title Page 43 4 Getting Started i ao a gal noe a sa a ra TA a BOS 180 43 4 1 Hardware settings lt o o o ooeec moce moona maoe a moomo a es Keko la Sat la 180 43 4 2 Prepare be example ROA RA AA RE SEIAS 180 43 4 3 Rin III i L 181 Chapter 44 FlexCAN Example 44 1 OO AJ a a ta gr dadao edo Go NE 183 44 2 Supported Platforms s s ee 183 44 3 System Requirement s s 183 44 3 1 Hardware requirements o sa ee ee 4 va lib a 44 4 Be RSS HS 183 44 3 2 Software POQUINGMCNIS 2 s a aa 47a mod al o CRA au a Ga 183 44 4 Getting Siarlol 4 ca caos aim akon kokon ook ow koe e kok as 184 44 4 1 Hardware settings o su o KR ien eG RR A e ad eka 184 44 4 2 Prepare the example ein 3 843 Ge u HOR HR ACE i KE STE BO ON 184 44 4 3 Ron CSS e coe peke e e ka 1 ao iaa Na 8 a ka 184 44 4 3 1 e A AAA eee OL o EO ra EE BER GSE HG 184 44 4 3 2 PICK AN WAM III each oe B 185 Chapter 45 45 1 45 2 45 3 45 3 1 45 3 2 45 4 45 4 1 45 4 2 45 4 3 FlexIO simulated I2C Example with other methods MINER A
10. TM dj Getting Started PTGO QTMRO T J25 Pin 20 gt oscilloscope Positive end MRI 63 4 2 Prepare the example 1 Connect a USB cable between the PC host and the OpenSDA USB port on the board 2 Open a serial terminal with these settings e 115200 baud rate e 8 data bits e No parity e One stop bit e No flow control 3 Download the program to the target board 4 Either press the reset button on your board or launch the debugger in your IDE to begin running the example 63 4 3 Run the example These instructions are displayed shown on the terminal window kkkkkkikxxwQUADTIMER EXAMPLE STARTkkkkkkkkk kkkkkkkkxDelay 3 s for PWMxx x xx xxxxx kkkkkkxxxMake sure to connect a scope xkkikkkki kxxxA 50 duty cycle PWM wave is observed in the scope xixx kkkkkxxxxOQUADTIMER EXAMPLE END xxx eee wae After that the program enters an infinite loop Kinetis SDK v 1 3 Demo Applications User s Guide 256 Freescale Semiconductor Chapter 64 RNGA Example 64 1 Overview The RNGA is a digital integrated circuit capable of generating the 32 bit random numbers The RNGA Example project is a demonstration program that uses the KSDK software to generate random numbers and prints them to the terminal 64 2 Supported Platforms These Freescale Freedom development platforms and Tower System modules are supported by the RNGA example e FRDM K22F e FRDM K64F e FRDM KV31F e FRDM KW24 TWR K21D50M TWR K21F120M TWR K22F120M TWR
11. Type characters on the keyboard and the board receives and echoes them on the terminal screen 56 4 5 4 LPUART DMA non blocking These instructions are displayed shown on the terminal window ttt LPUART DMA Send Receive Non Blocking Example Type characters on the keyboard and the board receives and echoes them on the terminal screen Type characters on the keyboard and the board receives and echoes them on the terminal screen 56 4 5 5 LPUART polling These instructions are displayed shown on the terminal window LPUART Send Receive Polling Example Type characters on the keyboard and the board receives and echoes them on the terminal screen Type characters on the keyboard and the board receives and echoes them on the terminal screen Kinetis SDK v 1 3 Demo Applications User s Guide 238 Freescale Semiconductor Chapter 57 LTC AES Example 571 Overview This project is a demonstration program that uses the KSDK software for encryption decryption sample data using AES CBC AES CCM and XCBC MAC algorithm 57 2 Supported Platforms These Freescale Freedom development platforms are supported by the LTC_AES example e FRDM KW40Z e USB KW40Z 57 3 System Requirement 57 3 1 Hardware requirements J Link ARM e P E Micro Multi link universal e Mini micro USB cable e USB A to micro AB cable e Hardware Tower System base board for specific device e
12. e Calendar Get the current date time with Vear Month Dav Hour Minute and Second Set the current date time with Year Month Day Hour Minute and Second e Alarm Set the alarm based on the current time Application prints a notification when the alarm expires e Seconds interrupt Use second interrupt function to display a digital time blink every second e Compensation Configure the compensation with cycles The 1 Hz RTC clock with compensation configured is output to a pin Use an oscilloscope to check the compensation result 27 2 Supported Hardware These Freescale Freedom development platforms and Tower System modules are supported by the KSDK RTC Function demo e FRDM K22F e FRDM K64F e FRDM KLO3Z e FRDM KL27Z e FRDM KL43Z e FRDM KL46Z e FRDM KW24 e FRDM KW40Z e MRB KWOL TWR K21D50M TWR K21F120M TWR K22F120M TWR K24F120M e TWR K60D100M Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 119 AR Getting Started e TWR K64F120M e TWR K65F180M TWR K80F150M e TWR KL43Z48M TWR KW24D312 USB KW40Z 27 3 System Requirement 27 3 1 Hardware requirements J Link ARM e P amp E Micro Multi link universal e Mini micro USB cable e USB A to micro AB cable e Hardware tower base board for specific device e Personal Computer 27 3 2 Software requirements e The project files are in lt SDK_Install gt examples lt board gt demo_apps rtc_func lt to
13. 9535189 gt 5281752 7871223 gt 5588344 6290283 gt 5884448 6322041 6171320 8025478 6445624 9933534 6701808 10382821 6930512 8997469 7151032 7042261 7349632 6274946 7535216 7364674 gt 7706264 9289208 gt 7857792 10255966 7985472 9317117 8089208 1223690 gt 8172936 5749L55 8240840 6092036 gt 8293384 7796394 gt 8326744 9162986 8336152 8780521 gt 8320128 6797545 8281800 4789092 8226120 4338241 8155472 5610457 gt 8067648 7205110 7958000 TALT9S9 gt 1823832 S7 77092 7667080 Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 103 Getting Started 3468902 7492856 2269827 gt 7305176 2946762 7103720 4566901 6884528 5338900 6644024 4227529 gt 6382728 1887148 6105312 3U39 gt 5816960 60914 5519288 1498499 520 9520 2723782 3 4883656 2263234 gt 4540760 1 60231 gt 4184528 Mmau_filter_demo End Kinetis SDK v 1 3 Demo Applications User s Guide 104 Freescale Semiconductor Chapter 24 MMDVSQ Demo This demo application demonstrates how to use MMDVSQ driver 24 1 Overview The MMDVSQ Demo project is a simple demonstration program to show how to use the MMDVSQ driver This demo demonstrates the efficiency of
14. e J Link ARM e P amp E Micro Multi link universal e Mini micro USB cable e USB A to micro AB cable e Hardware tower base board for specific device e Personal Computer 3 3 2 Software requirements e The project files are in lt SDK_Install gt examples lt board gt demo_apps adc_low_power lt toolchain gt e Library dependencies ksdk platform lib 3 4 Getting Started The ADC Low Power project is designed to work with the Tower System or in a stand alone setting 3 4 1 Prepare the Demo Connect a USB cable between the PC host and the OpenSDA USB port on the board Open a serial terminal with these settings e 115200 baud rate e 8 data bits e No parity e One stop bit e No flow control 3 Download the program to the target board 4 Either press the reset button on your board or launch the debugger in your IDE to begin running the demo DD For more detailed instructions see a Kinetis SDK User s Guide for your board 3 4 2 Run the demo 1 Set your target board in a place where the temperature is constant 2 Press the reset button on your development board Kinetis SDK v 1 3 Demo Applications User s Guide 10 Freescale Semiconductor A A Getting Started 3 ADC LOW POWER DEMO message and some instructions should be displayed on the terminal 4 Wait until the green or white LED light turns on 5 Increment or decrement the temperature to see the changes Kinetis SDK v 1 3 Demo Applications User
15. 204 Freescale Semiconductor Chapter 49 FlexlO simulated UART Example with other methods 491 Overview The FlexIO UART example application demonstrates the FlexIO simulated UART driver working with different methods The FlexIO UART example shows the transmit receive between the FlexIO simulated UART and the LPUART using interrupts and DMA e flexio uart example using interrupts e flexio uart dma example using DMA 49 2 Supported Platforms These Freescale Freedom development platforms and Tower System modules are supported by the FlexIO UART example e FRDM KL27Z e FRDM KL43Z e TWR KL43Z48M e TWR K80F150M 49 3 System Requirement 49 3 1 Hardware requirements J Link ARM e P amp E Micro Multi link universal e Mini micro USB cable e USB A to micro AB cable e Personal Computer 49 3 2 Software requirements e The project files are in lt SDK_Install gt examples lt board gt driver_examples flexio uart lt use_ case gt lt toolchain gt e Library dependencies ksdk platform lib Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 205 Getting Started 494 Getting Started 49 4 1 Hardware settings This example requires connecting the FLEXIO pins with the LPUART pins Connect the FlexIO pins to the LPUART pins Note that the default uses the FlexIO pin5 and pin4 FlexIO Pins Connects To LPUART Pins FlexIO Pin5 gt LPUART Rx FlexIO Pin4 gt LPUART Tx
16. 36 1 Overview The carrier modulator transmitter CMT provides the means to generate the protocol timing and carrier signals for a wide variety of encoding schemes The CMT is intended to be sufficiently programmable to handle the timing requirements of most protocols with minimal CPU intervention This example uses the CMT peripheral to perform data modulation 36 2 Supported Platforms This Freescale Freedom development platform is supported by the CMT example e TWR K60D100M e FRDM KW40Z 36 3 System Requirement 36 3 1 Hardware requirements J Link ARM e P amp E Micro Multi link universal e Mini micro USB cable e USB A to micro AB cable e Hardware Tower Svstem base board for specific device e Personal Computer 36 3 2 Software requirements e The project files are in lt SDK_Install gt examples lt board gt driver_examples cmt lt toolchain gt e Library dependencies ksdk_platform_lib 36 4 Getting Started 36 4 1 Hardware settings The CMT Example project does not call for any special hardware configurations Although not required the recommendation is to leave the development board s jumper settings and configurations in default state when running this example Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 153 Getting Started 36 4 2 Prepare the example 1 Connect a USB cable between the PC host and the OpenSDA USB port on the board 2 Connect a oscilloscope to e the pin 2
17. 66k s i 4 i ees au aia e oso ju 8 sm kom a gos 212 51 4 1 Hardware PN o sori GR az a a OS doko koe i kok e ken RS 212 51 4 2 Prepare the example lt e e ccc u aoe ai aei RR a eR OR ARA 212 51 4 3 Run IES KA p e ae keo EG ARS KA ral Rl Sie SIO Se L 212 Chapter 52 12C Example with other methods 52 1 IVC o a a e a a a a A ka ka e DU ok e dua 215 52 2 Supported Platforms ca oo Sa B a 215 52 3 System Requirement 216 52 3 1 Hardware requirements gt Si aea bee kve e ERE EKER babe BER ks 216 232 QA requirements o 3 so occa ad pd da a beka de 24 e 88 kas 216 52 4 A a aka ra SAR a SERRE ea e I E 216 52 4 1 Hardware SetinES a eee a ee ok eka o eS a S 216 52 4 2 Prep re tat example o sav a ak SO ag a a ee OR GOREN 222 52 4 3 NURI 0 o a p iza o Re RE RO E KEE Oe SLE SAG AS 223 52 4 3 1 NAO O o ao Oe RS OEE E A TA oa ira 223 52 4 3 2 e ONE 223 52 4 3 3 RC callback oo ssp a ed ka a o o dopo oj 224 52 4 3 4 e E mo am dee adaj eae l re a roj Seu se Suzo 224 Chapter 53 iRTC Example 53 1 OEN p a o Seda rk p pk a a ka oka a Sa de e dea 225 53 2 Supported Platforms lt lt a HE 225 Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor xxiii Section number Title Page 53 3 System Requirement 225 53 3 1 Hardware requirements kk a dea dogo ako ias l ias do arao o ean ROHS eH 225 53 4 Getting Started va 5 va vea ka ea ces o ea EEE
18. JI 2 3 J10 l 2 J21 3 4 J2 short JU open J22 3 4 J3 2 3 J12 open J25 open J4 short J13 open J26 short JS short J14 open J27 short J7 l 2 J18 2 3 J28 short J8 12 J19 2 3 J29 l 2 J9 l 2 J20 l 2 1 TWR KV11Z75M jumper settings jumper position jumper position jumper position JI short J9 1 2 3 4 J505 3 4 J2 1 2 J10 short J506 3 4 J4 1 2 JU l 2 J523 open J5 5 6 7 8 J12 short J512 1 2 J6 1 2 3 4 J13 1 2 J519 l 2 J7 open J14 short J517 2 J518 J8 1 2 J17 2 3 J524 open 1 Connect a USB cable between the PC host and the OpenSDA USB port on the board Note that because of board limitations if the power is not supplied to OpenSDA the MCU reset pin is in low Kinetis SDK v 1 3 Demo Applications User s Guide 18 Freescale Semiconductor 5 4 1 N Du Eb YU Getting Started level Prepare the Demo Connect a USB cable between the PC host and the OpenSDA USB port on the board Open a serial terminal with these settings e 115200 baud rate e 8 data bits e Noparitv e One stop bit e No flow control Download the program to the target board Connect three phases of the BLDC motor to J5 in the TWR MC LV3PH board Supplv 24 V digital power to JI in the TWR MC LV3PH board Either press the reset button on vour board or launch the debugger in the IDE to start running the demo For detailed instructions see the appropriate board User s Guide 54 2 Runthe demo The application c
19. PW VLPS LLS VLLSI VLLS3 RUN 48MHz TWR KM34Z75M WAIT STOP VLPR 4 MHz VL RTC SW1 PW VLPS VLLSO VLLS1 VLL S2 VLLS3 RUN 72MHz TWR KV10Z32 WAIT STOP VLPR 4 MHz VL RTC SW2 PW VLPS VLLSO VLLS1 VLL S3 RUN 75MHz TWR KV31F120M WAIT STOP VLPR 4 MHz VL RTC SW1 PW VLPS LLS3 VLLSO VLLS1 VLLS2 VLLS3 RUN 80MHz H SRUN 120MHz TWR KV11Z75M WAIT STOP VLPR 4 MHz VL RTC SW2 PW VLPS VLLSO VLLS1 VLL S3 RUN 75MHz TWR KW24D512 WAIT STOP VLPR 4 MHz VL RTC SW3 PW VLPS LLS VLLSO VLLSI VLLS2 VLLS3 RUN 48MHz USB KW40Z WAIT STOP VLPR 4 MHz VL RTC PW VLPS LLS3 VLLS1 VLLS2 VLLS3 RUN 21MHz Kinetis SDK v 1 3 Demo Applications User s Guide 112 Freescale Semiconductor Chapter 26 Power Manager RTOS Demo This demo application demonstrates how to use the Power Manager 26 1 Overview The Power Manager demo application demonstrates different Power Manager modes supported by the Kinetis SoCs The set of supported low power modes and their transition possibility differ platform to platform See section System Mode Controller in a Reference Manual for each Kinetis Sub family microcontroller 26 2 Supported RTOS e Freescale MQX RTOS e FreeRTOS e C OS II e C OS III e Bare Metal no RTOS 26 3 Supported Hardware These Freescale Freedom development platforms and Tower System modules are supported by the Kinetis softw
20. This Tower System module is supported by the KSDK SLCD basic testing and a Guess Number game demo e TWR KM34Z75M 29 3 Getting Started 29 3 1 Hardware Settings This project does not call for any special hardware configurations Although not required the recommen dation is to leave the development board jumper settings and configurations in default state when running this demo 29 3 2 Prepare the Demo 1 Connect a USB cable between the PC host and the OpenSDA USB port on the board 2 Open a serial terminal with these settings e 115200 baud rate e 8 data bits e No parity e One stop bit e No flow control 3 Download the program to the target board 4 Either press the reset button on your board or launch the debugger in your IDE to begin running the demo For detailed instructions see the appropriate board User s Guide Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 131 Communication Interface Settings 294 Run the demo This example shows how to run the demo 1 Basic Testing The demo performs basic testing on the SLCD first All numbers and icons are shown one by one on the screen 2 Guess number game Next the demo asks the user to play a guess number game The user can input the number 0 9999 in the console and the number is displayed on the SLCD screen lt codeblock gt Start basic SLCD test SLCD Guess Num Game The number
21. VLLS1 VLLS2 VLLS3 RUN 80MHz H SRUN 120MHz Kinetis SDK v 1 3 Demo Applications User s Guide 116 Freescale Semiconductor i Getting Started FRDM K64F WAIT STOP VLPR 4MHz VL RTC SW2 PW VLPS LLS VLLSO VLLSI VLLS2 VLLS3 RUN 120MHz FRDM KL25Z WAIT STOP VLPR 4MHz VL RTC PTD6 J2 17 to VSS J9 14 PW VLPS LLS VLLSO VLLSI VLLS3 RUN 48MHz FRDM KL27Z WAIT STOP VLPR 2MHz VL RTC SW3 PW VLPS LLS VLLSO VLLSI VLLS3 RUN 48MHz FRDM KL43Z WAIT STOP VLPR 2MHz VL RTC SW3 PW VLPS LLS VLLSO VLLSI VLLS3 RUN 48MHz FRDM KL46Z WAIT STOP VLPR 4MHz VL RTC SW1 PW VLPS LLS VLLSO VLLSI VLLS3 RUN 48MHz FRDM KV31F WAIT STOP VLPR 4MHz VL RTC SW3 PW VLPS LLS3 VLLSO VLLSI VLLS2 VLLS3 RUN 80MHz H SRUN 120MHz FRDM KW24 WAIT STOP VLPR 4MHz VL RTC SW1 PW VLPS LLS VLLSO VLLS1 VLLS2 VLLS3 RUN 48MHz FRDM KW40Z WAIT STOP VLPR 4MHz VLP RTC SW2 W VLPS LLS3 VLLSO VLLS1 VLLS2 VLLS3 RUN 32MHz TWR K21D50M WAIT STOP VLPR 4MHz VL RTC SW1 PW VLPS LLS VLLSO VLLS1 VLLS2 VLLS3 RUN 48MHz TWR K21F120M WAIT STOP VLPR 4MHz VL RTC SW3 PW VLPS LLS VLLSO VLLS1 VLLS2 VLLS3 RUN 120MHz TWR K22F120M WAIT STOP VLPR 4MHz VL RTC SW1 PW VLPS LLS3 VLLSO VLLS1 VLLS2 VLLS3 RUN 80MHz H SRUN 120MHz TWR K24F120M WAIT STOP VLPR 4MHz VL RTC SW2 PW VLPS LLS VLLSO VLLS1
22. e 8 data bits e No parity e One stop bit e No flow control 3 Download the program to the target board 4 Either press the reset button on your board or launch the debugger in your IDE to begin running the demo For more detailed instructions see a Kinetis SDK User s Guide for your board 2 5 Run the demo 1 Select and open one project from the four projects available adc_pit_trigger adc_lptmr_trigger and adc_pdb_trigger 2 Open the UART console on a PC and also connect external sine wave generator to ADC input if necessary Download and run the program on the target 4 The signal waveform is displayed on the console LI 2 6 Customization Options This demo application is customizable to show different kinds of input signal waves 2 6 1 Default configurations The configuration macro is located in the adc hw trigger h header file 2 6 1 1 ADC configurations 1 Use ADCO instance 2 Use ADC SE23 input pin as sample pin ADC SE6 for FRDM KV10 ADCI SE4 For TWR K V11 3 Use VREFH L as reference voltage For TWR KM34Z75M 1 Use ADCO instance 2 Use ADC SEI5 input pin as sample pin 3 Use VREFH L as reference voltage Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 7 Tp i T553S S oou Customization Options 2 6 1 2 Sample frequency The default sample rate is 1000 Hertz which enables the demo application to get 100 samples per two periods To change the sample ra
23. e TWR K21F120M e TWR K60D100M e TWR K64F120M e TWR K65F180M 66 3 System Requirement 66 3 1 Hardware requirements e J Link ARM e P amp E Micro Multi link universal e Mini micro USB cable e USB A to micro AB cable e Hardware tower base board for specific device e Personal Computer 66 3 2 Software requirements e The project files are in lt SDK_Install gt examples lt board gt driver_examples sdhc_sdcard lt toolchain gt e Library dependencies ksdk_platform_lib Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 263 TLT Eg Getting Started 66 4 Getting Started 66 4 1 Hardware settings The SDHC SdCard Example project does not call for any special hardware configurations Although not required the recommendation is to leave the development board s jumper settings and configurations in default state when running this example 66 4 2 Prepare the example 1 Connect a USB cable between the PC host and the OpenSDA USB port on the board 2 Open a serial terminal with these settings e 115200 baud rate e 8 data bits e No parity e One stop bit e No flow control 3 Download the program to the target board 4 Either press the reset button on your board or launch the debugger in your IDE to begin running the example 66 4 3 Run the example Insert an SD or a micro SD card depending on the board connector Ensure that the card doesn t contain any Important content because the dem
24. e TWR K65F180M e TWR K80F150M 73 3 System Requirement 73 3 1 Hardware requirements e J Link ARM e P amp E Micro Multi link universal e Mini micro USB cable e USB A to micro AB cable e Hardware tower base board for specific device e Personal Computer 73 3 2 Software requirements e The project files are in lt SDK_Install gt examples lt board gt driver_examples tsi lt toolchain gt e Library dependencies ksdk_platform_lib 73 4 Getting Started 73 4 1 Hardware settings The TSI Example project does not require any special hardware configurations Although not required the recommendation is to leave the development board s jumper settings and configurations in default state Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 291 lt Getting Started when running this example 73 4 2 Prepare the example 1 Connect a USB cable between the PC host and the OpenSDA USB port on the board 2 Open a serial terminal with these settings e 115200 baud rate e 8 data bits e No parity e One stop bit e No flow control 3 Download the program to the target board 4 Either press the reset button on your board or launch the debugger in your IDE to begin running the example 73 4 3 Run the example These instructions are displayed shown on the terminal window Touch Sensing input example Touching for turning led on After that the LED brightness toggles after each t
25. 1 Prepare Tie bomo o a ao a ap SRS AA ROE RE A 105 24 5 Run TAESOK oe es Oe Ee eRe ela an Oe ee a ee A I 106 Chapter 25 Power Manager HAL Demo 25 1 a i i o sz Ge RURO SSS ASG ERS AS HSS 107 25 2 Supported Hardware 32 a Gra a a Ad e a e ee aa 107 25 3 System Requirement 108 FAO OJN Hardware requirements 2 o sa klak ka ela 4 era GS lk Ee Se e GER Gs 108 vmo IE MAS Software requirements is aus kos ka a ed a SS 108 25 4 Gettin Started e eh pra kp pk pro Re ek aka OES Ed ua ua kaa 108 Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor Section number Title Page 25 4 1 EII IN ida de hee ke a AJ eko epeo a e ke ke Gs 108 25 4 2 li he Demno o lo ao eo he ko A a olo Sa ida kejo kobo a dam da 108 25 4 3 III edono a ao e a A S 108 25 4 4 Supported Low Power Modes By Platform 110 Chapter 26 Power Manager RTOS Demo 26 1 So su SSE TS err rr TETTE EET TEL 113 26 2 Supported RTOS 2 0 0 s s oseo 113 26 3 Supported Hardware lt ceso be ae e aes ae a a e a koe i aka 113 26 4 System Requirements s s sss 114 26 4 1 Hardware requirements lt lt ci asu suu es RE kou koka oo 114 26 4 2 oftware TEQUISMIST S gt s sa posa ip 008 socs AR ROK ASO RORO AEI A 114 26 5 Getting larto io 115 26 5 1 Hardware a ae deo da e ak Se o Selo kaf Seas RS EO Semio 115 26532 Prepare ihe Demo o ao c osm ke l arda ARA av u Bel ED RON 9 115
26. 14 Freescale Freedom FRDM KL46Z The board doesn t support external pull up resistors for I2C pins So the internal pull up resistors is enable for I2C pins However the resistor is quite huge 20KOhm 50KOhm The I2C may run FAIL in high Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 75 Getting Started baurate In this case user need to use external pull up resistors FRDM KL46Z Single Board Master Connects To Slave Pin Name Board Location Pin Name Board Location I2CO_SCL J4 Pin 6 gt DC1 SCL J2 Pin 20 mBCO SDA J4 Pin 8 gt DC1 SDA J2 Pin 18 FRDM KL46Z Two Boards Master Board 1 Connects To Slave Board 2 Pin Name Board Location Pin Name Board Location I2CO_SCL J4 Pin 6 gt DC1 SCL J2 Pin 20 PCO SDA J4 Pin 8 gt DC1 SDA J2 Pin 18 GND J2 Pin 14 gt GND J2 Pin 14 Freescale Freedom FRDM KW40Z FRDM KW40Z has only RED leds available so GREEN and BLUE leds blinking is simulated by different RED leds FRDM KW40Z Two Boards Master Board 1 Connects To Slave Board 2 Pin Name Board Location Pin Name Board Location PTC2 2C1 SCL J25 Pin 10 gt PTC2 2C1 SCL J25 Pin 10 PTC3 12C1 SDA J25 Pin 12 gt PTC3 I2C1_SDA J25 Pin 12 gt GND J24 Pin 14 gt GND J24 Pin 14 Freescale Modular Reference Board MRB KW01 MRB board doesn t include user controllabl
27. 15 16 17 18 19 1A 1B IC 1D IE IF 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F Slave example is running 70 4 3 6 SPI loopback These instructions are displayed shown on the terminal window SPI loopback example This example runs on instance 0 Be sure MISO to MOSI are connected Baud rate in Hz is 500000 Master transmits 00 01 02 03 04 05 06 07 08 09 0A OB OC OD OE OF 10 11 12 13 14 15 16 17 18 19 1A 1B IC 1D IE IF 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F Master receives Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 283 AR Getting Started SPI master 00 01 10 11 20 21 30 31 02 03 04 12 13 14 22 23 24 32 33 34 transfer 05 06 07 08 09 OA OB OC OD OE OF 15 16 17 18 19 1A 1B IC ID IE IF 25 26 27 28 29 2A 28 2C 2D 2E ZF 35 36 37 38 39 3A 3B 3C 3D 3E 3F succeed Press any key to run again Kinetis SDK v 1 3 Demo Applications User s Guide 284 Freescale Semiconductor Chapter 71 SPI SDCard Example 71 1 Overview The SPI SDCard Example application demonstrates the use of SD card driver with SPI This example doesn t support SD card memorv that is greater than 2 GB e Detect card inserted e Check card status lock or unlock detect by hardware pin e Read and write single block and multi blocks to SDCard e Erase blocks in SDCard 71 2 Supported Platforms These
28. 1B IC ID IE IF 20 DSPI Master Sends Receives successfully Press any key to run again The slave board receives and print on terminal Slave receive 01 02 03 04 05 06 07 08 09 OA OB OC OD OE OF 10 11 12 13 14 15 16 17 18 19 1A 1B IC ID IE IF 20 Slave example is running DSPI eDMA non blocking Master Slave Set up the slave first and the slave board displays this message on the terminal DSPI board to board EDMA non blocking example This example run on instance 0 Be sure DSPIO DSPIO are connected Slave example is running The master sends an array to the slave and receives the array back from the slave It also compares whether the two buffers are the same The master board prints this message on the terminal DSPI board to board eDMA non blocking example This example run on instance 0 Be sure DSPIO DSPIO are connected Transfer at baudrate 468750 Master transmit 01 02 03 04 05 06 07 08 09 OA OB OC OD OE OF 10 11 12 13 14 15 16 17 18 19 1A 1B IC ID IE IF 20 Master receive 01 02 03 04 05 06 07 08 09 OA OB OC OD OE OF 10 11 12 13 14 15 16 17 18 19 1A 1B IC ID IE IF 20 DSPI Master Sends Receives successfully Press any key to run again The slave board receives and prints this message on terminal Kinetis SDK v 1 3 Demo Applications User s Guide 170 Freescale Semiconductor i Getting Started Slave receive 01 02 03 04 05 06 07 08 09 OA OB OC OD OE OF 10 11 12 13 14 15 16 17 18 19 1A 1B IC ID IE IF 20 Slave exam
29. 2653 R e damno lt a a a E o ajo Sao udo da a do Boh ESE 115 26 5 4 Supported Low Power Modes By Platform 116 Chapter 27 RTC Function Demo 27 1 ENVIE a a paras in UON RO SORO TOE SOE SPE SP SA SEE 119 27 2 Supported Hardware s s 119 27 3 System Requirement s s 120 24 01 Hardware reguirements o o i o a eko a oa i At 120 Ea Software requirements lt a ia A RRR RE RS 120 27 4 Getting Started 5 245 4 ss a e ea i kon we eR Oe a 120 27 4 1 Prepare tbe ISI ss ke A FA VR 43 11330 ORG 8344 Va 120 27 5 a oo Pee ee Se d ai ee E 121 Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor xiii Section number Title Chapter 28 SAI Demo 28 1 CPC sa a em A ARA EO ERG HOLGER ROMS 28 2 Supported Hardware ees 28 3 System Requirement 28 3 1 Hardware requirements 6 6 64 bk ee a ke ak RR RR ER ES 28 3 2 Software requirements L 1523 bee ea kaw 4 od oma kor ln e aa 28 4 Getting Started 6 6h s s 4 4 i ees orau aja moris a e sm kas 28 4 1 MOL Compier AAA 28 4 2 H rdwa re Settings sj akoj aj kurb Sk ah a a o ee a 28 4 3 Pie be Demo p a a akeo GES ko dee ROK sik DEO AS 28 5 R n thedem 3 9 33 84 8 8 3394 si dla ai doj ai dl ache a le 28 6 Key Functions o ea hea hee hee ESR aj 7a E ao daa Chapter 29 SLCD basic testing and an Guess Number game 29 1 LOTES sa ks a US
30. 4 3 Ri theexample PAE 280 70 4 3 1 SPI blocking Master Slave 545 biG aks koklo kok aka 280 70 4 3 2 SPI non blocking Master Slave 280 70 4 3 3 SPI DMA blocking Master Slave 4 4 aao za we we wa 281 70 4 3 4 SPI DMA non blocking Master Slave 282 70 4 3 5 SPI polline OIN SUS oe ae a Ge a e o a eS 283 70 4 3 6 PLUDONO o so 4 ee kurdo keg dus koe ka eK boar a o 283 Kinetis SDK v 1 3 Demo Applications User s Guide XXX Freescale Semiconductor Section number Title Page Chapter 71 SPI SDCard Example 71 1 a 2 dn sogo a do a avaj a a o Vi o AV DU RLS HRS SLE E IN EMS 285 71 2 Supported Platforms 285 71 3 System Requirement s s 285 71131 Hardware requirements 4 4 uc a ue ak 374 a kok kok ka 285 as Software requirements o sasa sa bba ku w ku va ku ku iko kv ks 285 71 4 GellingBtarlol cocos i ees eau kia ee boa 285 71 4 1 Hardware PN o sori l a i dok i dok kak ii kok koken keo g i 285 71 4 2 Prepare the example lt e o ccc ou aoe ai aei ie a ed a eR Oe RS 286 71 4 3 Run VIES p a eH KG dei OR Se A fer SOE Go SETS 286 Chapter 72 TPM Example 72 1 OEO o a a Seg Se pk a ka ka ka pa DU ie e dea 289 TAZ Supported Platforms cao dao aH sa aso A a o Oa BES 3 289 123 System Requirement 289 12 31 Hardware requirements gt a 3 sa Pes BRK Eve e ka va ER AR 289 Tea NINE requ
31. 80MHz H SRUN 120MHz FRDM KW24 WAIT STOP VLPR 4 MHz VL RTC SW1 PW VLPS LLS VLLSO VLLS1 VLLS2 VLLS3 RUN 48MHz FRDM KW40Z WAIT STOP VLPR 4 MHz VL RTC SW2 PW VLPS LLS3 VLLSO VLLS1 VLLS2 VLLS3 RUN 32MHz MRB KWO1 WAIT STOP VLPR 4 MHz VL RTC PW VLPS LLS VLLS1 VLLS3 RUN 48MHz TWR K21D50M WAIT STOP VLPR 4 MHz VL RTC SW1 PW VLPS LLS VLLSO VLLS1 VLLS2 VLLS3 RUN 48MHz TWR K21F120M WAIT STOP VLPR 4 MHz VL RTC SW3 PW VLPS LLS VLLSO VLLSI VLLS2 VLLS3 RUN 120MHz TWR K22F120M WAIT STOP VLPR 4 MHz VL RTC SW1 PW VLPS LLS3 VLLSO VLLSI VLLS2 VLLS3 RUN 80MHz H SRUN 120MHz TWR K24F120M WAIT STOP VLPR 4 MHz VL RTC SW2 PW VLPS LLS VLLSO VLLS1 VLLS2 VLLS3 RUN 120MHz TWR K60D100M WAIT STOP VLPR 4 MHz VL RTC SW1 PW VLPS LLS VLLS1 VLLS2 VLLS3 RUN 96MHz TWR K64F120M WAIT STOP VLPR 4 MHz VL RTC SW1 PW VLPS LLS VLLSO VLLS1 VLLS2 VLLS3 RUN 120MHz TWR K65F180M WAIT STOP VLPR 4 MHz VL RTC SW3 PW VLPS LLS3 VLLSO VLL SI VLLS2 VLLS3 RUN 120M Hz HSRUN 180MHz TWR K80F150M WAIT STOP VLPR 4 MHz VL RTC SW3 PW VLPS LLS3 VLLSO VLL SI VLLS2 VLLS3 RUN 120M Hz HSRUN 150MHz Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 111 Getting Started TWR KL43Z48M WAIT STOP VLPR 2 MHz VL RTC SW2
32. De Of 10 11 ID Ox123Press any key to run again Kinetis SDK v 1 3 Demo Applications User s Guide 184 Freescale Semiconductor i Getting Started 44 4 3 2 FlexCAN network After connecting the two boards these instructions display on each terminal window One board must be chosen as node A and the other board as node B Data is sent continuously between the node A and the node B This message displays on the node A terminal kkkkkkkkixFlexCAN SCIZCAN demo xkikxixkxxx Message format Standard 11 bit id Message buffer 8 used for Rx Message buffer 9 used for Tx OSJTAG Port used for Serial Console Interrupt Mode Enabled Operation Mode TX and RX gt Normal Select local nodes as A or B Node A Data from Node B Data from Node B Data from Node B This message displays on the node B terminal kkkkkkkkixFlexCAN SCIZCAN demo xkxkkkikkikkk Message format Standard 11 bit id Message buffer 8 used for Rx Message buffer 9 used for Tx OSJTAG Port used for Serial Console Interrupt Mode Enabled Operation Mode TX and RX gt Normal Select local nodes as A or B Node B Data from Node A Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 185 AN A Getting Started Kinetis SDK v 1 3 Demo Applications User s Guide 186 Freescale Semiconductor Chapter 45 FlexlO simulated I2C Example with other methods 451 Overview The FlexIO 12C example application demonstrates the FlexIO s
33. Freescale Tower System modules are supported by the SPI SDCard example e TWR K22F120M e TWR K24F120M e TWR KV31F120M 71 3 System Requirement 71 3 1 Hardware requirements J Link ARM e P amp E Micro Multi link universal e Mini micro USB cable e USB A to micro AB cable e Hardware tower base board TWR MEM board for specific device e Personal Computer 71 3 2 Software requirements e The project files are in lt SDK_Install gt examples lt board gt driver_examples spi_sdcard lt toolchain gt e Library dependencies ksdk platform lib 714 Getting Started 71 4 1 Hardware settings The SPI SDCard Example project does not require any special hardware configurations Although not required the recommendation is to leave the development board s jumper settings and configurations in Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 285 an eseua OO Getting Started default state when running this example If there is not any built in SDCard slot on the board the TWR MEM Tower System module is required to run this example 71 4 2 Prepare the example pa Connect a USB cable between the PC host and the OpenSDA USB port on the board 2 Open a serial terminal with these settings e 115200 baud rate e 8 data bits e No parity e One stop bit e No flow control Download the program to the target board 4 Either press the reset button on your board or launch the de
34. Generate 10 number Get random data No O 75128ccd Get random data No l f3bc5f99 Get random data No 2 fe50a8bc Get random data No 3 4737e46d Get random data No 4 9f8bb4a8 Get random data No 5 cadfd781 Get random data No 6 a8263a08 Get random data No 7 3fed8d88 Get random data No 8 c2826970 Get random data No 9 2715eb04 Press any key to continue Kinetis SDK v 1 3 Demo Applications User s Guide 258 Freescale Semiconductor Chapter 65 RTC Example 65 1 Overview The RTC Example project is a demonstration program that uses the KSDK software to get set RTC time and alarm time The RTC module is configured to use as an alarm clock e Set alarm date time it should be later than the initial date time e Start RIC When the RTC date time matches the alarm date time an indicated LED should be turned on 65 2 Supported Platforms These Freescale Freedom development platforms and Tower System modules are supported by the RTC example e FRDM K22F e FRDM K64F e FRDM KLO3Z e FRDM KL25Z e FRDM KL26Z e FRDM KL27Z e FRDM KL43Z e FRDM KL46Z e FRDM KW24 e FRDM KW40Z e MRB KWOL TWR K21D50M TWR K21F120M TWR K22F120M TWR K24F120M e TWR K60D100M TWR K64F120M TWR K65F180M TWR K80F150M e TWR KL25Z48M e TWR KL43Z48M e TWR KW24D312 e USB KW40Z Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 259 7838585355 Getting Started 65 3 System Requirement 65 3 1 Hardware requ
35. Guide 226 Freescale Semiconductor Chapter 54 Low Power Serial Communication Interface LPSCI Example with Other Methods 541 Overview This LPSCI example application demonstrates the SDK Peripheral drivers working with different methods The LPSCI example shows transmit receive LPSCIs driver with other efficiencv methods e Using blocking method e Using non blocking method e Using Dma blocking method e Using Dma non blocking method e Using polling method The board transfers and receives characters through the LPSCI interface Tvpe characters on the kevboard and the board receives and echoes them on the terminal screen Look for instructions output to the terminal 54 22 Supported Platforms These Freescale Freedom development platforms and Tower Svstem modules are supported bv the LPSCI example e FRDM KLOZZ x DMA not supported e FRDM KL25Z x DMA not supported e FRDM KL26Z e FRDM KL46Z e MRB KWOL e TWR KL25Z48M x DMA not supported 54 3 System Requirement 54 3 1 Hardware requirements J Link ARM e P amp E Micro Multi link universal e Mini micro USB cable e USB A to micro AB cable e Hardware tower base board for specific device e Personal Computer Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 227 AR M I Getting Started 54 3 2 Software requirements e The project files are in lt SDK_Install gt examples lt board gt driver_ex
36. I2C0_SCL J2 Pin 20 gt DC1 SCL J4 Pin 12 ID2C0 SDA J2 Pin 18 gt DC1 SDA J4 Pin 10 GND J2 Pin 14 gt GND J2 Pin 14 Freescale Freedom FRDM KL02Z FRDM KL02Z Two Boards Master Board 1 Connects To Slave Board 2 Pin Name Board Location Pin Name Board Location I2C0_SCL J7 Pin 10 gt I2C0_SCL J7 Pin 10 PCO SDA JTPin9 gt I2CO_SDA J7 Pin 9 GND J7 Pin 7 gt GND J7 Pin 7 Freescale Freedom FRDM KL25Z The board doesn t support external pull up resistors for I2C pins So the internal pull up resistors is enable for I2C pins However the resistor is quite huge 20KOhm SOKOhm The I2C may run FAIL in high baurate In this case user need to use external pull up resistors FRDM KL25Z Single Board Master Connects To Slave Pin Name Board Location Pin Name Board Location D2C0 SCL JIO Pin6 gt I2C1_SCL J10 Pin 12 ID2C0 SDA J10 Pin 8 gt DC1 SDA J10 Pin 10 FRDM KL25Z Two Boards Master Board 1 Connects To Slave Board 2 Pin Name Board Location Pin Name Board Location I2CO_SCL J10 Pin 6 gt I2C1_SCL J10 Pin 12 PCO SDA J10 Pin 8 gt DC1 SDA J10 Pin 10 GND J9 Pin 14 gt GND J9 Pin 14 Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 73 Getting Started Freescale Freedom FRDM KL26Z The board doesn t support external pull up resistors for I2C pins So the internal pull up r
37. IRENE 238 Chapter 57 LTC AES Example STA ININ a APELO SPO IES TRO SORO TOE SPE SPE SM SS SE RY 239 57 2 Supported Platforms 4 sa 4 432 aaa a a da ae a ka a os 239 57 3 System Requirement aa 239 S73 Hardware re uirements lt lt s ere 239 Fiada Software requirements coco RARA 239 57 4 G tting Started gt o lt s sa ele AR boe a Oe E Avia a GOR Oe aow D 239 57 4 1 Hardware Settings oo e per a a e SOR ES ka a 8 a GS 239 57 4 2 Prepare be example o s osos o e a OR UO a e e a aO 239 57 4 3 BICIS si dd de 4824 ek e a ks 240 Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor XXV Section number Title Page Chapter 58 MMAU Example 58 1 RICE o a ece a HBSS HHS L RSM 8 243 58 2 Supported Platforms 243 58 3 System Requirement 243 58 3 1 Hardware requirements co sg Re we RR ERE RS 243 58 4 Getting Started aaa ee 243 58 4 1 Hardware Settings o lt c cro ke a CREE RS RR RR A Vr do 243 58 4 2 Prepare Mis exams ca 3 arana la 3 a ce dok hoko kja i kok lka ee a 243 58 4 3 R n the SNS lt lt a skua a a ao sara asked arbaj 244 Chapter 59 MPU Example 59 1 CINES cw e p ee Ore a a dea oe Te da amp Se Brae amp Oe B 245 59 2 Supported Platforms sss 245 59 3 System Requirement 245 59 3 1 Hardware requirements 3 8 cionado ksa beda a 245 3932 Software requiremen
38. K24F120M e TWR K60D100M TWR K64F120M TWR K65F180M e TWR KM34Z75M e TWR KV31F120M e TWR KW24D512 64 3 System Requirement 64 3 1 Hardware requirements J Link ARM P amp E Micro Multi link universal e Mini micro USB cable e USB A to micro AB cable e Hardware tower base board for specific device e Personal Computer Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 257 E Getting Started 64 3 2 Software requirements e The project files are in lt SDK_Install gt examples lt board gt driver_examples rnga lt toolchain gt e Library dependencies ksdk platform lib 64 4 Getting Started 64 4 1 Hardware settings The RNGA Example project does not call for any special hardware configurations Although not required the recommendation is to leave the development board s jumper settings and configurations in default state when running this example 64 4 2 Prepare the example Connect a USB cable between the PC host and the OpenSDA USB port on the board Open a serial terminal with these settings e 115200 baud rate e 8 data bits e No parity e One stop bit e No flow control 3 Download the program to the target board 4 Either press the reset button on your board or launch the debugger in your IDE to begin running the example N 64 4 3 Run the example These instructions are displayed shown on the terminal window RNGA Peripheral Driver Example Generate 10 random numbers
39. KL26Z e FRDM KL27Z e FRDM KL43Z e FRDM KL46Z e FRDM KVIOZ e FRDM KV31F e FRDM KW24 e FRDM KW40Z e MRB KWOL TWR K21D50M TWR K22F120M TWR K24F120M e TWR K60D100M TWR K64F120M TWR K65F180M TWR K80F150M e TWR KM34Z75M e TWR KL25Z48M e TWR KL43Z48M e TWR KV10Z32 e TWR KV11Z75M e TWR KV31F120M Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 179 AR Getting Started e TWR KW24D312 e USB KW40Z_KW40Z 43 3 System Requirement 43 3 1 Hardware requirements J Link ARM P amp E Micro Multi link universal e Mini micro USB cable e USB A to micro AB cable e Hardware tower base board for specific device e Personal Computer 43 3 2 Software requirements e The project files are in lt SDK_Install gt examples lt board gt driver_examples flash lt toolchain gt e Library dependencies ksdk_platform_lib 43 4 Getting Started 43 4 1 Hardware settings The FLASH Example project does not call for any special hardware configurations Although not required the recommendation is to leave the development board s jumper settings and configurations in default state when running this example 43 4 2 Prepare the example 1 Connect a USB cable between the PC host and the OpenSDA USB port on the board 2 Open a serial terminal with these settings e 115200 baud rate e 8 data bits e No parity e One stop bit e No flow control 3 Download the program to the target board 4 Either press the
40. Location Pin Name Board Location MISO J1 pin 10 gt MISO JI pin 8 MOSI JI pin 8 gt MOSI J1 pin 10 SCK JI pin 12 gt SCK J1 pin 12 PCSOO J1 pin 6 gt PCSOO J1 pin 6 GND JI pin 14 gt GND JI pin 14 FRDM K64F Master Board Connects To Slave Board Pin Name Board Location Pin Name Board Location MISO J2 pin 10 gt MISO J2 pin 8 MOSI J2 pin 8 gt MOSI J2 pin 10 SCK J2 pin 12 gt SCK J2 pin 12 PCSOO J2 pin 6 gt PCSOO J2 pin 6 GND J2 pin 14 gt GND J2 pin 14 FRDM KV31F Master Board Connects To Slave Board Pin Name Board Location Pin Name Board Location MISO J2 pin 10 gt MISO J2 pin 8 Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 165 Getting Started MOSI J2 pin 8 gt MOSI J2 pin 10 SCK J2 pin 12 gt SCK J2 pin 12 PCSOO JI pin 15 gt PCSOO JI pin 15 GND J2 pin 14 gt GND J2 pin 14 TWR K21F 120M Master Board Connects To Slave Board Pin Name Board Location Pin Name Board Location MISO Primary Elevator gt MISO J20 pin 21 All MOSI J20 pin 21 gt MOSI Primary Elevator All SCK J20 pin 19 gt SCK J20 pin 19 PCSOO J20 pin 17 gt PCSOO J20 pin 17 GND Primary Elevator gt GND Primary Elevator B2 B2 TWR K21D50M amp TWR K22F120M amp TWR K24F120M amp TWR K64F120M amp TWR KV10Z32 amp TWR KV31F120M amp TWR KW24D512 Mas
41. Make these connections between the FlexIO pins and LPUART pins by using external wires FRDM KL43Z FlexIO Pins Connects To LPUART Pins Pin Name Board Location Pin Name Board Location PTD5 FLEXIO PI J2 12 gt LPUARTI Rx J2 20 N5 PTD4 FLEXIO PI J2 6 gt LPUARTI Tx J2 18 N4 FRDM KL27Z FlexIO Pins Connects To LPUART Pins Pin Name Board Location Pin Name Board Location PTD5 FLEXIO PI Jl 11 gt LPUARTI Rx J3 3 N5 PTD4 FLEXIO PI J1 9 gt LPUARTI Tx J3 1 N4 TWR K80F150M Because LPUARTI is used as debug console so LPUARTO is used in the example FlexIO Pins Connects To LPUART Pins Pin Name Board Location Pin Name Board Location PTB11 FLEXIO_P B69 gt LPUARTO Rx A41 IN5 PTB10 FLEXIO P B70 gt LPUARTO Tx A42 IN4 Kinetis SDK v 1 3 Demo Applications User s Guide 206 Freescale Semiconductor Getting Started TWR KL43Z48 FlexIO Pins Connects To LPUART Pins Pin Name Board Location Pin Name Board Location PTD5 FLEXIO PI Primary Elevator gt LPUARTI Rx TWR KL43Z48M N5 B39 J15 14 PTDO FLEXIO PI Primary Elevator gt LPUARTI Tx Primary Elevator N4 B59 B47 49 4 2 Prepare the example Connect a USB cable between the PC host and the OpenSDA USB port on the board 2 Insert the Tower System module into the TWR ELEV 3 Open a serial terminal with these settings e 115200 baud ra
42. OpenSDA USB port on the board 2 Open a serial terminal with these settings e 115200 baud rate e 8 data bits e No parity e One stop bit e No flow control 3 Download the program to the target board 4 Either press the reset button on your board or launch the debugger in your IDE to begin running the demo For detailed instructions see a Kinetis SDK User s Guide for your board 21 5 2 Network Configuration Configure the IP address of PC network adapters as shown e 192 168 2 100 21 6 Run the demo Download the program to the target board Connect the Ethernet cable between the PC and the board When successfully connected reset the board to run the demo Open the command window on PC type in ping 192 168 2 102 to test whether the lwIP is running If it is running use an external echo tool to perform the echo request This tool sends AUN Kinetis SDK v 1 3 Demo Applications User s Guide 94 Freescale Semiconductor Run the demo TCP packets to the board and checks whether the content sent back from board is the same A similar tool named echotool can be downloaded from the http banskv net echotool example echotool 192 168 2 102 p tcp r 7 d hello 6 If the operation is successful all packets sent back are same as the packets sent to the board Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 95 Run the demo Kinetis SDK v 1 3 Demo Applications User s Guide 96
43. SDK or different RTOSes 20 1 Overview This is a Ping Demo on the IwIP TCP IP stack which uses the ICMP protocol The application on board periodically sends the ICMP echo request to a PC and processes the PC reply Type the ping board_ address in the PC command window to send an ICMP echo request to the board The IwIP stack sends the ICMP echo reply back to the PC 20 2 Supported RTOS e Freescale MQX RTOS e FreeRTOS e uC OS II e UC OS MI e Bare Metal no RTOS 20 3 Supported Hardware These Freescale Freedom development platforms and Tower Svstem modules are supported bv the KSDK Ping demo e FRDM K64F e TWR K60D100M e TWR K64F120M e TWR K65F180M 20 4 System Requirement 20 4 1 Hardware requirements e J Link ARM e P amp E Micro Multi link universal e Mini micro USB cable e USB A to micro AB cable e Hardware tower base board for specific device e Personal Computer Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 91 Run the demo 20 4 2 Software requirements e The project files are in Baremetal SDK Install examples xboard demo apps lwip lwip ping demo ping bm lt toolchain gt RTOS lt SDK_Install gt examples lt board gt demo_apps lwip lwip_ping_demo ping_rtos lt rtos gt lt toolc e Library dependencies Baremetal FreeRTOS uC OS ksdk platform lib MQX RTOS mqx board mqx stdlib board 20 5 Getting Started See the
44. SI o 150 Chapter 36 CMT Example 36 1 A AA a eS ee Be LL 153 36 2 Supported Platforms s s 153 36 3 System Requirement s s 153 36 3 1 Hardware requirements o sa cs askas 4 vua ku a k 4 eS a aos 153 36 3 2 Software reguirements oc u s a ia a al AAA luo a Ga 153 36 4 Getting Started aaa aa ea a aa OR kokleo ok e kom e kok aea 153 36 4 1 Hardware settings o su e KR ien a e RR A A ee RA 153 36 4 2 Prepare iS Grate s 8 a o kla 3 843 OR KE RR BOR 8 ADA RON 154 36 4 3 Ron theecxample s o eci ke E EERE A IRA Ra aa Vu 3 da ea 154 Chapter 37 COP Example 374 E Jj TT EETETETETTETTTR 155 37 2 Supported Platforms s s s 155 37 3 System Requirement 155 37 3 1 Hardware requirements lt c c sas hea Se aa 155 pIE Software requirements 2 5 5 e 05 ka cear ea 3 kon a je dee a koe a eS 153 37 4 EINE III 156 37 4 1 Hardware setings oo ec a caj eoo Oa RR ERE ER 156 37 4 2 Prepare the example osorno ala o alas 156 37 4 3 Ron SSS ss ke e ee e TA Pe dj 156 Chapter 38 DAC Example 38 1 A ERE EEE REE AEE DH ED a HOR GDH i ky kusas 157 Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor xvii Section number Title Page 38 2 Supported PISTA OR SEA KA KEE A SS 157 38 3 System Requirement 157 38 3 1 Hardware requirements 3 sro re Si e o
45. To Slave Board Pin Name Board Location Pin Name Board Location I2C0_SCL J1 16 gt I2C0_SCL J1 16 ID2C0 SDA J2 13 gt I2CO_SDA J2 13 GND J2 14 gt GND J2 14 FRDM KV10Z Master Board Connects To Slave Board Pin Name Board Location Pin Name Board Location I2CO_SCL J2 Pin 13 gt I2C0_SCL J2 Pin 13 mBCO SDA JI Pin15 gt PCO SDA JI Pin15 GND J2 Pin 14 gt GND J2 Pin 14 TWR KV11Z75M The board doesn t support external pull up resistors for I2C pins So the internal pull up resistors is enable for I2C pins However the resistor is quite huge 20KOhm SOKOhm The 12C may run FAIL in high baurate In this case user need to use external pull up resistors Slave Board Connects To Master Board Kinetis SDK v 1 3 Demo Applications User s Guide 66 Freescale Semiconductor Getting Started Pin Name Board Location Pin Name Board Location I2CO SCL Primarv Elevator gt I2CO SCL Primarv Elevator A7 AT DC0 SDA Primary Elevator gt DC0 SDA Primarv Elevator A8 A8 GND Primary Elevator gt GND Primary Elevator A6 A6 16 4 2 Terminal configuration Configure the PC host serial console as shown e 115200 baud rate e 8 data bits e No paritv e One stop bit e No flow control 16 4 3 Run the demo Connect the I2C slave board to the master board using the connections listed above Power on the I2C slave board Download and run the i2c comm sl
46. XXIX Section number Title Page 68 4 Getting Ao a 1 ao o ewe a ae a ao o A Sie ao a oj Deal 269 68 4 1 Hardware settings a sedo a dodo ao neko lo he a Aw me er Cokes dem 269 68 4 2 Prepare Tie example a o se we a RR RA AA RE S 269 68 4 3 Bie i lt e a ao ae eaj ekla ke a e REE AA AA KON Ow e 270 Chapter 69 Smart Card Example 69 1 ee E 271 69 2 Supported Platforms s s 271 69 3 System Requirement s s 271 69 3 1 Hardware requirements coords or pik saka ku 271 69 3 2 SoftWare POQUINGIMCNIS u s a 4a 47a ao 4 alo RARA A a aea 271 69 4 Getting Siarlol kar sa 5 ea os aa e ack kokon ok e kok e kok a 272 69 4 1 Hardware settings o so sj KR a B 272 69 4 2 Prepare tbheexample lt lt 8 a p kva EES e Qi RE He Oe i KE OR DADA BW 272 69 4 3 Ron theecxample o scos RR RA A GRA ARCA ua ba 212 Chapter 70 SPI Example with other methods 70 1 E J III 275 70 2 Supported Platforms s s s s 275 70 3 System Requirement 275 70 3 1 Hardware requirements lt is sas hea Se we sda ka a a lu ka kase eka SS 215 70 3 2 Software TEQUIESMIS S x 2 5 5 e 05 eG eK es 3 kon a EE koe a Se 276 70 4 EINEN sa ske be oe bos gie hoe Goo SK ki koks 276 70 4 1 Hardware setings oo ecc oc po eoo lao RRR kk laj o laj ERR ERE RS 276 70 4 2 Prepare the example 226 bs a ss 6 ea a a kom a kou a koe okok a eS 219 70
47. a Change of Thermistor Voltage If a user places a finger on a thermistor its temperature increases The temperature rise results in a voltage decrease across the resistor If the user removes the finger the temperature decreases and the voltage goes up A simple differentiators are used to detect a voltage change The filtered thermistor voltage is stored in a buffer The buffer size is defined by the BUFF SIZE The differentiator calculates a difference between an actual voltage sample and a sample delayed by i delay pointer which points to the buffer delta rtl rtl filt rtl filt buff i delay If the voltage across the thermistor decreases the differentiator returns a negative value If the voltage increases the differentiator returns a positive value If there is no change in voltage the deviator output returns zero The bigger the slope of voltage increase decrease the more positive negative value the differ entiator returns The lab application uses this information to detect if the finger is placed on the particular thermistor or if the finger was removed Placing removing a finger on the thermistor is characterized by a certain slope rate of voltage decrease increase The application defines positive and negative thresholds for each thermistor If a difference output exceeds threshold limits for at least three consequent samples an action is taken and a corresponding LED starts to flash Kinetis SDK v 1 3 Demo Applications User
48. board gt demo_apps power_manager_hal_ demo lt toolchain gt e Library dependencies ksdk platform lib 254 Getting Started 25 4 1 Hardware Settings The demo does not require any special hardware configurations Although not required the recommen dation is to leave the development board jumper settings and configurations in default state when running this demo 25 4 2 Prepare the Demo Follow the instructions in Getting Started with Kinetis Software Development Kit KSDK to e Set up hardware connections e Configure a Terminal session e Build and download application to targeted devices Note The demo is configured to work with the Terminal baudrate at 9600 bps When running the demo unplug all debugger devices For the MRB KWOL it is necessarv to connect on the J8 pins 2 3 25 4 3 Run the demo 1 Press the reset button on the hardware 2 A control menu is displayed on the Terminal window Note that the list on the menu is not the same for all platforms Kinetis SDK v 1 3 Demo Applications User s Guide 108 Freescale Semiconductor AS A Getting Started It depends on the list of supported low power modes For example on the TWR K64F120M this menu displays HHHHEHEHEEEEEEE Power Manager Demo Core Clock 48000000Hz SMC mode kStatRun Select the desired operation Press A for enter RUN Normal RUN mode Press B for enter Wait Wait mode Press C for enter Stop Stop mode Press D for ente
49. demo application in the KSDK package If everything goes well you should see values of several variables in the variable watch grid in the bottom area of the main FreeMASTER window Click the Oscilloscope item in the project tree on the left side and see the graphical representation of the selected variables Troubleshooting If problems exist with the freemaster demo application try to start with the simplest hello world example and a console terminal application to verify whether the serial line communication works well The most Kinetis SDK v 1 3 Demo Applications User s Guide 42 Freescale Semiconductor ii FreeMASTER Demo User s Guide tvpical reason whv FreeMASTER cannot communicate with the board is a wrong COM port selected on the host PC or a wrong UART port selected on the target processor side or a bad communication speed Getting more information The FreeMASTER is a versatile and powerful tool in which you can create your own interactive graphical monitors and control panels for any embedded application To understand how to use all FreeMAST ER features scripting and communication options see a User s Guide included with the FreeMASTER installation package The target side communication driver is further described in a User Manual included in the official distribution of the FreeMASTER Serial Driver which is a separately downloadable package available at http www freescale com freemaster Kinetis SDK v 1 3 Demo Applica
50. demo displavs those characters Notice 1 This example has no anv code to change clock settings or svstem run mode To change the svstem or QSPI clock settings copv the code which changed clock settings or run mode from the QSPI memory to RAM first 2 For the QSPI alias demo running in Keil copy the bss and RW part from the QSPI flash to RAM at startup before calling the main function Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 53 AN A Getting Started Kinetis SDK v 1 3 Demo Applications User s Guide 54 Freescale Semiconductor Chapter 15 Hardware Timer Demo This demo application demonstrates using the hardware timer driver 151 Overview The Hardware Timer project is a demonstration program to show how to use the Hardware Timer driver A Hardware Timer interrupt is created and fires multiple times until it reaches the requested number 15 2 Supported Platforms These Freescale Freedom development platforms and Tower System modules are supported by the Kinetis SDK Hardware Timer demo e FRDM K22F e FRDM K64F e FRDM KLO2Z e FRDM KLO3Z e FRDM KL25Z e FRDM KL26Z e FRDM KL27Z e FRDM KL43Z e FRDM KL46Z e FRDM KVIOZ e FRDM KV31F e FRDM KW24 e FRDM KW40Z e MRB KWOL TWR K21D50M TWR K21F120M TWR K22F120M TWR K24F120M e TWR K60D100M TWR K64F120M TWR K65F180M TWR K80F150M e TWR KL43Z48M e TWR KM34Z75M e TWR KV10Z32 e TWR KV11Z75M e TWR KV31F120M e TWR KW24D512
51. demonstration program that uses the KSDK software This example plays back a period of sound stored in the Flash This example involves four methods e Using the master interrupt e Using the master DMA e Using the slave interrupt and slave DMA 46 2 Supported Platforms These Tower System modules are supported by the FlexIO I2S example e TWR KL43Z48M e TWR K80F150M 46 3 System Requirement 46 3 1 Hardware requirements J Link ARM P amp E Micro Multi link universal e Mini micro USB cable e USB A to micro AB cable e TWR SGTL5000 board e Headphone e Hardware Tower System base board for specific device e Personal Computer 46 3 2 Software requirements e The project files are in lt SDK_Install gt examples lt board gt driver_examples flexio i2s lt toolchain gt e Library dependencies ksdk platform lib 46 4 Getting Started 46 4 1 Hardware settings This example requires connecting the FLEXIO pins with the SAI pins so that the I2S signals can route to the TWR SGTL5000 Tower System module Connect FlexIO pins to the SAI pins Note that the default Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 191 To Getting Started uses the FlexIO pin0 pin3 Flexio Pins Connects To SAI Pins Flexio Pin0 gt SAI TxData Flexio Pinl gt SAI RxData Flexio Pin2 gt SAI SCLK Flexio Pin3 gt SAI FS Make these connections between the FlexIO pins and SAI p
52. dependencies ksdk platform lib 13 4 Getting Started 13 4 1 Hardware Settings 13 4 2 Prepare the Demo 1 Connect a USB cable between the PC host and the OpenSDA USB port on the board 2 Open a serial terminal with these settings e 115200 baud rate e 8 data bits e No parity e One stop bit e No flow control 3 Download the program to the target board 4 Either press the reset button on your board or launch the debugger in your IDE to begin running the demo For detailed instructions see the appropriate board User s Guide 13 5 Run the demo This is an example how to run the demo Kinetis SDK v 1 3 Demo Applications User s Guide 48 Freescale Semiconductor AS Communication Interface Settings Hello World 13 6 Communication Interface Settings This part provides the information to customize the Hello World demo The Hello World demo is config ured to use these port pins for the platforms by default If applicable for the board jumpers are specified to select between serial output via OpenSDA and serial output via TWR SER Platform TX MCU Pin Board RX MCU Pin Board Module Instance Pin Pin FRDM K22F PTEO N A PTEI N A UARTI FRDM K64F PTB17 N A PTB16 N A UARTO FRDM KL26Z PTA2 J1 4 PTAI 1 2 LPSCIO FRDM KL46Z PTA2 J1 4 PTAI 1 2 UARTO FRDM KW24 PTEO N A PTEI N A UARTI MRB KWO1 PTA2 PTAI LPSCIO TWR K22F1
53. division and square root operations and typical C functions 24 2 Supported Platforms This demo supports the following Tower System module and Freedom development platforms e FRDM KVIOZ e TWR KV10Z32 e TWR KV11Z75M 24 3 System Requirement 24 3 1 Hardware requirements e J Link ARM e P amp E Micro Multi link universal e Mini micro USB cable e USB A to micro AB cable e Hardware tower base board for specific device e Personal Computer 24 3 2 Software requirements e The project files are in lt SDK_Install gt examples lt board gt demo_apps mmdvsq_demo lt toolchain gt e Library dependencies ksdk_platform_lib 24 4 Getting Started 24 4 1 Prepare the Demo 1 Connect a USB cable between the PC host and the OpenSDA USB port on the board 2 Open a serial terminal with these settings e 115200 baud rate e 8 data bits Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 105 Run the demo e No parity e One stop bit e No flow control 3 Download the program to the target board 4 Either press the reset button on your board or launch the debugger in your IDE to begin running the demo For detailed instructions see a Kinetis SDK User s Guide for your board 24 5 Run the demo This is an example serial terminal output MMDVSQ Demo start C library calculation takes 622 tickcycles MMDVSQ t calculation takes 521 tickcycles MMDVSQ Demo end The tickcycles are used as a reference Ki
54. examples lt board gt demo_apps web_hvac lt rtos gt lt toolchain gt Where lt rtos gt is one of the supported RTOSes e Library dependencies Baremetal FreeRTOS uC OS ksdk platform lib MQX RTOS mqx board mqx stdlib board 32 4 3 Software requirements e The project files are in lt SDK_Install gt examples lt board gt demo_apps web_hvac lt toolchain gt e Library dependencies ksdk platform lib 32 5 Getting Started 32 5 1 Prepare the Demo 1 Connect a USB cable between the PC host and the OpenSDA USB port on the board 2 Open a serial terminal with the following settings e 115200 baud rate e 8 data bits e No parity e One stop bit e No flow control 3 Download the program to the target board 4 Either press the reset button on your board or launch the debugger in your IDE to begin running the demo For detailed instructions steps see a Kinetis SDK User s Guide for your board 32 5 22 Network Configuration Configure the IP address of PC network adapters as shown IP address 192 168 2 100 Subnet Mask 255 255 255 0 32 5 3 Run the demo 1 Download the program to the target board which should be installed in Tower System or Freescale Freedom 2 Connect the Ethernet cable between the PC and the board When successfully connected reset the board to run the demo 4 Open the PC command window type in ping 192 168 2 102 to test whether IwIP stack is running LI Kinetis SDK v 1 3
55. f ka do a OE KSEE SE KER EER PER bu 168 KIES sss S 3a dda ibda 3 la kd kz das a ESS AS 168 Kinetis SDK v 1 3 Demo Applications User s Guide xviii Freescale Semiconductor Section number Title Page Chapter 41 EDMA Example 41 1 55 a 71 o ci a AAA A ARCA ARA ANA 173 41 2 Supported Platforms 173 41 3 System Requirement s s 173 41 3 1 Hardware requirements 4 4 cus a ue ak 374 ka a e kok kok kok ER 173 41 3 2 Software requirements 3 sv sc va hoe Eee ASE ESE Ee ua ekde as 174 41 4 Getting Started cocos i ees eau kia aos a a sm kokon a kos 174 41 4 1 Hardware DANINO o pota roedor a a e do i bok kk i kok kea co dis 174 41 4 2 Prepare the example lt e 49 3 ag sil ie b a ARA RAR ARA doro 174 41 4 3 Run VIES o a ae d EG ao KO dri A ALS o oY 174 Chapter 42 EWM Example 42 1 A oj eda OS a e Se Oe ko eo 177 42 2 Supported Platforms oca HR EH A A BENS 177 42 3 System Requirement 177 42 3 1 Hardware requirements a 3 sa ea SRK e e poa ia E AR SS 177 42 3 2 POMAR requirements o 3 so icca ea pd dee deb de 24 esos 178 42 4 Getting Started o s s kwa kwa o a ER OA REA EER ko o RU RRS 178 42 4 1 Hardware AA o os cori ras p oe ee ok So kea o kok sek ee 178 42 4 2 PEE tat example se vj a Vuk SO a a ed a ku a Be a S 178 42 4 3 KIE NE dona A o due e oe E KE e SPA Bre Bey 178 Chapter 43 FLASH Example 43 1 Sv a ARSE y
56. frequency monitoring e Use a signal generator to input one sine waveform signal e g Amplitude 500 mV Offset O mV Frequency 50 Hz to AFE channel 2 The frequency value is captured by the freq tmr variable on the debug console The AC signal frequency ranges between about 25 Hz 1000 Hz The rec ommended input value is the 50 Hz for the grid frequency simulation The printed log is displayed in the terminal window as shown below value ch2 Oxffbe5eb0 value_ch3 0x13d28 freq tmr 50 0 value_ch2 Oxffbe56ea Kinetis SDK v 1 3 Demo Applications User s Guide 14 Freescale Semiconductor AS ii Getting Started value ch3 0x15a3e freq tmr 49 975 value ch2 Oxffbe5567 value ch3 0x15893 freq tmr 50 1 Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 15 AN A Getting Started Kinetis SDK v 1 3 Demo Applications User s Guide 16 Freescale Semiconductor Chapter 5 BLDC Sensorless Demo This demo application demonstrates the software portion hardware chip independent of the 16 bit imple mentation of a sensorless three phase brushless DC BLDC motor control application The demo supports both IAR and KEIL versions 5 1 Overview The BLDC sensorless Control Demo project is a demonstration program that uses the KSDK software The application software uses the concept of an isolated algorithm software and hardware This software approach enables easy porting of an application to other devices or
57. leave the development board jumper settings and configurations in default state Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 45 8858583838 aa Getting Started when running this demo 12 4 22 Prepare the Demo Use default jumper settings on TWR KV10Z32 Ensure that the J21 2 3 is short J22 2 3 is short JI1 1 2 is short 3 4 is short J12 12 is short 3 4 is short On TWR KV11Z75M Ensure that the J19 2 3 is short J20 2 3 is short JO 1 2 is short 3 4 is short J7 1 2 is short 3 4 is short 1 Connect a USB cable between the PC host and the OpenSDA USB port on the board 2 Open a serial terminal with these settings 115200 baud rate e 8 data bits e No parity e One stop bit e No flow control 3 Download the program to the target board 4 Either press the reset button on the board or launch the debugger in the IDE to begin running the demo For detailed instructions see the appropriate board User s Guide 12 4 3 Run the demo jua Download and run the ftm_pdb_adc code on the board 2 Terminal prints this message Run PDB trig ADC with FlexTimer demo and Input any character to start demo 3 Input a character to the serial terminal which has 256 lines of information for the ADC conversion result 4 Input any character to the serial terminal The process repeats again Kinetis SDK v 1 3 Demo Applications User s Guide 46 Freescale Semiconductor Chapter 13 Hello Worl
58. not use the Kinetis device s hardware floating point when using the CMSIS DSP library 28 4 2 Hardware Settings These Tower System modules are required to run the sai_demo e TWR ELEV except for the TWR K24F120M e TWR AUDIO SGTL except TWR K24F120M which has a built in one 28 4 3 Prepare the Demo 1 Connect a USB cable between the PC host and the OpenSDA USB port on the board 2 Open a serial terminal with these settings e 115200 baud rate e 8 data bits e No parity e One stop bit e No flow control 3 Download the program to the target board 4 Either press the reset button on your board or launch the debugger in your IDE to begin running the demo For detailed instructions see a Kinetis SDK User s Guide for your board 28 5 Run the demo To hear the audio playback connect a set of headphones to the headphone output on the TWR AUDIO SGTL card For input to the codec connect an audio source to the Line In on the TWR AUDIO SGTL When the demo starts this message is displayed in the terminal output window Audio Demo Press spacebar to start demo Demo begin Kinetis SDK v 1 3 Demo Applications User s Guide 124 Freescale Semiconductor Run the demo The user can either plav back audio from the line in source or plav a wav file stored in the Flash The line in option plavs the audio gathered from the codec line in for approximatelv 15 seconds Select plaver 1 Line In Plavback 2 Wav File Plavback
59. of the Jumper 2 on the board for TWR K60D100M e the pin 6 of the J25 connector on the board for FRDM KW40Z 3 Open a serial terminal with these settings e 115200 baud rate e 8 data bits e No parity e One stop bit e No flow control 4 Download the program to the target board 5 Either press the reset button on your board or launch the debugger in your IDE to begin running the example 36 4 3 Run the example These instructions are displayed shown on the terminal window CMT Initialize finished Start carrier modulation 16 bit data carrier modulation finished Stop carrier modulation The output waveform of the carrier modulated data can be seen on the oscilloscope The example modulates the two bytes 0x15 0x24 Verify the waveform on the oscilloscope e waveform data 1010100000100100 e bit one is with 10 microsecond high time period e bit zero is with the 1 microsecond high time period add 9 microsecond low time period To easily capture the signal there are two notifications 1 For only two bytes to transmit we should use trigger to capture the output signal 2 Set the voltage range to 1 volt k60d100m or 0 5 volt kw40z and adjust the scale to make the smallest time unit to about 40 us Kinetis SDK v 1 3 Demo Applications User s Guide 154 Freescale Semiconductor Chapter 37 COP Example 37 1 Overview The COP Example project is a demonstration program that uses the KSDK software to enable Watchdog and co
60. ow 2 0 Te Oa a ee a i ee ae S A 187 Supported Platforms sss os 187 System Requirement s s 187 Hardware requirements 3 kk Sa FS TA SAS d A 3813 40a 3a da SS 187 e gt a oo ab ea poa ek ox ERK EEK voe ko a SORES 187 CTS Started es zs sio seo sr ksa kiu kku ka e k i bu ki ku uu 187 Hardware settings o o sad ak ka ed DR a e A i Va 8 ERR a ES 187 Prepare Mis EKAMIS o so la mi or BS dk hoko kja i kok kazan ca dis 189 Ron IS ENS ss 4 us 8 a a a a ao sara a ked ad 189 Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor Section number Title Page Chapter 46 Flexio I2S Example with other methods 46 1 APRIL jj 191 46 2 Supported Platforms 191 46 3 System Requirement s s 191 46 3 1 Hardware requirements 4 uc a pm av k 373 48 ave kok kk kok ka 191 46 3 2 Software requirements 3 sasa sa ca eH ua 4 aa 4 oris e a 4 e als 191 46 4 Getting Started lt oc oco coc i ees eau kia avos a a gm kokon ess 191 46 4 1 Hardware PAN o pota Gee OO OS dok kak Re keke AS 191 46 4 2 Prepare the example lt e o ccc i aoe sil ikel a e RA ee dora 193 46 4 3 Run VIES KA p e a akoo KG ako o Se Side li dreed SA rs SEMO 193 Chapter 47 FlexIO IRDA Example 474 INKON E oj eda OS a e Se Bp ko a Da 195 47 2 Supported Platforms 6 i ae ia Ba o o BERS 195 47 3 System Requirement 195
61. reset button on your board or launch the debugger in your IDE to begin running the example Kinetis SDK v 1 3 Demo Applications User s Guide 180 Freescale Semiconductor AS A Getting Started 43 4 3 Run the example These instructions are displayed shown on the terminal window Flash Example Start Flash Information Total Flash Size 1024 KB Hex 0x100000 Flash Sector Size 4 KB Hex 0x1000 There is no D Flash FlexNVM on this Device There is no Enhanced EEPROM EEE on this Device Flash is UNSECURE Erase a sector of flash successfully Erased Sector 0xfa000 gt 0xfb000 Program a buffer to a sector of flash successfully Programmed and Verified Location Oxfa000 gt Oxfa080 Flash Example End for TWR KM34Z75M These instructions are displayed shown on the terminal window Flash Example Start Flash Information Total Flash Size 256 KB Hex 0x40000 Flash Sector Size 2 KB Hex 0x800 There is no D Flash FlexNVM on this Device There is no Enhanced EEPROM EEE on this Device Flash is UNSECURE Erase a sector of flash Successfully Erased Sector 0x3d000 gt 0x3d800 Program a buffer to a sector of flash Successfully Programmed and Verified Location 0x3d000 gt 0x3d080 Flash Example End Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 181 AN A Getting Started Kinetis SDK v 1 3 Demo Applications User s Guide 182 Freescale Semiconductor Chapter 44 F
62. s Guide Freescale Semiconductor 137 AN A Getting Started Kinetis SDK v 1 3 Demo Applications User s Guide 138 Freescale Semiconductor Chapter 32 Heating Ventilating and Air Conditioning on IwIP TCP IP Stack This demo application demonstrates the Heating Ventilating and Air Conditioning demo on IwIP TCP IP stack with different RTOSes 32 1 Overview This is simulation of HVAC system with web server using IwIP TCP IP stack on different RTOSes The user uses an Internet browser to send a request for connection to set up HVAC system on board The board acts as an HTTP server and sends a Web page back to the PC The user also can directly set up desired temperature by pressing switches on board and observe LEDs status 32 2 Supported RTOS e Freescale MQX RTOS e FreeRTOS e C OS II e C OS III 32 3 Supported Hardware These Freescale Freedom development platforms and Tower System modules are supported by the Kinetis SDK web_hvac demo e FRDM K64F e TWR K60D100M e TWR K64F120M e TWR K65F180M 32 4 System Requirement 32 4 1 Hardware requirements e J Link ARM e P amp E Micro Multi link universal e Mini micro USB cable e USBA to micro AB cable e Hardware tower base board for specific device e Personal Computer Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 139 EEE TET III Getting Started 32 4 2 Software requirements e The project files are in lt SDK_Install gt
63. software and PIT to cause the LED to blink with different frequencies on multiple channels Measure the time of the generated pulse with the oscilloscope on the LEDI and the LED2 The LED2 toggles two times faster than the LEDI 61 2 Supported Platforms These Freescale Freedom development platforms and Tower System modules are supported by the PIT example e FRDM K22F e FRDM K64F e FRDM KL25Z e FRDM KL26Z e FRDM KL27Z e FRDM KL43Z e FRDM KL46Z e FRDM KV31F e FRDM KW24 e FRDM KW40Z TWR K21D50M TWR K21F120M TWR K22F120M TWR K24F120M e TWR K60D100M TWR K64F120M TWR K65F180M TWR K80F150M e TWR KL25Z48M e TWR KL43Z48M e TWR KM34Z75M e TWR KV31F120M e TWR KW24D312 e USB KW40Z Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 249 AR Getting Started 61 3 System Requirement 61 3 1 Hardware requirements J Link ARM P amp E Micro Multi link universal e Mini micro USB cable e USB A to micro AB cable e Hardware tower base board for specific device e Personal Computer 61 3 2 Software requirements e The project files are in lt SDK_ Install gt examples lt board gt driver_examples pit lt toolchain gt e Library dependencies ksdk platform lib 61 4 Getting Started 61 4 1 Hardware settings The PIT Example project does not call for anv special hardware configurations Although not required the recommendation is to leave the development board s jumper settings and configura
64. volatile information memorv region Flash Erase bv block or sector including margin read options Programming region defined bv user Flash verifv support Flash Swap if supported on the device To ensure that other demos aren t affected erase the chip to ensure the successful execution of the demos l IA LI Lk 10 2 Supported Platforms These Freescale Freedom development platforms and Tower System modules are supported by the KSDK Flash demo Platforms with SWAP feature e TWR K21D50M e TWR K21F120M e TWR K24F120M TWR K60D100M FRDM K64F TWR K64F120M e TWR K65F180M Platforms without SWAP feature e FRDM K22F Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 35 A System Requirement e FRDM K64F e FRDM KLO2Z e FRDM KLO3Z e FRDM KL25Z e FRDM KL26Z e FRDM KL27Z e FRDM KL43Z e FRDM KL46Z e FRDM KV10Z e FRDM KV31F e FRDM KW24 e FRDM KW40Z e MRB KWOL e TWR K22F120M e TWR K60D100M e TWR K80F150M e TWR KL43Z48M e TWR KM34Z75M e TWR KV10Z32 e TWR KV11Z75M e TWR KV31F120M e TWR KW24D512 e USB KW40Z 10 3 System Requirement 10 3 1 Hardware requirements J Link ARM P amp E Micro Multi link universal e Mini micro USB cable e USB A to micro AB cable e Hardware tower base board for specific device e Personal Computer 10 3 2 Software requirements e The project files are in this location lt SDK_Install gt examples lt board gt demo_apps flash_
65. volumeCtrl user input data from terminal menu Returns status t Return kStatus Success if function completed successfully return kStatusFail if function failed Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 127 TTS Kev Functions snd status t stream audio dsp types t dspType uint8 t volumeCtrl Plavs a stream of audio Kinetis SDK v 1 3 Demo Applications User s Guide 128 Freescale Semiconductor Kev Functions Parameters dspType Used to select one DSP function to perform on the data volumeCtrl Value used to set decibel level on codec Returns Returns soundcard status snd status t get wav data wave file t xwaveFile Collects data from WAV file header Parameters waveFile Data structure of pcm data array Returns status t Return kStatus Success if function completed successfully return kStatusFail if function failed snd status t play wav uint32 t xpcmBuffer uint8 t volumeCtrl Plays the PCM audio data from the WAV format array Parameters pcmBuffer Pointer to data array containing WAV formatted audio data volumeCtrl Value used to set decibel level on codec Returns status t Return kStatus Success if function completed successfully return kStatusFail if function failed void send wav uint8 t dataBuffer uint32 t length sai data format t dataFormat Sends audio data to the sound card Kinetis SDK v 1 3
66. 0Z e FRDM KV31F e FRDM KW40Z e MRB KWOL TWR K21D50M TWR K21F120M TWR K22F120M TWR K24F120M e TWR K60D100M TWR K64F120M TWR K65F180M TWR K80F150M e TWR KL43Z48M e TWR KV10Z32 e TWR KV11Z75M e TWR KV31F120M 38 3 System Requirement 38 3 1 Hardware requirements e J Link ARM e P amp E Micro Multi link universal e Mini micro USB cable Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 157 Getting Started e USB A to micro AB cable e Hardware tower base board for specific device e Personal Computer 38 3 2 Software requirements e The project files are in lt SDK_Install gt examples lt board gt driver_examples dac lt toolchain gt e Library dependencies ksdk_platform_lib 38 4 Getting Started 38 4 1 Hardware settings The DAC Example project does not call for any special hardware configurations Although not required the recommendation is to leave the development board s jumper settings and configurations in default state when running this example 38 4 2 Prepare the example 1 Connect a USB cable between the PC host and the OpenSDA USB port on the board 2 Open a serial terminal with these settings e 115200 baud rate e 8 data bits e No parity e One stop bit e No flow control 3 Download the program to the target board 4 Either press the reset button on your board or launch the debugger in your IDE to begin running the example 38 4 3 Run the example These inst
67. 1 3 Demo Applications User s Guide 146 Freescale Semiconductor Chapter 34 AFE Example 34 1 Overview The AFE Example project is a demonstration program that uses the KSDK software In this example the AFE module samples the voltage difference of the EXT SD ADPO and EXT SD ADM0 pins 34 2 Supported Platforms This Tower System module is supported by the AFE example e TWR KM34Z75M 34 3 System Requirement 34 3 1 Hardware requirements J Link ARM USB A to USB Mini B cable e Hardware tower base board for specific device e Personal Computer e DC Power Supply 34 4 Getting Started 34 4 1 Hardware settings This example requires one board and one DC Power Supply Connect the DC Power Supply output signals to AFE differential sample pins Board Connects To DC Power Supply EXT SD ADPO D Power Positive end EXT SD ADMO gt Power Negative end Make these connections between the board and DC Power Supply by using external wires TWR KM34Z75M Board Connects To DC Power Supply Pin Name Board Location DC Power Supply connection ends Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 147 Getting Started Pin 45 of QFP144 J31 Pin2 gt DC Power Supply Positive end AFE SDADPO Pin 46 of QFP144 J31 Pin4 gt DC Power Supply Negative end AFE_SDADMO 34 4 2 Prepare the example Connect a USB cable between the PC h
68. 159 AR AAA Getting Started 39 3 2 Software requirements e The project files are in lt SDK_Install gt examples lt board gt driver_examples dma lt toolchain gt e Library dependencies ksdk platform lib 394 Getting Started 39 4 1 Hardware settings The DMA Example project does not call for any special hardware configurations Although not required the recommendation is to leave the development board s jumper settings and configurations in default state when running this example 39 4 2 Prepare the example 1 Connect a USB cable between the PC host and the OpenSDA USB port on the board 2 Open a serial terminal with these settings e 115200 baud rate e 8 data bits e No parity e One stop bit e No flow control 3 Download the program to the target board 4 Either press the reset button on the board or launch the debugger in the IDE to begin running the example 39 4 3 Run the example These instructions are displaved shown on the terminal window DMA EXAMPLE Requesting channel 0 to transfer data from address 0x37ec to 0x1fffe018 Starting transfer data Transferred with DMA channel No 0 successful Press any key to start transferring data with another channel Type characters from the keyboard and the board transfers data by using a different channel number of supported channels depends on each DMA instance These instructions are displayed shown on the terminal window Requesting channel 1 to transfer data fro
69. 2 Pin 14 TWR KV11Z75M The board doesn t support external pull up resistors for I2C pins So the internal pull up resistors is enable for I2C pins However the resistor is quite huge 20KOhm SOKOhm The I2C may run FAIL in high baurate In this case user need to use external pull up resistors Master Board Connects To Slave Board Pin Name Board Location Pin Name Board Location DC0 SCL Primary Elevator gt DC0 SCL Primary Elevator AT A7 DC0 SDA Primary Elevator gt DC0 SDA Primarv Elevator AS AS GND Primary Elevator gt GND Primary Elevator A6 A6 52 4 2 Prepare the example 1 Connect a USB cable between the PC host and the OpenSDA USB port on the board 2 Open a serial terminal with these settings e 115200 baud rate e 8 data bits e No parity e One stop bit e No flow control 3 Download the program to the target board 4 Either press the reset button on your board or launch the debugger in your IDE to begin running the Kinetis SDK v 1 3 Demo Applications User s Guide 222 Freescale Semiconductor AS A Getting Started example 52 4 3 Run the example 52 4 3 1 12C blocking These instructions are displayed shown on the terminal window On Master board MM I2C MASTER BLOCKING 1 Master sends a frame includes CMD size of data and data 2 Master receives data from slave 3 Compare rxBuff and txBuff to see result Pres
70. 20M PTEO J30 PTEI J29 UARTI TWR K64F120M PTC4 J15 PTC3 J10 UARTI TWR K80F150M PTCA J8 PTC3 J6 UARTI TWR KV31F120M PTB17 323 PTB16 J22 UARTO TWR KW24D512 PTEO J18 2 PTEI J18 5 UARTI TWR K21F120M PTD8 PTD9 UARTI TWR K21F120M PTD8 PTD9 UARTI TWR KM34Z75M PTI6 UART2_RX PTI7 UART2_TX UART2 USB KW24D512 N A N A USB CDC Virtual COM FRDM KV31F PTB17 N A PTB16 N A UARTO FRDM KV10Z PTB17 N A PTB 16 N A UARTO TWR KV11Z75M PTB17 J505 PTB16 J506 UARTO USB KW40Z K22F N A N A USB CDC Virtual COM USB KW40Z PTC7 N A PTC6 N A UARTO Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 49 Communication Interface Settings Kinetis SDK v 1 3 Demo Applications User s Guide 50 Freescale Semiconductor Chapter 14 Hello World QSPI Demo 14 1 Overview The Hello World QSPI demo project is a demonstration program that uses the KSDK software This demo shows how to boot from QSPI region and the QSPI alias region if supported This example can generate two different demos using a different linker file and a startup file e Progrom boot from QSPI region e Program boot from QSPI alias region If the chip support QSPI alias region 14 2 Supported Platforms These Tower System modules and Freescale Freedom platforms are supported by the Hello World QSPI demo e TWR K80F150M 14 3 System Requirement 14 3 1 Hardware requirements J Link ARM P amp E Micro Multi link universal e Mini
71. 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F Slave example is running 70 4 3 2 SPI non blocking Master Slave Set up the Slave first and then the slave board echoes on the terminal Kinetis SDK v 1 3 Demo Applications User s Guide 280 Freescale Semiconductor AS Getting Started SPI board to board non blocking example This example runs on instance 0 Be sure master s SPIO and slave s SPIO are connected Slave example is running Master sends an array to slave receives the array back from the slave and compares whether the two buffers are the same The master board prints to the terminal SPI board to board non blocking example This example runs on instance 0 Be sure master s SPIO and slave s SPIO are connected Baud rate in Hz is 500000 Master transmits 00 01 02 03 04 05 06 07 08 09 OA OB OC OD OF 10 11 12 13 14 15 16 17 18 19 1A IB IC 1D 1E 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E Master receives 00 01 02 03 04 05 06 07 08 09 OA OB OC OD OE 10 11 12 13 14 15 16 17 18 19 1A 1B IC 1D IE 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D ZE 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E WHR O Ti WNHRO Ti SPI master transfer succeed Press any key to run again The slave board receives and prints to the terminal Slave receives 00 01 02 03 04 05 06 07 08 09 OA OB OC 0D OE OF 10 11 12 13 14 15 16 17 18 19 1A 1B IC 1D IE I
72. 24 Pin 14 gt GND J24 Pin 14 MRB KWO1 Master Board Connects To Slave Board Pin Name Board Location Pin Name Board Location PTCI 2C1 SCL J15 Pin 13 gt PTCI I2C1 SCL J15 Pin 13 PTC2 12C1 SDA J15 Pin 11 gt PTC2 2C1_SDA J15 Pin 11 GND J14 Pin 18 gt GND J14 Pin 18 TWR K21D50M amp TWR K22F120M amp TWR_K24F120M amp TWR KV31F120M amp TWR KL43Z48M amp TWR KV31F120M Master Board Connects To Slave Board Pin Name Board Location Pin Name Board Location PTE24 2C0 SCL Primary Elevator b PTE24 12C0_SCL Primary Elevator A7 AT PTE25 22CO SDA Primary Elevator gt PTE25 2C0 SDA Primarv Elevator A8 A8 GND Primary Elevator gt GND Primary Elevator A6 A6 TWR KM34Z75M Master Board Connects To Slave Board Pin Name Board Location Pin Name Board Location PTD7 2C0_SCL J10 Pin 1 gt PTD7 I2CO SCL J10Pin 1 PTEO I2CO SDA J11 Pin 1 gt PTE0 I2CO SDA J11 Pin 1 GND J25 Pin 26 gt GND J25 Pin 26 Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 219 Getting Started TWR KV10232 The board doesn t support external pull up resistors for I2C pins So the internal pull up resistors is enable for I2C pins However the resistor is quite huge 20KOhm SOKOhm The I2C may run FAIL in high baurate In this case user need to use external pull up resistors
73. 3 23 33 is 04 05 06 07 08 09 OA OB OC OD OE OF 14 15 16 17 18 19 1A IB IC 1D IE IF 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F running 70 4 3 4 SPI DMA non blocking Master Slave Set up the Slave first and then the slave board echoes on the terminal SPI board to board DMA non blocking example This example runs on instance 0 Be sure master s SPIO and slave s SPIO are connected Slave example is running Master sends an array to the slave receives the array back from the slave and compares whether the two buffers are the same The master board prints to the terminal SPI board to board DMA non blocking example This example runs on instance 0 Be sure master s SPIO and slave s SPIO are connected Baud rate set to 500000 Hz Master transmits 03 13 23 33 03 13 23 00 01 02 10 11 12 20 21 22 30 31 32 Master receives 00 01 02 10 11 12 20 21 22 30 81 32 33 04 05 06 07 08 09 OA OB OC OD OE 14 15 16 17 18 19 1A IB IC ID IE 24 25 26 27 28 29 2A 2B 2C 2D 2E 34 35 36 37 38 39 3A 3B 3C 3D 3E Gi IO MD 7 04 05 06 07 08 09 OA OB OC OD OE 14 15 16 17 18 19 1A IB IC ID IE 24 25 26 27 28 29 2A 2B 2C 2D 2E 34 35 36 37 38 39 3A 3B 3C 3D 3E NRO 3 SPI master transfer succeeded Press any key to run again The slave board receives and prints to the terminal Slave receive 00 01 02 10 11 12 20 21 22 30 31 32 Slave example 03 13 23 33 is 04 0
74. 3 Download the program to the target board 4 Either press the reset button on your board or launch the debugger in your IDE to begin running the example 70 4 3 Run the example 70 4 3 1 SPI blocking Master Slave Set up the Slave first The Slave board must be powered up first and then it echoes on the terminal SPI board to board blocking example This example run on instance 0 Be sure master s SPIO and slave s SPIO are connected Slave example is running Master sends an array to slave receives the array back from slave and compares whether the two buffers are the same The master board prints to the terminal SPI board to board blocking example This example runs on instance 0 Be sure master s SPIO and slave s SPIO are connected Baud rate in Hz is 500000 Master transmits 00 01 02 03 04 05 06 07 08 09 OA OB OC 0D OE 10 11 12 13 14 15 16 17 18 19 TA 1B IC 1D 1E 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E Master receives 00 01 02 03 04 05 06 07 08 09 OA OB OC OD OE 10 11 12 13 14 15 16 17 18 19 1A 1B IC 1D IE 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E w o H O Ti to Bo be ce 1 SPI master transfer succeed Press any key to run again The slave board receives and prints to the terminal Slave receives 00 01 02 03 04 05 06 07 08 09 OA OB OC OD OE OF 10 11 12 13 14 15 16 17 18 19 1A 1B IC 1D IE IF 20 21 22 23
75. 3 4 2 Prepare the example lt e e ccc ou aoe i aei a ARA RA a vana AR 144 33 4 3 Run VIES o a ae d a EG KG Ro Se Hi Sed f DE Go A 9 144 Chapter 34 AFE Example 34 1 INKON IE lj dra a a e Se Oe Uh a VJ 147 34 2 Supported Platforms 6 446 dao Sao sa Dao a A a o BERS 147 34 3 System Requirement 147 34 3 1 Hardware requirements gt 3 a Dos ROK SEK SEK ERS REO REED bos 147 34 4 Getting Started cl sss kiss ERE RES ERE ASS ka e kus SE ks bu Eks is 147 34 4 1 Hardware setings o a ea poao a pi RE RR RS AAA 147 34 4 2 Frepare this EXAMBIE ca ts A ook Ok a Gok g ako an a 148 34 4 3 Ron SC GANS sss ia ag A RNA AR aca RE 148 Chapter 35 CMP Example 35 1 OVOIVIOW ss ks nia EEE kou praa EER ku u va kus e ku uu apu 149 35 2 Supported Platforms sss 149 35 3 System Requirement e jp la e da a oda a os 149 ao l Hardware requirements nk 2 a ako ao koi eo lo e o la 149 ka e MO SOLONO EAN s 9 ee ae Se we Ge te Se es BO Be Ae Sew Ba 149 35 4 GettingStartd ee ee e 150 Kinetis SDK v 1 3 Demo Applications User s Guide Xvi Freescale Semiconductor Section number Title Page 35 4 1 Hardware DEIT A vo a a La ae eko e o eko ok we Ge 150 35 4 2 Hardware settings zo a seke conec eko be mova a Aw me kejo kobeo dun a 150 35 4 3 Prepare be example a en ek eo aR RRR RE RARA UTA SES 150 35 4 4 Rini IIO i a a a oko eal ke klakoj e a e O l e dl A ER
76. 379 gt 7108872 8868840 7328872 10342644 7522936 10021506 gt 7690160 8162831 gt 7834256 6390892 gt 7960504 6233630 gt 8071352 7746287 gt 8164600 9461846 gt 8235752 9712938 gt 8282400 8134287 gt 8306680 5992130 gt 8313568 5043834 8306552 5955090 2 8284592 7700647 gt 8243112 8488467 gt 8178136 Kinetis SDK v 1 3 Demo Applications User s Guide 102 Freescale Semiconductor Getting Started 7374730 gt 8089872 5114698 gt 7982520 3482901 2 7860496 3675087 7724496 5231628 2 7570944 6452309 7395344 5928792 2 7196520 3814157 2 6977928 1685767 6744864 TIZ25013 6500072 2293441 gt 6241728 3788057 5965592 3906151 5669400 2180158 5355528 200227 2 5029528 1458963 gt 4695840 832815 gt 4354552 741949 gt 4002104 1473959 3635312 331515 gt 3255072 2027032 2866400 3845491 gt 2474776 3851097 2082080 72400263 1685776 71156602 1282080 15891289 870256 3656810 gt 454176 5828926 39720 6479050 369624 5340656 gt 775008 3748612 gt 1180296 343583I 1587688 4971342 gt 1994856 7246945 2396160 8474926 gt 2786856 E1793983 3166504 6060970 3538512 5049184 gt 3906232 587 9437 gt 4269112 7993407 gt 4622392 9660172 gt 4960608
77. 4 3 EMIO AA o Se See oe enc Se See Te Gp het Ge ee f Ba Be eS Se mG 295 74 4 3 1 UART Oc hk he a he do Sr i He do de See R 3 295 74 4 3 2 UART WO CIS o soo e ee Ba o dea Re Se KS 295 74 4 3 3 UART DMA blocking L A a aso Hh ke l au o ke u ko ORR au o OK du edu Ew 3 295 74 4 3 4 UART DMA non blocking o o o do ro me ado BH ee ee FO a e e s 295 74 4 3 5 VART polline sss BeOS ee Sead wee li klad A kuj 296 Chapter 75 WDOG Example 754 III a A AN a ek a ao Sa don e eno ao See RS 297 75 2 Supported Platforms sss 297 75 3 System Requirement ss os 297 75 34 Hardware TOQUIESIED S seco 297 Tida Software requirements coco RARA 298 75 4 Getting Started aaa ea b kva aka ko we Oe A Oe bi B 298 75 4 1 Hardware Settings sop e per ie ER ee A 3 298 75 4 2 Prepare be Ea s o e Je e Bee OR poke UO aa EERE RSE DS 298 75 4 3 Ri ee L K 298 Kinetis SDK v 1 3 Demo Applications User s Guide xxxii Freescale Semiconductor Chapter 1 Introduction Kinetis SDK KSDK includes applications which provide examples that show how to use KSDK drivers This document describes the applications and provides instructions to configure each application if avail able The document also describes the required hardware setup and steps to run the applications For the latest version of this and other Kinetis SDK documents see the Kinetis SDK homepage www freescale com ksdk Kinetis SDK v 1 3 Demo Applic
78. 47 3 1 Hardware requirements o ss ree seepe SEK SRK va ee koe RE A 195 47 4 Golfine Started L l i RE ERE RES EREASS ka e koe ko kku is a 195 47 4 1 Hardware SEER coso a gos aj kok OA aj ka Rew kla AAA 195 47 4 2 Prepare tbe Demo mj ara ee ee NN 196 47 5 Ron the d m o eci eg uo 4 eh hed hehe ee eR a 197 47 5 1 OA Options eo ORK EK OR DOK A KER EES 197 Chapter 48 FlexIO simulated SPI Example with other methods 48 1 A os ss I sa OS OO o HRS Re RS Re 4a 199 48 2 Supported Platforms 45 464464546 6 Dew EK EH Cw la o RES 199 48 3 System Requirement 199 48 3 1 Hardware requirements o a 3 aea bee a e SKE OK Ee ore boo SS 199 48 3 2 Software requirements s s oc caaea 34 dar ad a 3 2 A ea oak SS 199 Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor XXI Section number Title Page 48 4 Getting A A noe ee a ao AU le o o DES 200 48 4 1 Hardware settings a sodo a koda ao neko e oko l a Aw me kejo ebe as de S 200 48 4 2 POBRE TI example ao a Ua A a RR RO AA RUTA S 202 48 4 3 Rim theexample a a aroko a RRA E a le eae du KN SU CS 202 Chapter 49 FlexIO simulated UART Example with other methods 49 1 Ss so rs ee E ee gee LLLLL Sn 205 49 2 Supported Platforms 205 49 3 System Requirement s 205 49 3 1 Hardware requirements o sa ss ase a 4 vua ku a k 4 BARES ku 205 49 3 2 Software POQUINGMCNIS
79. 5 06 07 08 09 OA OB OC OD DE OF 14 15 16 17 18 19 1A IB IC 1D IE IF 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F running Kinetis SDK v 1 3 Demo Applications User s Guide 282 Freescale Semiconductor AS Getting Started 70 4 3 5 SPI polling Master Slave Set up the slave first and then the slave board echoes to the terminal SPI board to board polling example This example run on instance 0 Be sure master s SPIO and slave s SPIO are connected Slave example is running Master sends an array to the slave receives the array back from the slave and compares whether the two buffers are the same The master board prints to the terminal SPI board to board polling example This example run on instance 0 Be sure master s SPIO and slave s SPIO are connected Baud rate in Hz is 500000 Master transmits 00 01 02 03 04 05 06 07 08 09 0A OB OC OD OE OF 10 11 12 13 14 15 16 17 18 19 1A 1B IC 1D IE IF 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D ZE 2F 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F Master receives 00 01 02 03 04 05 06 07 08 09 OA OB OC OD OE OF 10 11 12 13 14 15 16 17 18 19 1A IB IC 1D IE IF 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F SPI master transfer succeed Press any key to run again The slave board receives and prints on the terminal Slave receives 00 01 02 03 04 05 06 07 08 09 OA OB OC 0D OE OF 10 11 12 13 14
80. 6 16 16 16 2 2 2 2 R 025 025 TW 44 1 44 1 44 1 44 1 32 32 32 32 2 2 2 2 TW 44 1 44 1 44 1 44 1 32 32 32 32 2 2 2 2 TW 44 1 44 1 44 1 44 1 32 32 32 32 2 2 2 2 TW 44 1 44 1 44 1 44 1 32 32 32 32 2 2 2 2 TW 44 1 44 1 44 1 44 1 32 32 32 32 2 2 2 2 Kinetis SDK v 1 3 Demo Applications User s Guide 126 Freescale Semiconductor Kev Functions TW 44 1 44 1 11 11 16 16 16 16 2 2 2 2 R 025 025 K21 F120 M Quality differences of the wav playback depend on the size constraints of the target device the Flash size and the density of the code generated by the compiler Note that all supported platforms play audio from the line in option with the same quality 16 bit 44 1 kHz 2 channels 28 6 Key Functions void audio stream init void Initializes the I2S I2C and TWR AUDIO SGTL Tower System module for streaming audio from Line In void audio wav init wave file t xnewWav Initializes the I2S I2C and TWR AUDIO SGTL Tower System module for playing back WAV file in Flash Parameters newWav Pointer to wave file data structure uint32 t config volume sgtl handler t handler sgtl module t module uint32 t volume Ctrl Sets volume from the user input Parameters handler pointer to codec handler structure module name of module on codec to set the volume for
81. 98 Freescale Semiconductor Chapter 76 Revision Historv This table summarizes revisions to this document Revision historv 0 09 2015 Initial release Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 299 How to Reach Us Home Page freescale com Web Support freescale com support Document Number KSDK13DEMOUG Rev 0 09 2015 Information 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 rig
82. ARM P amp E Micro Multi link universal e Mini micro USB cable e USB A to micro AB cable e Hardware tower base board for specific device e Personal Computer 74 3 2 Software requirements e The project files are in SDK Install examples board driver examples uart Luse case gt lt toolchain gt e Library dependencies ksdk_platform_lib 74 4 Getting Started 74 4 1 Hardware settings The UART Example project does not require any special hardware configurations Although not required the recommendation is to leave the development board s jumper settings and configurations in default state when running this example 74 4 2 Prepare the example 1 Connect a USB cable between the PC host and the OpenSDA USB port on the board 2 Open a serial terminal with these settings e 115200 baud rate e 8 data bits e No parity e One stop bit e No flow control 3 Download the program to the target board 4 Either press the reset button on your board or launch the debugger in your IDE to begin running the example Kinetis SDK v 1 3 Demo Applications User s Guide 294 Freescale Semiconductor A A Getting Started 74 4 3 Run the example 74 4 3 1 UART blocking These instructions are displayed shown on the terminal window ttt UART Send Receive Blocking Example Type the characters on the keyboard and the board receives and then echoes them to terminal screen Type the characters on th
83. B s Multi block read write example passed SPI SD Card Demo End Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 287 AN A Getting Started Kinetis SDK v 1 3 Demo Applications User s Guide 288 Freescale Semiconductor Chapter 72 TPM Example 721 Overview The TPM Example project is a demonstration program that uses the KSDK software to generate square pulse PWM to control a LED brightness e TPM generate a PWM with increasing dutv cvcle and then decreasing e LED is firstly brighter and then dimmer continuously 72 2 Supported Platforms These Freescale Freedom development platforms and Tower System modules are supported by the TPM example e FRDM KLO2Z e FRDM KLO3Z e FRDM KL25Z e FRDM KL26Z e FRDM KL27Z e FRDM KL43Z e FRDM KL46Z e FRDM KW40Z e TWR KL43Z48M e USB KW40Z NOTE The TWR K65F180M does not have a suitable LED The PWM signal is connected to the elevator board connector B52 72 3 System Requirement 72 3 1 Hardware requirements J Link ARM P amp E Micro Multi link universal e Mini micro USB cable e USB A to micro AB cable e Hardware tower base board for specific device e Personal Computer 72 3 2 Software requirements e The project files are in lt SDK_Install gt examples lt board gt driver_examples tpm lt toolchain gt Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 289 AR A Getting Started e Library depende
84. CO_SDA J2 Pin 18 GND J2 Pin 14 gt GND J2 Pin 14 FRDM KLO2Z 8 FRDM KLO3Z Master Board Connects To Slave Board Pin Name Board Location Pin Name Board Location PTE3 12C0_SCL J7 Pin 10 gt PTE3 12C0_SCL J7 Pin 10 PTE4 12C0_SDA J7 Pin 9 gt PTE4 I2CO_SDA J7 Pin 9 GND J7 Pin 7 gt GND J7 Pin 7 FRDM KL25Z The board doesn t support external pull up resistors for I2C pins So the internal pull up resistors is enable for I2C pins However the resistor is quite huge 20KOhm SOKOhm The I2C may run FAIL in high baurate In this case user need to use external pull up resistors Master Board Connects To Slave Board Pin Name Board Location Pin Name Board Location gt gt gt FRDM KL26Z The board doesn t support external pull up resistors for I2C pins So the internal pull up resistors is enable for 2C pins However the resistor is quite huge 20KOhm SOKOhm The I2C may run FAIL in high baurate In this case user need to use external pull up resistors Master Board Connects To Slave Board Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 217 Getting Started Pin Name Board Location Pin Name Board Location PTE24 2C0 SCL J2 Pin 20 gt PTE24 12C0_SCL J2 Pin 20 PTE25 2C0_SDA J2 Pin 18 gt PTE25 2C0_SDA J2 Pin 18 GND J2 Pin 14 gt GND J2 Pin 14 FRDM KL27Z Master B
85. DC0 SDA J2 Pin 18 GND J2 Pin 14 gt GND J2 Pin 14 FRDM KW40Z Master Board Connects To Slave Board Pin Name Board Location Pin Name Board Location DCI SCL J25 Pin 10 gt I2C1_SCL J25 Pin 10 DCI SDA J25 Pin 12 gt DCI SDA J25 Pin 12 GND J24 Pin 14 gt GND J24 Pin 14 MRB KWO1 Master Board Connects To Slave Board Pin Name Board Location Pin Name Board Location I2CI SCL J15 Pin 13 gt I2C1_SCL J15 Pin 13 DCI SDA J15 Pin 11 gt DCI SDA J15 Pin 11 GND J14 Pin 18 gt GND J14 Pin 18 TWR K21D50M Master Board Connects To Slave Board Pin Name Board Location Pin Name Board Location I2C1_SCL Primary Elevator gt I2C1_SCL Primary Elevator A7 A7 I2C1_SDA Primary Elevator gt I2C1_SDA Primary Elevator AS AS GND Primary Elevator gt GND Primary Elevator A6 A6 Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 63 AR Getting Started TWR K22F120M TWR K24F120M TWR K60D100M 8 TWR KV31F120M Master Board Connects To Slave Board Pin Name Board Location Pin Name Board Location 12C0_SCL Primary Elevator gt I2CO SCL Primarv Elevator A7 A7 DC0 SDA Primary Elevator gt DC0 SDA Primary Elevator AS AS GND Primary Elevator gt GND Primary Elevator A6 A6 TWR K64F120M Master Board Connects To Slave Board Pin Name Board Location Pin Name Board Location DCI SCL Primary Elevator gt I2CI SCL Primarv Elevator A75 A75 I2C1_
86. Demo Applications User s Guide 140 Freescale Semiconductor AS A Getting Started 5 Input 192 168 2 102 in the URL of an Internet browser on a PC If successful the web page which the board returns opens in the browser 6 In the browser click on HVAC Status option to observe the current information on the target board 7 In the browser Selected Change Settings option input new setting then click Set button the browser loads the status page If successful the desired temperature changes to a new setting and the actual temperature increases decreases until it reaches desired temperature e Change the desired temperature to a greater value and HVAC mode to Heat the actual temperature increases until it meet configured desired temperature e Change the desired temperature to a lower value and HVAC mode to Cool the actual tem perature decreases until it meets the configured desired temperature 8 On the other hand the desired temperature can be changed by pressing the switches on board The LEDs if they exist on the board represent HVAC system s state e LEDI Simulate the Fan s state e LED2 System in the Heat mode e LED3 System in the Cool mode e LED4 Simulate the heart beat increase real temperature i e by hair dryer to see the LED4 go faster and decrease temperature to see it slow down Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 141 AN A Getting Started Kinetis SDK
87. Demo Applications User s Guide Freescale Semiconductor 129 Kev Functions Parameters pdataBuffer Pointer to data array containing WAV formatted audio data length length of WAV file to send dataFormat Point to audio data format t for sound card float32 t do fft sai data format t dataFormat uint8 t buffer float32 t fftData float32 t xfftResult Performs frequencv analvsis and finds fundamental frequencv of the PCM data Parameters dataFormat Pointer to audio data format structure buffer Pointer to data array to store modulated PCM data ffiData Pointer to data array for storing Fast Fourier Transform data JftResult Point to data array for storing real frequency bins from FFT Returns float32 t Returns fundamental frequency in Hz Kinetis SDK v 1 3 Demo Applications User s Guide 130 Freescale Semiconductor Chapter 29 SLCD basic testing and an Guess Number game This demo application does SLCD basic testing and demonstrates usage of SLCD APIs in a guess number game 291 Overview The SLCD basic testing and an Guess Number game project is a demonstration program that uses the KSDK software It implements the following features e SLCD basic testing All numbers and icons are shown on the SLCD screen e A guess number game All numbers are shown on the SLCD screen e RNGA module is also used to generate random numbers 29 2 Supported Platforms
88. Demo Introduction e FreeMASTER Demo User s Guide Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 39 A naa FreeMASTER Demo Introduction 11 2 FreeMASTER Demo Introduction This section provides an introduction to the FreeMASTER Demo application Overview The FreeMASTER Demo application project shows how to integrate the Freescale FreeMASTER com munication driver into a KSDK based application The user should be able to use the FreeMASTER tool running on Host PC and connect it over a serial line CAN interface or BDM cable to this demo appli cation The demo pmp file can be opened in FreeMASTER tool project for a quick access to selected variables The variables can be monitored in a text grid or in a graph The user can also modify the values directly in the variable watch grid In addition to the variable monitoring the FreeMASTER tool can be used to build rich graphical control panels for any embedded application See more information on the FreeMASTER home page at http www freescale com freemaster Supported Platforms The FreeMASTER tool and the driver are two software packages distributed separately outside of KSD K This KSDK release contains a copy of FreeMASTER driver version 1 8 1 which supports the whole Kinetis K and Kinetis L families and other platforms The KSDK freemaster demo application has been tested with these boards The freemaster demo flexcan demo Supported Platforms
89. ER ES eka 225 53 4 1 Hardware NAA Ss SDA SIS VAS kk da ksa kaas ki kd sa Sa os 225 53 4 2 Prepare theexample o o ao ec kino ken tea GB pra 8 ela Ee A 225 53 4 3 AMIS ss kot hw eR Re RO kl a a a g 226 Chapter 54 Low Power Serial Communication Interface LPSCI Example with Other Methods 54 1 INKWIET III 227 54 2 Supported Platforms 227 54 3 System Requirement s s 227 54 3 1 PIR WATE requirem nts lt lt c o cce a oj ARRANCA 227 54 3 2 Software regtiremems 3 ss es 879 20574 a RR sx ara 228 54 4 Getting Started 2 6 ec ea am a e 90 ko o e ao l ao kl Bl koe HES 228 54 4 1 EIO A HEHE ORE HES DEA EES AES SERED ES 228 54 4 2 Prepare the example o is sis ad a eee a Goa a ES 228 54 4 3 pad c vak kubva eu p apa ex Pas ES RES 228 54 4 3 1 III lt lt Sla SI IIa Senka kea su Rae HES as 228 54 4 3 2 LPSCI non blocking o cin fea Sek ra PTA Bek wR Se Se OES ibus 228 54 4 3 3 LPSCI DMA blocking 3 5 sk 3 las ks kard eee bala OSE SS 229 54 4 3 4 LPSCI DMA non blocking 229 54 4 3 5 LPSCI PONG e ssp ee sse ss 4348 135 5 ESE 4 7 e BALA OOS 229 Chapter 55 LPTMR Example 55 1 CITI ara a e pra eaa e as wera Ke e p Oe e iu 231 55 2 Supported Platforms sse 231 55 3 System Requirement 232 55 3 1 Hardware requireme ts lt lt o 4 a a ar Qi RUE 8 AUA ki 4A BINJA RAS 232 am MO MP oftware req
90. Elevator NO B46 B11 PTD4 FLEXIO_PI Primary Elevator gt SPI1 MOSI Primary Elevator NI B48 B10 PTD2 FLEXIO PI Primary Elevator gt SPI1 SCK Primary Elevator N2 B45 B39 PTD4 FLEXIO_PI Primary Elevator gt SPI1 CSn Primary Elevator N3 B44 B59 FRDM KL27Z48M FlexIO Pins Connects To SPII Pins Pin Name Board Location Pin Name Board Location PTDO FLEXIO PI Jl 1 gt SPI1 MOSI J2 20 NO PTDI FLEXIO PI J1 3 gt SPI1 MISO J2 18 NI Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 201 Getting Started PTD2 FLEXIO PI Il 5 gt SPI SCK J1 11 N2 PTD3 FLEXIO PI Jl 7 gt SPH CSn J1 9 N3 TWR K80F150M FlexIO Pins Connects To DSPIO Pins Pin Name Board Location Pin Name Board Location PTBO FLEXIO_PI Primary Elevator gt DSPIO SDI Primary Elevator NO A38 B44 PTB1 FLEXIO_PI Primary Elevator gt DSPIO SDO Primary Elevator NI A37 B45 PTB10 FLEXIO P Primary Elevator gt DSPIO SCK Primary Elevator IN4 B70 B48 PTB11 FLEXIO_P Primary Elevator gt DSPIO PCSO Primary Elevator INS B69 B46 48 4 2 Prepare the example Connect a USB cable between the PC host and the OpenSDA USB port on the board 2 For TWR KL43Z48M insert the Tower System module into TWR ELEV 3 Open a serial terminal with these settings e 115200 baud rate e 8 data bits e No parity e One stop bit e No flow control 4 Download the program to the
91. F 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F Slave example is running 70 4 3 3 SPI DMA blocking Master Slave Set up the Slave first and then the slave board echoes on the terminal SPI board to board DMA blocking example This example run on instance 0 Be sure master s SPIO and slave s SPIO are connected Slave example is running Master sends an array to the slave receives the array back from the slave and compares whether the two buffers are the same The master board prints to the terminal SPI board to board DMA blocking example This example runs on instance 0 Be sure master s SPIO and slave s SPIO are connected Baud rate set to 500000Hz Master transmits Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 281 Getting Started 00 01 02 03 10 TE 12 13 20 21 22 23 30 31 32 33 Master receives 00 01 02 03 TO IL 12 13 20 21 22 23 30 31 32 33 04 05 06 07 08 09 OA OB OC OD OE 14 15 16 17 18 19 1A 1B 1C ID IE 24 25 26 27 28 29 2A 2B 2C 2D 2E 34 35 36 37 38 39 3A 3B 3C 3D 3E wue o Ti 04 05 06 07 08 09 OA OB OC OD OE 14 15 16 17 18 19 1A IB IC 1D IE 24 25 26 27 28 29 2A 2B 2C 2D 2E 34 35 36 37 38 39 3A 3B 3C 3D 3E w V H O i SPI master transfer succeed Press any key to run again The slave board receives and prints to the terminal Slave receives 00 01 02 10 11 12 20 21 22 30 31 32 Slave example 03 1
92. Freescale Semiconductor Chapter 22 UDP Echo Demo on IwIP TCP IP Stack This demo application demonstrates the UDP Echo demo on IwIP TCP IP stack with bare metal KSDK or different RTOSes 221 Overview This is a UDP echo demo on the IwIP TCP IP stack with bare metal KSDK or different RTOSes which uses the UDP protocol and acts as an echo server The application on board sends back the UDP packets from the PC which can be used to test whether the UDP connection is available 22 2 Supported RTOS e Freescale MQX RTOS e FreeRTOS e uC OS II e UC OS MI e Bare Metal no RTOS 22 3 Supported Hardware These Freescale Freedom development platforms and Tower System modules are supported by the KSDK UDP Echo demo e FRDM K64F e TWR K60D100M e TWR K64F120M e TWR K65F180M 22 4 System Requirement 22 4 1 Hardware requirements J Link ARM P amp E Micro Multi link universal e Mini micro USB cable USB A to micro AB cable e Hardware tower base board for specific device e Personal Computer Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 97 Run the demo 22 4 2 Software requirements e The project files are in Bare Metal lt SDK_Install gt examples lt board gt demo_apps lwip lwip_udpecho_demo udpecho _bm lt toolchain gt RTOS lt SDK_Install gt examples lt board gt demo_apps lwip lwip_udpecho_demo udpecho _rtos lt rtos gt lt toolchain gt e Library dependencies
93. Hardware settings The LPUART Example project does not call for any special hardware configurations Although not re quired the recommendation is to leave the development board s jumper settings and configurations in default state when running this example For TWR KM34Z75M 56 4 2 Hardware settings This example requires an extra USB TTL 3 3V transform board connected to the PC USB port TWR KM34Z75M Connects To USB TTL board TxD gt RxD RxD TxD GND gt GND Make these connections between the two boards by using external wires TWR KM34Z75M TWR KM34Z75M Connects To USB TTL board Pin Name Board Location Pin Name Board Location PTJ5 LPUARTO J14 Pin 1 gt RxD RxD TX PTJ6 LPUARTO_ J16 Pin 1 gt TxD TxD RX Kinetis SDK v 1 3 Demo Applications User s Guide 236 Freescale Semiconductor AS A Getting Started GND J25 Pin 26 gt GND GND 56 4 3 Prepare the example 1 Connect a USB cable between the PC host and the OpenSDA USB port on the board 2 Open a serial terminal with these settings e 115200 baud rate e 8 data bits e No parity e One stop bit e No flow control 3 Download the program to the target board 4 Either press the reset button on your board or launch the debugger in your IDE to begin running the example 56 4 4 Run the example For TWR KM34Z75M 1 Connect RxD TxD GND between Tower board and USB TTL bo
94. I2C slave board is on to indicate that the MCU is in sleep mode and no code is running Then the I2C slave board is woken up by the I2C address matching interrupt when the I2C master boards sends the proper address The LED on the I2C slave board is toggled during the data communication After power on the I2C master starts reading data from the I2C slave data buffer The I2C slave has sub addresses to access a specific byte of data on the slave board The master prints this data out via the serial terminal The master can then modify the data at a specific sub address on the slave board When the data is received the I2C slave changes the content at that requested sub address This change is reflected when the master reads the slave data buffer again 16 2 Supported Platforms These Freescale Freedom development platforms and Tower System modules are supported by the KSDK I2C Communication demo e FRDM K22F e FRDM K64F e FRDM KLO2Z e FRDM KLO3Z e FRDM KL25Z e FRDM KL26Z e FRDM KL27Z e FRDM KL43Z e FRDM KL46Z e FRDM KVIOZ e FRDM KV31F e FRDM KW24 e FRDM KW40Z e MRB KWOL TWR K21D50M TWR K21F120M TWR K22F120M TWR K24F120M e TWR K60D100M TWR K64F120M Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 59 AR Getting Started TWR K65F180M TWR K80F150M e TWR KL43Z48M e TWR KM34Z75M e TWR KV10Z32 e TWR KV11Z75M e TWR KV31F120M e TWR KW24D512 16 3 System Requirement 16 3 1 Hardwa
95. IL in high Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 74 Getting Started baurate In this case user need to use external pull up resistors FRDM KL43Z Single Board Master Connects To Slave Pin Name Board Location Pin Name Board Location I2CO_SCL J4 Pin 2 gt DC1 SCL J2 Pin 20 mBCO SDA J4 Pin4 gt DC1 SDA J2 Pin 18 FRDM KLA3Z Two Boards Master Board 1 Connects To Slave Board 2 Pin Name Board Location Pin Name Board Location I2CO_SCL J4 Pin 2 gt DC1 SCL J2 Pin 20 PCO SDA J4 Pin4 gt DC1 SDA J2 Pin 18 GND J2 Pin 14 gt GND J2 Pin 14 Freescale Freedom FRDM KL43Z The board doesn t support external pull up resistors for I2C pins So the internal pull up resistors is enable for I2C pins However the resistor is quite huge 20KOhm 50KOhm The I2C may run FAIL in high baurate In this case user need to use external pull up resistors FRDM KLA3Z Single Board Master Connects To Slave Pin Name Board Location Pin Name Board Location I2CO_SCL J4 Pin 2 gt DC1 SCL J2 Pin 20 ID2C0 SDA J4 Pin4 gt DC1 SDA J2 Pin 18 FRDM KLA3Z Two Boards Master Board 1 Connects To Slave Board 2 Pin Name Board Location Pin Name Board Location I2CO_SCL J4 Pin 2 gt I2C1_SCL J2 Pin 20 I2CO_SDA J4 Pin 4 gt DC1 SDA J2 Pin 18 GND J2 Pin 14 gt GND J2 Pin
96. Iw1P TCPIP Stack and Kinetis SDK Integration User s Guide document KSDKLWIPUG for instructions and requirements 20 5 1 Prepare the Demo 1 Connect a USB cable between the PC host and the OpenSDA USB port on the board 2 Open a serial terminal with these settings e 115200 baud rate e 8 data bits e No parity e One stop bit e No flow control 3 Download the program to the target board 4 Either press the reset button on your board or launch the debugger in your IDE to begin running the demo For detailed instructions see a Kinetis SDK User s Guide for your board 20 5 22 Network Configuration Configure the IP address of PC network adapters as shown e 192 168 2 100 20 6 Run the demo Download the program to the target board Connect the Ethernet cable between the PC and the board When successfully connected reset the board to run the demo Open the terminal Ping send and ping receive are successful Type in ping 192 168 2 102 in PC command window If the operation is successful four packets are successful replied ABWN I Kinetis SDK v 1 3 Demo Applications User s Guide 92 Freescale Semiconductor Chapter 21 TCP Echo Demo on IwIP TCP IP Stack This demo application demonstrates the TCP Echo demo on IwIP TCP IP stack with bare metal KSDK or different RTOSes 21 1 Overview This is a TCP echo demo on the lwIP TCP IP stack with bare metal KSDK or different RTOSes which uses the TCP protocol and
97. K stationerv project or reuse any other demo which works with your hardware Adding FreeMASTER to an existing project is very easy by adding relevant source files available in the demos freemaster demo src driver vl 8 folder Connecting with UART default Inspect the freemaster cfg h file to see the FreeMASTER configuration The serial line is enabled by default The default console port 1s used for communication with FreeMASTER PC Host tool Do not use the demo with a console terminal tools like with most of the other KSDK examples There are also other communications options available such as BDM or CAN interface See the user documentation for more information Running the FreeMASTER PC Host Tool Compile and download the program to a target board Connect serial cable to the PC host computer and start the FreeMASTER application installer available at http www freescale com freemaster Use the Start menu in the MS Windows environment to lookup the FreeMASTER launcher item It is recom mended that you also read the FreeMASTER user documentation available also in the Start menu group Using the FreeMASTER Demo project In the FreeMASTER tool main window press the Ctrl K key first to select the serial COM port which connects your host computer with the target board Select the 115200 as the default communication speed and press OK Use the Ctrl O to open the demo pmp project file The file is available in the same folder as the freemaster
98. Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor Inc Document Number KSDK13DEMOUG Rev 0 Sept 2015 4 y e freescale Kinetis SDK v 1 3 Demo Applications User s Guide ii Freescale Semiconductor Contents Chapter 1 Introduction Chapter 2 ADC Hardware Trigger Demo 2 1 Overview 3 skl TORPE o ao a i bato BE kieo ba aea kopa vp a seg es veo 3 2 1 2 Terr by PDB o sss sia ebu keua ax 4 kuu EEE EER OE RS 3 21 3 Trigger by LPTMR 226 5264 50 4 ia kaa arar a EERE ka 3 2 1 4 Input signal for ADC 2422526582 88h 244 594554 43 0434 643 84 4 22 Supported Platforms sss 4 2 3 System Requirement a ano EEE E o A ca o ob va ERS 6 2 3 l Hardware reguirem nts o o seee odzo i era o a e o bra ow eRe 6 PNE eS SONS A CCCI soi a oe HORS a SRS ee RMS Ew Samo 6 2 4 Getting Started ee ee 6 2 4 1 Hardware configuration aoaaa Sw ela ae sla a ae SS 6 242 Prepare the Domo 2 44644 av a gu ba 4 a xv kou bopa ok kon okok a ok ERS 7 25 Run the demo o T 2 6 Customization Options 4 ua a aa aaa a sa ala a a aja ews 7 2 6 1 Default configurations ooa oaa 7 2 6 1 1 A ONI LIE a o a ao ota Ee ado Se ar aru 7 2 6 1 2 Sample 0 oom do suedo i Brad rr ko ee e orn kono budo e 8 2 6 2 Configure the number of samples ko o eko e o ke e aera SO EM 8 2 6 3 Configure the signal frequency
99. Kinetis SDK v 1 3 Demo Applications User s Guide 278 Freescale Semiconductor Getting Started SCK Primarv Elevator gt SCK Primary Elevator B48 B48 PCSO Primary Elevator gt PCSO Primary Elevator B46 B46 GND Primary Elevator gt GND Primary Elevator B2 B2 TWR KL25Z48M Master Board Connects To Slave Board Pin Name Board Location Pin Name Board Location MISO Primarv Elevator gt MISO Primary Elevator B44 B44 MOSI Primary Elevator gt MOSI Primary Elevator B45 B45 SCK Primary Elevator gt SCK Primary Elevator B48 B48 PCSOO Primary Elevator gt PCSOO Primary Elevator B46 B46 GND Primary Elevator gt GND Primary Elevator B2 B2 TWR KM34Z75M Master Board Connects To Slave Board Pin Name Board Location Pin Name Board Location PTG5 MISO J13 pin 2 gt PTG5 MISO J13 pin 2 PTG4 MOSI J15 pin 1 gt PTG4 MOSI J15 pin 1 PTG3 SCK J12 pin 1 gt PTG3 SCK J12 pin 1 PTG2 PCSO J9 pin 2 gt PTG2 PCSO J9 pin 2 GND J25 Pin 26 gt GND J25 Pin 26 70 4 2 Prepare the example 1 Connect a USB cable between the PC host and the OpenSDA USB port on the board 2 Open a serial terminal with these settings e 115200 baud rate e 8 data bits e No parity e One stop bit Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 279 81 E Getting Started e No flow control
100. Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 55 7858585531 Getting Started e USB KW24D512 e USB KW4OZ K22F e USB KW40Z 15 3 System Requirement 15 3 1 Hardware requirements J Link ARM P amp E Micro Multi link universal e Mini micro USB cable e USB A to micro AB cable e Hardware tower base board for specific device e Personal Computer 15 3 2 Software requirements e The project files are in lt SDK_Install gt examples lt board gt demo_apps hwtimer_demo lt toolchain gt e Library dependencies ksdk_platform_lib 154 Getting Started 15 4 1 Prepare the Demo 1 Connect a USB cable between the PC host and the OpenSDA USB port on the board 2 Open a serial terminal with the following settings e 115200 baud rate e 8 data bits e No parity e One stop bit e No flow control 3 Download the program to the target board 4 Either press the reset button on the board or launch the debugger in the IDE to begin running the demo For detailed instructions see the appropriate board User s Guide 15 4 2 Run the demo 1 Press the reset button on your board 2 Hwtimer Example message is displayed on the terminal 3 A dot is printed when an Hwtimer interrupt occurs until the HWTIMER DOTS PER LINE x H WTIMER_LINES_COUNT defined in hwtimer_demo c interrupts occur Kinetis SDK v 1 3 Demo Applications User s Guide 56 Freescale Semiconductor Customization Options 4 Finallv th
101. L 1206 i 4 wo a 4a o e kav ias 8 2 6 4 Configure the ADC instance 0 beas kra 4 xia den 3 pla a e OM e HE e Sa 8 LUO Configure the ADC input pin ss o cion eee da HS 8 Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor lii Section number Title Page Chapter 3 ADC Low Power Demo 3 1 A 2 dn slaj a do a avaj a a o Vi o AV Du RLS ERS AP Sla MER OMA 9 3 2 Supported Platforms 9 3 3 System Requirement s 10 3 3 1 Hardware requirements 4 kus a e 3 4 ka ave kok kok kok RS 10 332 Software requirements sv aa sa ca bb 4 ka EEA ewe kok a Ga 10 3 4 GellingStarltol coc i ees eau kia aos a a sm konon a es 10 3 4 1 Prepare be ISO o oe aa a a B dok kk i kok in ed A 10 3 4 2 R n the demg su ani a sk Ra a dear GB aba 10 Chapter 4 AFE Qtimer Demo 4 1 OFV oe e ye a eee a we oe ee Ge o ee ee He ae Bes 13 4 2 Supported Platforms sss 13 4 3 Getting BENON eo 3 o ko ka kon ee a ka ea ERS apo rea ees 13 4 3 1 Hardware Settings gt cc siS AS iii kok sio Sk i dok hs noda SS 13 4 3 2 Prepare the INO gt sakra Sabra a es ib ata a kras AA Ses 14 4 3 3 IIIN DEGNI 3 SO Se eS oa So ae oo Cd dal AE Ra A b Va SS 14 Chapter 5 BLDC Sensorless Demo 5 1 COTINO oe ee eko RES Rae NE KKPS ee erena g e Se Seg ie So 17 5 2 Supported Platforms s s sss so 17 5 3 System Requirement
102. Last demo Input one char at a time from the terminal It is transmitted via the FlexIO IRDA driver and echoed on the terminal abcdefghijklmn This is the example echo user input for one character at a time 47 5 1 Customization Options e In main h The IRDA RX CMPO TRIG default to 0 definition determines whether to use the CMPO as the FlexIO trig The LOOPBACK TEST default to 1 definition determines whether the loop back FlexIO signals internallv The FLEXIO UART RX PINEN default to 1 definition determines whether the FlexIO simulated UART RX signals present on PTDS The FLEXIO_UART_TX_PINEN default to 1 definition determines whether the FlexIO simulated UART TX signals present on PTD4 e In fsl_flexio_irda h The IRDA_RXPIN_REVERSE default to 0 definition determines whether the FlexIO IRDA decoding timer uses a reversed input or not The IRDA TXPIN REVERSE default to 0 definition determines whether the FlexIO IRDA encoding timer reverses the output pulse or not Note IRDA RXPIN REVERSE and IRDA_TXPIN_REVERSE must be the same for the demo test Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 197 Run the demo Kinetis SDK v 1 3 Demo Applications User s Guide 198 Freescale Semiconductor Chapter 48 FlexlO simulated SPI Example with other methods 48 1 Overview The FlexIO SPI example application demonstrates the FlexIO simulated SPI driver working with different meth
103. M Tower System module TWR K65F180M Single Board Kinetis SDK v 1 3 Demo Applications User s Guide 80 Freescale Semiconductor Getting Started Master Connects To Slave Pin Name Board Location Pin Name Board Location DC0 SCL Primary Elevator gt I2C1_SCL Primary Elevator Pin A7 Pin A75 DC0 SDA Primary Elevator gt I2C1_SDA Primary Elevator Pin A8 Pin B71 TWR K65F180M Two Boards Master Board 1 Connects To Slave Board 2 Pin Name Board Location Pin Name Board Location DC0 SCL Primary Elevator gt DC1 SCL Primary Elevator Pin A7 Pin A75 DC0 SDA Primary Elevator gt I2C1_SDA Primary Elevator Pin A8 Pin B71 GND Primary Elevator gt GND Primary Elevator Pin A65 Pin A65 TWR KL43Z48M Tower System module TWR KL43Z48M Single Board Master Connects To Slave Pin Name Board Location Pin Name Board Location I2CO SCL Primarv Elevator D I2CI SCL Primarv Elevator A40 A7 DC0 SDA Primarv Elevator gt DCI SDA Primary Elevator A39 AS TWR KL43Z48M Two Boards Master Board 1 Connects To Slave Board 2 Pin Name Board Location Pin Name Board Location DC0 SCL Primary Elevator gt I2CI SCL Primarv Elevator A40 A7 DC0 SDA Primary Elevator gt DCI SDA Primary Elevator A39 AS GND Primary Elevator gt GND Primary Elevator A6 A6 Kinetis SDK v 1 3 Demo Applications U
104. NU NS 83 17 6 INICI gt si Pe ee ea e kO ee vk See PIA Se re Sea SO 83 Chapter 18 iRTC Comp 1 Hz Demo 18 1 IPKK ENA o hh he a a OJ a A o da i KJ a OS EO ER OR EH 85 18 2 Supported Platforms 85 Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor ix Section number Title Page 18 3 System Requirement 85 18 3 1 Hardware requirements cir ako ias do ias do AR eR a 85 18 4 Getting Started L a be aS va 5 sa E oon ces iwa a e a e e a e ekos eks 85 18 4 1 Hardware Settings au SDA SS AS VAS Pekka ksa kda eRe il ba a 85 18 4 2 Prepare the DEMO a ec ot kia ea t PARK ees opa lee ke Sa Oe eS 86 18 5 Kun the demo nk sk be seias aas iais kubu ES ROT b kopa kub ds 86 Chapter 19 HTTP Server Demo on IwIP TCP IP Stack 19 1 As APE EEA REAR EAR isti RE PEE RE OEE a TTT E 87 19 2 Supported RIGS 66 3 ss vs se rd rr ra A 87 19 3 Supported Hardware s s 87 19 4 System Requirement s 87 19 4 1 Hardware requirements s s su b dda dk id a dos kos 87 19 4 2 Software reguirements 5 vo a a va ue ox EEK ka SEER EER SES 88 19 5 A sko ska stis REE kii k u kar kas biss b bob su 88 19 5 1 Prepare the Demio io cer AAA ERE EE ERE a 88 19 5 2 Network Configuration L 5 ck a a a a ka a a oko kou kok a REE ES 88 19 33 R n the demo eii o A A bia AAA i ERS 88 Chapter 20 Ping Demo on IwIP TCP IP S
105. OB OC OD OE OF 10 11 12 13 14 15 16 17 18 19 1A IB IC ID IE IF 20 DSPI Sends Receives successfully Press any key to run again Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 171 AN A Getting Started Kinetis SDK v 1 3 Demo Applications User s Guide 172 Freescale Semiconductor Chapter 41 EDMA Example 41 1 Overview The enhanced direct memorv access eDMA controller is a second generation performing complex data transfers with minimal intervention from a host processor This example uses the eDMA peripheral to transfer data from the Flash to RAM using the eDMA with different channels 41 2 Supported Platforms These Freescale Freedom development platforms and Tower System modules are supported by the EDMA example FRDM K22F FRDM K64F FRDM KV31F FRDM KW24 FRDM KV10Z TWR K21D50M TWR K21F120M TWR K22F120M TWR K24F120M TWR K60D100M TWR K64F120M TWR K65F180M TWR K80F150M TWR KV10Z32 TWR KV11Z75M TWR KV31F120M TWR KW24D312 41 3 System Requirement 41 3 1 Hardware requirements J Link ARM P amp E Micro Multi link universal Mini micro USB cable USB A to micro AB cable Hardware tower base board for specific device Personal Computer Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 173 EEE TET III Getting Started 41 3 2 Software requirements e The project files are in lt SDK_Install gt examples lt board gt driver_examples edma
106. Personal Computer 57 3 2 Software requirements e The project files are in lt SDK_Install gt examples lt board gt driver_examples ltc ltc_aes lt toolchain gt e Library dependencies ksdk platform lib 57 4 Getting Started 57 4 1 Hardware settings The LTC AES Example project does not call for anv special hardware configurations The recommenda tion is to leave the development board s jumper settings and configurations in default state when running this example 57 4 2 Prepare the example 1 Connect a USB cable between the PC host and the OpenSDA USB port on the board Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 239 TL Getting Started 2 Open a serial terminal with these settings e 115200 baud rate e 8 data bits e No parity e One stop bit e No flow control 3 Download the program to the target board 4 Either press the reset button on your board or launch the debugger in your IDE to begin running the example 57 4 3 Run the example These instructions are displayed shown on the terminal window A LIC AES DRIVER EXAMPLE sessza u eo e042 04444036 8 ema Measuring timer is driven 60 MHz tick 16 picoSeconds Testing input string Once upon a midnight dreary while I pondered weak and weary Over many a quaint and curious volume of forgotten lore While I nodded nearly napping suddenly there came a tapping As of some one gently rapping rapping at my chamber doorIts s
107. Primary Elevator N5 B39 AS PTD4 FLEXIO_PI Primary Elevator gt I2C1 SCL Primary Elevator N4 B59 A7 FRDM KL43Z48M FlexIO Pins Connects To I2C1 Pins Pin Name Board Location Pin Name Board Location PTDS FLEXIO PI J2 12 gt DC1 SDA J2 18 N5 PTD4 FLEXIO PI J2 6 gt I2C1 SCL J2 20 N4 FRDM KL27Z48M FlexIO Pins Connects To DCI Pins Pin Name Board Location Pin Name Board Location PTDS FLEXIO PI Jl 11 gt DC1 SDA J2 18 N5 PTD4 FLEXIO PI J1 9 gt CI SCL J2 20 N4 TWR K80F150M FlexIO Pins Connects To LPUART Pins Pin Name Board Location Pin Name Board Location Kinetis SDK v 1 3 Demo Applications User s Guide 188 Freescale Semiconductor Getting Started PTB11 FLEXIO P B69 gt I2C1 SDA B51 IN5 PTB10 FLEXIO P B70 gt I2C1 SCL B50 IN4 45 4 2 Prepare the example Connect a USB cable between the PC host and the OpenSDA USB port on the board 2 For TWR KL43Z48M insert the Tower System module into TWR ELEV 3 Open a serial terminal with these settings e 115200 baud rate e 8 data bits e No parity e One stop bit e No flow control 4 Download the program to the target board 5 Either press the reset button on your board or launch the debugger in your IDE to begin running the example 45 4 3 Run the example These instructions are displayed shown on the terminal wi
108. RDM KL27Z Master Board Connects To Slave Board Pin Name Board Location Pin Name Board Location MISO J2 pin 10 gt MISO J2 pin 10 MOSI J2 pin 8 gt MOSI J2 pin 8 SCK J2 pin 12 gt SCK J2 pin 12 PCSO J2 pin 6 gt PCSO J2 pin 6 GND J2 pin 14 gt GND J2 pin 14 FRDM KL43Z Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 277 Getting Started Master Board Connects To Slave Board Pin Name Board Location Pin Name Board Location MISO gt MISO MOSI gt MOSI SCK gt SCK PCSO gt PCSO GND gt GND FRDM KL46Z Master Board Connects To Slave Board Pin Name Board Location Pin Name Board Location MISO J3 pin 3 gt MISO J3 pin 3 MOSI J3 pin 5 gt MOSI J3 pin 5 SCK J3 pin 7 gt SCK J3 pin 7 PCSO J3 pin 9 gt PCSO J3 pin 9 GND J3 pin 14 gt GND J3 pin 14 MRB KWO1 Master Board Connects To Slave Board Pin Name Board Location Pin Name Board Location MISO J15 pin 20 gt MISO J15 pin 20 MOSI J15 pin 19 gt MOSI J15 pin 19 SCK J15 pin 18 gt SCK J15 pin 18 PCSO J14 pin 16 gt PCSO J14 pin 16 GND J15 pin 15 gt GND J15 pin 15 TWR KL43Z48M Master Board Connects To Slave Board Pin Name Board Location Pin Name Board Location MISO Primary Elevator gt MISO Primary Elevator B44 B44 MOSI Primary Elevator gt MOSI Primary Elevator B45 B45
109. S 37 10 4 1 Prepare ihe Demo sss ss us 11331 s SEN kasi eu kes is il bus EES 37 10 5 Commands Directions e 37 Kinetis SDK v 1 3 Demo Applications User s Guide vi Freescale Semiconductor Section number Title Page Chapter 11 FreeMASTER Demo 11 1 Overview oo sda lase b Ba AL eo ar aL OLEON ion 3 39 11 2 FreeMASTERDemo Introduction 40 ILAJ System Reguirement o si ska hh skali da kaa pg a ES EERE OS 41 11 21 Hardware requirements 3 4 os RAEE 41 11 3 FreeMASTER Demo User s Guide 42 Chapter 12 FTM PDB ADC Demo 12 1 A IN 45 12 2 Supported Platforms s s s 45 12 3 System Requirement s e 45 12 31 Hardware Sek a RRA A AAA SEIS 45 12 34 Software requirements a ARA 45 12 4 Getting Ipro ORS ka a a 45 12 4 1 Hardware III 45 12 4 2 Prepare the Demio gt sakra AAA ke bba ke ke 46 12 4 3 Ron Medeo s SV e SDAS Ra VIS oe ee eR ee eee REELS e 46 Chapter 13 Hello World Demo 13 1 IERE Se ka ko ee o eR Saw NE KPT Er ra erena e e Pare 47 13 2 Supported Platforms sss so 47 13 3 System Requirement 48 13 3 1 Hardwa re requirements s sas 843 kve Qi RE E KA L KE WO BO GV 48 13 3 2 oftware requirements gt lt o s soc e 34 ok a kg a a ER ee voka bu 48 13 4 Getting Started sp A A a A pk a pa Tu ka ora sta DR SUFO 48 13 4 1 Hardware II 48 13 4 2 Propate
110. SDA Primary Elevator gt PTC11 I22C1I SDA Primarv Elevator A60 A60 GND Primarv Elevator gt GND Primary Elevator A65 A65 TWR KL43Z48M Master Board Connects To Slave Board Pin Name Board Location Pin Name Board Location DCI SCL Primary Elevator gt I2CI SCL Primarv Elevator AT AT D2C1 SDA Primary Elevator gt D2C1 SDA Primary Elevator AS AS GND Primary Elevator gt GND Primary Elevator A6 A6 TWR KM34Z75M Master Board Connects To Slave Board Pin Name Board Location Pin Name Board Location PTD7 I2CO_SCL J10 Pin 1 gt PTD7 I2CO SCL J10 Pin 1 Kinetis SDK v 1 3 Demo Applications User s Guide 64 Freescale Semiconductor Getting Started PTEO I2CO SDA J11 Pin 1 gt PTEO I2CO SDA J11 Pin 1 GND J25 Pin 26 gt GND J25 Pin 26 TWR KV10232 The board doesn t support external pull up resistors for I2C pins So the internal pull up resistors is enable for I2C pins However the resistor is quite huge 20KOhm SOKOhm The I2C may run FAIL in high baurate In this case user need to use external pull up resistors Master Board Connects To Slave Board Pin Name Board Location Pin Name Board Location DC0 SCL Primary Elevator gt 12C0_SCL Primary Elevator A7 A7 DC0 SDA Primarv Elevator gt DC0 SDA Primarv Elevator AS AS GND Pr
111. SE6 RC J2 1 8 4 3 Prepare the Demo 1 Connect a USB cable between the PC host and the OpenSDA USB port on the board 2 Open a serial terminal with these settings e 115200 baud rate e 8 data bits e No parity e One stop bit e No flow control 3 Download the program to the target board 4 Either press the reset button on your board or launch the debugger in your IDE to begin running the demo For more detailed instructions see a Kinetis SDK User s Guide for your board 8 5 Run the demo This example shows how to run the demo DAC ADC Demo See Kinetis SDK Demo Applications User s Guide document Chapter DAC ADC demo for pins configuration information Press space bar to start demo The user is prompted to enter a voltage to output on the DAC Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 27 Kev Functions Select DAC output level Lo 1 0 V Lt a Vi Ju 200 Y 4 2 5 V 5 3 0 V After entering a valid input the ADC captures the voltage set by the DAC and displays the result in the terminal Select DAC output level 1 1 0 V Zed A V Sv 24 DV A 23 N 5 3 0 V gt 3 ADC Value 2471 ADC Voltage 1 99 What next 1 Test another DAC output value 2 Terminate demo At this point the user can test another DAC output value or terminate the demo This configuration exhibits up to 290 error when reading back voltage 8 6 Key Functions uint8_tdem
112. SOKOhm The I2C may run FAIL in high baurate In this case user need to use external pull up resistors TWR KV11Z75M Two Boards Master Board 1 Connects To Slave Board 2 Pin Name Board Location Pin Name Board Location Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor Run the demo PTC6 12C0_SCL J24 Pin 19 gt PTC6 12C0 SCL J24 Pin 19 PTC7A2CO SDA J24 Pin 20 gt PTC7 I2C1_SDA J24 Pin 20 GND J24 pin 1 gt GND J24 Pin 1 17 5 3 Prepare the Demo Connect a USB cable between the PC host and the OpenSDA USB port on the board Open a serial terminal with these settings e 115200 baud rate e 8 data bits e No parity e One stop bit e No flow control 3 Download the program to the target board 4 Either press the reset button on your board or launch the debugger in your IDE to begin running the demo DD For more detailed instructions see a Kinetis SDK User s Guide for your board 17 6 Run the demo This menu displays in the terminal window Available Commands LED Red Toggle 1 Red Light toggles on off LED Green Toggle 2 Green Light toggles on off LED Blue Toggle 3 Blue Light toggles on off Read Temperature 4 Get temperature of client It is necessary to set voltage reference exactly to 3 3 V to see correct temperature Read Id 5 Read client unique ID Enter your ch
113. SSS a kh kak da ked mok a God a Gus 29 2 Supported Platforms s s s 29 3 GellingStiarlol cas we es 29 3 1 Hardware Settings os oe coe Gn ee e e A e B 29 3 2 Prepare tbe Demo co sord a a oaie E ooi o HO 29 4 Run the demo o sg ve vidva alam B sla kos 29 5 Communication Interface Settings Chapter 30 SLCD Low Power Demo 30 1 As o va kad da da 93 a dos doe a da REREAD RAS 30 2 Supported Hardware 30 3 System Requirement a Kinetis SDK v 1 3 Demo Applications User s Guide Page xiv Freescale Semiconductor Section number Title Page 30 3 1 ERAO OS 0 e A poao ako a o OT 133 30 4 Getting Started aaa 133 30 4 1 Prepare the Demio ea os vakera brabra EEK uras kera e SER Eee ES 133 30 5 Run the demo s e sw bib l k ka e 134 Chapter 31 31 1 31 2 31 3 31 3 1 La 31 4 31 4 1 31 4 2 31 4 2 1 321 32 2 32 3 32 4 32 4 1 32 4 2 32 4 3 32 5 323 1 p Falo IM 32 33 Thermistor Lab Demo CRI a ao eca RAS e ko RAE as a A Bi ea 135 Supported Hardware se 135 System Requirement 135 Hardware requirements ese kva RS kve amp RUE I KE E KUE WO DADA BV 135 oftware requirements lt o s eR a ag daa konos an ua a kova BEN 135 Getting AKE o ao aL e e e e ea pov a kola a kova FERRE 135 Prepare the Demo o sis as AS AS a don dla od a
114. VLLS2 VLLS3 RUN 120MHz TWR K60D100M WAIT STOP VLPR 4MHz VL RTC SW1 PW VLPS LLS VLLS1 VLLS2 VLLS3 RUN 96MHz TWR K64F120M WAIT STOP VLPR 4MHz VL RTC SW1 PW VLPS LLS VLLSO VLLS1 VLLS2 VLLS3 RUN 120MHz Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 117 7888585858 Ty Getting Started TWR K65F180M WAIT STOP VLPR 4MHz VL RTC SW3 PW VLPS LLS3 VLLSO VLL SI VLLS2 VLLS3 RUN 120M Hz HSRUN 180MHz TWR K80F150M WAIT STOP VLPR 4MHz VL RTC SW3 PW VLPS LLS3 VLLSO VLL SI VLLS2 VLLS3 RUN 120M Hz HSRUN 150MHz TWR KL43Z48M WAIT STOP VLPR 2MHz VL RTC SW2 PW VLPS LLS VLLS1 VLLS3 RUN 48MHz TWR KV31F120M WAIT STOP VLPR 4MHz VL RTC SW1 PW VLPS LLS3 VLLSO VLLS1 VLLS2 VLLS3 RUN 80MHz H SRUN 120MHz TWR KW24D512 WAIT STOP VLPR 4MHz VL RTC SW3 PW VLPS LLS VLLSO VLLSI VLLS2 VLLS3 RUN 48MHz USB KW40Z WAIT STOP VLPR 4MHz VLP RTC W VLPS LLS3 VLLS1 VLLS2 VLLS3 RUN 21MHz Kinetis SDK v 1 3 Demo Applications User s Guide 118 Freescale Semiconductor Chapter 27 RTC Function Demo This demo application demonstrates how to use the RTC driver 27 1 Overview This RTC demo application demonstrates the important features of the RTC Module bv using the RTC Peripheral Driver It supports these features
115. a RRR 97 22 3 Supported Hardware s s 97 22 4 System Requirement s s ee 97 22 4 1 Hardware requirements a su eb eS a Oe kos 97 22 4 2 oftware requirements lt lt remarca OR a RB Oe ka We aa 98 22 5 Getting Started s s sss es seo 98 22 5 E ao ao omari aO a lo RE ajo aj o o an g eem eaj 98 223 2 Network Configuration 6 2b eb RRR a a al ESS 98 22 6 Run TO CG o c 54 gra gra O E ERE ER OE RA 98 Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor xi Section number Title Page Chapter 23 MMAU Filter Demo 23 1 APRIL REM 101 23 2 Supported Platforms 101 23 3 System Requirement 101 FAKON Hardware requirements o o kb ke bkew a 4 a ak ka Ak a ak ko kok a kok a kos 101 23 4 Getting Started eH sea ea e ace om AR kk ko SU NU i A A 101 23 4 1 Hardware AA 101 23 4 2 Prepare theexample ca 3 ed a OS dok hoko kja i kok kvan co ds 101 23 4 3 Ron I SS i x hh as ak ei e AR NR RARA RARA 102 Chapter 24 MMDVSQ Demo 24 1 ME O Eras amp Oe OO 105 24 2 Supported Platforms s s 105 24 3 System Requirement 105 24 3 1 Hardware requirements 23 be ks sk 3 i ad ok kda al a bu a kda os 105 24 3 2 Software requirements soo a recreare i e bia g e oe e koe ES 105 24 4 Gettine Started ss RRR ERE HEE eo p ko e ka koe ko ebu iksoj 105 24 4
116. a e ERK SR KS REST ES SS 157 3832 SOLAS requirements sss 3a Sa See AAA SEEDS 158 38 4 ONIA A Re eR RSS SRR eS SREY eu REVA 158 38 4 1 Hardware settings ss a ae e boo a a e kos REE HEE la l 158 38 4 2 Prepare the example e ke ke eg aus a AAA 158 38 4 3 Pie Ste s men AE AA i Se i Kie a koe Gk es kla ROS 158 Chapter 39 DMA Example 39 1 IIE uo he A AREER ESR EOE i ia Oo EV DO L KD E VS UU 159 39 2 Supported Platforms s s 159 39 3 System Requirement sss 159 39 3 1 Hardware OIE error a RR dea RA See 159 3932 Software requirements b a aw e ob ki soju av alu aj EO Rw Sla US 160 39 4 Getting Started a koko prao koko TA e jerk OR ae kon a e Sa 160 39 4 1 Hardware SEMINAR EE 160 39 4 2 Prepare the example 3 REE SR RRR RE bb la EERE ERR ERS 160 39 4 3 R n he example bik ss cga o sue 4 mukas k a BERR Ew a 160 Chapter 40 40 1 40 2 40 3 40 3 1 40 3 2 40 4 40 4 1 40 4 2 40 4 3 DSPI Example with other methods CII ee eo kaa pra a eh Re STA aes ee grene ee Bi e 163 Supported Platforms 2 aa aaa sss s 163 System Requirement s s 164 Hardware requirements es s o a 3 843 OR HR KA i KE SIKA DADA BEN 164 oftware requirements 5 4 4 a aw e 34 a o a ag daa kong RA boa BO 164 Getting Started e e e de la e va ola So a ekas 164 Hardware settings or komao kanon dh bene de eala Goa ds 164 Prepare the example sa o ka bova
117. aa a a la ES 256 Chapter 64 RNGA Example 64 1 NENIU oca peat va b raj PES eae ve oa kve Poe eie Toro De e La 257 64 2 Supported Platforms s s s s 257 64 3 System Requirement s e 257 64 3 1 Hardware requirements lt 3 4235 a Oa oko kokon kok i ok kae ee i 257 64 3 2 oftware requirements o 2 56 6 G4 aa i ore Re eee a 04 a wad a a 258 64 4 Getting EANO a aa ak a a a ek EK ko Se EERE RS 258 64 4 1 Hardware i SS 258 64 4 2 PORDI DII a o do pO a o ao e peko das o da kodas BO ee E a 258 64 4 3 R n the example 2022 iS ko siS Eks aka ilis aka sss oda bs 258 Chapter 65 RTC Example 65 1 COIE a a pu in RO SORO TOE SOE SPE SM SS SSE KS 259 65 2 Supported Platforms sss 259 65 3 System Requirement s s 260 65 3 1 Hardware TOQUIESIED S lt a a po a ES a a A aa 260 65 3 2 Software requirements lt a 44 4 adom a Ma ae kO AZ MO RRA 260 65 4 Getting Started 245645545 4 5 ea e kva a koe a komon ka a ke koe la 260 65 4 1 Hardware settings a se a a a OR a 63 260 65 4 2 PIN KKD TII DOJ Ea o e e e See e A a E ova SE a DS 260 65 4 3 MIN IINISE i L K 260 Kinetis SDK v 1 3 Demo Applications User s Guide xxviii Freescale Semiconductor Section number Title Page Chapter 66 SDHC SDCard Example 66 1 A adis a a do a avaj a a o VD OR RLS a Sla EIN GSS 263 66 2 Supported Platforms e 263 66 3 System Requirement
118. acts as an echo server The application on board sends back the TCP packets from the PC which can be used to test whether the TCP connection is available 21 2 Supported RTOS e Freescale MQX RTOS e FreeRTOS e uC OS II e UC OS MI e Bare Metal no RTOS 21 3 Supported Hardware These Freescale Freedom development platforms and Tower System modules are supported by the KSDK TCP Echo demo e FRDM K64F e TWR K60D100M e TWR K64F120M e TWR K65F180M 21 4 System Requirement 21 4 1 Hardware requirements J Link ARM P amp E Micro Multi link universal e Mini micro USB cable USB A to micro AB cable e Hardware tower base board for specific device e Personal Computer Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 93 Run the demo 21 4 2 Software requirements e The project files are in Baremetal lt SDK_Install gt examples lt board gt demo_apps lwip lwip_tcpecho_demo tcpecho _bm lt toolchain gt RTOS lt SDK_Install gt examples lt board gt demo_apps lwip lwip_tcpecho_demo tcpecho_ rtos lt rtos gt lt toolchain gt e Library dependencies Baremetal FreeRTOS uC OS ksdk_platform_lib MQX RTOS mqx_ lt board gt mqx_stdlib_ lt board gt 21 5 Getting Started See the wIP TCPIP Stack and Kinetis SDK Integration User s Guide document KSDKLWIPUG for instructions and requirements 21 5 1 Prepare the Demo 1 Connect a USB cable between the PC host and the
119. amples lpsci lt use_ case gt lt toolchain gt e Library dependencies ksdk_platform_lib 544 Getting Started 54 4 1 Hardware settings The LPSCI Example project does not call for any special hardware configurations Although not required the recommendation is to leave the development board s jumper settings and configurations in default state when running this example 54 4 2 Prepare the example 1 Connect a USB cable between the PC host and the OpenSDA USB port on the board 2 Open a serial terminal with these settings e 115200 baud rate e 8 data bits e No parity e One stop bit e No flow control 3 Download the program to the target board 4 Either press the reset button on your board or launch the debugger in your IDE to begin running the example 54 4 3 Run the example 54 4 3 1 LPSCI blocking These instructions are displayed shown on the terminal window LPSCI Send Receive Blocking Example Type characters on the keyboard and the board receives and echoes them to the terminal screen Type characters on the keyboard and the board receives and echoes them to the terminal screen 54 4 3 2 LPSCI non blocking These instructions are displayed shown on the terminal window Kinetis SDK v 1 3 Demo Applications User s Guide 228 Freescale Semiconductor AS i Getting Started LPSCI Send Receive Non Blocking Example Type characters on the keyboa
120. an be controlled using one interface e Up Down buttons on the TWR board 1 Ze 3 After the power supply is plugged into the TWR MC LV3PH the motor is ready to run Press the reset button on the development board Pressing the Up button increases the speed by 500 RPM The motor starts rotating in the clockwise direction if it is not spinning or decreases speed if the direction of the rotation is counter clockwise Pressing the Down button decreases the speed by 500 RPM The motor starts rotating in the counter clockwise direction if it is not spinning or decreases speed if the direction of the rotation is clock wise Pressing the buttons bevond this point increases or decreases the required speed within the speed limit 5000 to 5000 RPM If both buttons are pressed for more than 2 seconds the demonstration mode is switched on or demonstration mode is switched off if it is on Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 19 AN A Getting Started Kinetis SDK v 1 3 Demo Applications User s Guide 20 Freescale Semiconductor Chapter 6 Bubble Level FTM Demo This demo application utilizes the on board accelerometer to implement a bubble level 61 Overview The bubble level application demonstrates basic usage of the on board accelerometer to implement a bubble level A bubble level utilizes two axes to visually show deviation from a level plane 0 degrees on a given acces
121. ard 2 Connect the USB TTL board to PC host 3 Open a serial terminal with these settings e 115200 baud rate e 8 data bits e No parity e One stop bit e No flow control 4 Download the program to the target board 5 Either press the reset button on your board or launch the debugger in your IDE to begin running the example 56 4 5 Run the example 56 4 5 1 FLEXIO UART interrupt way These instructions are displayed shown on the terminal window ttt LPUART Send Receive Blocking Example Type characters on the keyboard and the board receives and echoes them on the terminal screen Type characters on the keyboard and the board receives and echoes them on the terminal screen Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 237 EEE TET TEDOS Getting Started 56 4 5 2 LPUART non blocking These instructions are displayed shown on the terminal window LPUART Send Receive Non Blocking Example Type characters on the keyboard and the board receives and echoes them on the terminal screen Type characters on the keyboard and the board receives and echoes them on the terminal screen 56 4 5 3 LPUART DMA blocking These instructions are displayed shown on the terminal window ttt LPUART DMA Send Receive Blocking Example Type characters on the keyboard and the board receives and echoes them on the terminal screen
122. are development kit Power Manager demo The Bare Metal no RTOS demo Supported Platforms e FRDM K22F e FRDM K64F e FRDM KL25Z e FRDM KL27Z e FRDM KL43Z e FRDM KL46Z e FRDM KV31F e FRDM KW24 e FRDM KW40Z TWR K21D50M TWR K21F120M TWR K22F120M TWR K24F120M e TWR K60D100M TWR K64F120M TWR K65F180M TWR K80F150M Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 113 Svstem Requirements e TWR KL43Z48M e TWR KV31F120M e TWR KW24D312 e USB KW40Z The FreeRTOS Freescale MQX RTOS C OS II C OS III demo Supported Platforms e FRDM K22F e FRDM K64F e FRDM KL43Z e FRDM KL46Z e FRDM KV31F e FRDM KW24 e FRDM KW40Z TWR K21D50M TWR K21F120M TWR K22F120M TWR K24F120M e TWR K60D100M TWR K64F120M TWR K65F180M TWR K80F150M e TWR KL43Z48M e TWR KV31F120M e TWR KW24D312 e USB KW40Z 26 4 System Requirements 26 4 1 Hardware requirements e J Link ARM e P amp E Micro Multi link universal e Mini micro USB cable USB A to micro AB cable e Hardware tower base board for a specific device e Personal Computer 26 4 2 Software requirements e The project files are in SDK Install examples xboard demo apps power manager rtos demo lt configuration gt lt toolchain gt where configuration is either bare metal or a supported RTOS e Library dependencies Bare metal FreeRTOS uC OS ksdk platform lib Kinetis SDK v 1 3 Demo Applications User s Guide 114 Frees
123. are displaved shown on the terminal window MPU example begin Set regionArrav to un writeable Write 0 to regionArray at No 0 regionArray 0 0 Core access violation and generate busfault Core is granted write access permission regionArray 0 0 Protected regionArray successfully Press any key to continue Kinetis SDK v 1 3 Demo Applications User s Guide 246 Freescale Semiconductor Chapter 60 PDB Example 60 1 Overview The PDB Example project is a demonstration program that uses the KSDK software and PDB to generate a constant periodic of time trigger pulse and interrupt Each time the PDB expires an interrupt occurs and counter is increased and prints to the terminal 60 2 Supported Platforms These Freescale Freedom development platforms and Tower System modules are supported by the PDB example e FRDM K22F e FRDM K64F e FRDM KVIOZ e FRDM KV31F e FRDM KW24 TWR K21D50M TWR K21F120M TWR K22F120M TWR K24F120M e TWR K60D100M TWR K64F120M TWR K65F180M TWR K80F150M e TWR KM34Z75M e TWR KV10Z32 e TWR KV11Z75M e TWR KV31F120M e TWR KW24D312 60 3 System Requirement 60 3 1 Hardware requirements J Link ARM e P E Micro Multi link universal e Mini micro USB cable e USB Ato micro AB cable e Hardware Tower System base board for specific device e Personal Computer Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 247 EEE TET III Getting Started 60 3 2 S
124. ation is to leave the development board s jumper settings and configurations in default state when running this example 37 4 2 Prepare the example Connect a USB cable between the PC host and the OpenSDA USB port on the board Open a serial terminal with these settings e 115200 baud rate e 8 data bits e No parity e One stop bit e No flow control 3 Download the program to the target board 4 Either press the reset button on your board or launch the debugger in your IDE to begin running the example N 37 4 3 Run the example These instructions are displayed shown on the terminal window COP example begin Press SW to begin expiring COP Press the SW x button on the board and the board receives and refreshes the reset operation on COP WDOG timer These instructions are displayed shown on the terminal window Press SW to begin expiring COP Board resets after 1 seconds COP reset the chip successfully Kinetis SDK v 1 3 Demo Applications User s Guide 156 Freescale Semiconductor Chapter 38 DAC Example 38 1 Overview The DAC Example project is a demonstration program that uses the KSDK software This function uses the terminal to enter a DAC value and convert this value to a DAC output 38 2 Supported Platforms These Freescale Freedom development platforms and Tower System modules are supported by the DAC example e FRDM K22F e FRDM K64F e FRDM KL25Z e FRDM KL26Z e FRDM KL43Z e FRDM KL46Z e FRDM KV1
125. ations User s Guide Freescale Semiconductor 1 Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor Chapter 2 ADC Hardware Trigger Demo This demo application demonstrates how to use the ADC driver with various hardware triggers 21 Overview This is an ADC demo application which shows how to use different hardware trigger sources to handle the ADC hardware trigger function These trigger sources are supported e PIT Periodic Interrupt Timer e PDB Programmable Delay Block e LPIMR Low Power Timer e TPM Timer PWM Module 2 1 1 Trigger by PIT The Periodic Interrupt Timer PIT is a period timer source and the ADC hardware trigger event Because the PIT trigger event can only be used to trigger one of the ADC channels mux A or B this demo uses PI T as a trigger source for the ADCx channel 0 The PIT triggers the ADC in a fixed frequency and the demo gets the ADC conversion result in the ADC Conversion Complete COCO interrupt TWR KV10Z32 and TWR KV11Z75M does not support PIT trigger due to no PIT on the silicon 2 1 2 Trigger by PDB The Programmable Delay Block PDB is a continuous trigger event for ADC It uses the software trigger as the first trigger input event and turns on the PDB continuous mode to generate a period trigger source Because the PDB can trigger different channels inside one ADC instance this demo shows the Ping Pong triggering which occurs by sampling the channel 0 1 with t
126. ave project to the I2C slave board The terminal of the I2C slave board prints out a I2C Slave message Power on the I2C master board Download and run the i2c_comm_mstr project to the I2C master board The terminal of the I2C master board prints out a 2C Master message and the data received from the I2C slave 8 The I2C slave project creates some sub addresses to access a specific byte of data on the slave board The master reads all these sub addresses and prints out the data lA Dd Bu non HE Slave Sub Address Character 0 I 1 2 2 C 3 4 C 5 O 6 M 7 M Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 67 AAA Getting Started 9 To change the I2C slave sub address content input a new character in the I C master command line Input slave sub address and the new character Slave Sub Address 5 Input New Character F 10 The master then displays the updated content on the terminal output Slave Sub Address Character 0 I 1 2 2 C 3 4 C 5 F 6 M 7 M Kinetis SDK v 1 3 Demo Applications User s Guide 68 Freescale Semiconductor Chapter 17 I2C Demo with RTOS This demo application demonstrates the I2C demo on different RTOS 17 1 Overview This I2C application demonstrates the SDK Peripheral drivers working on differe
127. board and observe the LED toggle which is controlled by GPIO Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 213 AN A Getting Started Kinetis SDK v 1 3 Demo Applications User s Guide 214 Freescale Semiconductor Chapter 52 I2C Example with other methods 521 Overview The I2C Example project is a demonstration program that uses the KSDK software This example provides 4 examples I2C blocking non blocking callback and polling e 12C master sends and receives the array to from the I2C slave and compares whether the two buffers are the same e I2C slave sends the buffer received from the master then echoes back to the master e First run the master and then run the slave 52 2 Supported Platforms These Freescale Freedom development platforms and Tower System modules are supported by the I2C example e FRDM K22F e FRDM K64F e FRDM KLO2Z e FRDM KLO3Z e FRDM KL25Z e FRDM KL26Z e FRDM KL27Z e FRDM KL43Z e FRDM KL46Z e FRDM KVIOZ e FRDM KV31F e FRDM KW24 e FRDM KW40Z e MRB KWOL TWR K21D50M TWR K21F120M TWR K22F120M TWR K24F120M e TWR K60D100M TWR K64F120M TWR K65F180M TWR K80F150M e TWR KL25Z48M e TWR KL43Z48M e TWR KM34Z75M e TWR KV10Z32 Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 215 AR Getting Started e TWR KV11Z75M e TWR KV31F120M e TWR KW24D312 52 3 System Requirement 52 3 1 Hardware requirements J Link ARM P amp E Mic
128. bugger in your IDE to begin running the example 71 4 3 Run the example Ensure that the card doesn t contain anv important content because the demo erases and overwrites some sectors These instructions are displaved shown on the terminal window SPI SD Card Demo Startl BaudRate set to 375000Hz BaudRate set to 2000000OHz SS Card Information Card Tvpe SDSC Card Capacitv 1 97 GB Card CID Manufacturer ID 0x2 OEM ID 0x544D Product name SA02G Product revision 0 5 Product serial number 0x2080728A Manufacturing data Aug 2010 Card CSD CSD Structure 0x0 taac 2000 00 us nsac 0 clks tran speed 25000000 00 kbps eco class 0 2 4 5 7 8 10 max read block length 1024 Bytes max write block length 1024 Bytes Support partial read Support crossing physical block boundaries reading is allowed VDD R CURR MIN 0x7 VDD R CURR MAX 0x1 VDD W CURR MIN 0x7 VDD W CURR MAX 0x3F c size mult 7 c size 3763 Erase unit size is one or multiple units of 512 bytes The size of write protected group is 2 blocks Kinetis SDK v 1 3 Demo Applications User s Guide 286 Freescale Semiconductor AS A Getting Started R2W_Factor 2 Hard disk like file system with partition table Start read write example Single block read write example passed Writing 4096 bytes for 100 times in 2502 ms at 163 kB s Reading 4096 bytes for 100 times in 2164 ms at 189 k
129. cale Semiconductor A i Getting Started MQX RTOS max board mqx stdlib board 26 5 Getting Started 26 5 1 Hardware Settings The demo does not require any special hardware configurations Although not required the recommen dation is to leave the development board jumper settings and configurations in default state when running this demo 26 5 2 Prepare the Demo Follow the instructions in Getting Started with Kinetis Software Development Kit KSDK to e Set up hardware connections e Configure a Terminal session e Build and download application to targeted devices Note The demo is configured to work with the Terminal baudrate at 9600 bps When running the demo unplug all debugger devices For the MRB KWOL it is necessary to connect on the J8 pins 2 3 26 5 3 Run the demo 1 Press the reset button on the hardware 2 A control menu is displayed on the Terminal window Note that the list on the menu is not the same for all platforms It depends on the list of supported low power modes For example on the TWR K64F 120M this menu displays HHH HHH Power Manager Demo Core Clock 48000000Hz SMC mode kStatRun Select the desired operation Press A for enter RUN Normal RUN mode Press B for enter Wait Wait mode Press C for enter Stop Stop mode Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 115 Getting Started Press D for enter VLPR Very Low Powe
130. cations User s Guide Freescale Semiconductor 5 AR Getting Started TWR K22F120M TWR K24F120M e TWR K60D100M TWR K64F120M TWR K65F180M TWR K80F150M e TWR KL43Z48M e TWR KM34Z75M e TWR KV31F120M The adc tpm trigger demo Supported Platforms e FRDM KLO3 e FRDM KL26Z FRDM KL27Z FRDM KL43Z e MRB KWOL e TWR KL43Z48M 2 3 System Requirement 2 3 1 Hardware requirements J Link ARM P amp E Micro Multi link universal e Mini micro USB cable e USB A to micro AB cable e Hardware tower base board for specific device e Personal Computer 2 3 2 Software requirements e The project files are in lt SDK_Install gt examples lt board gt demo_apps adc_hw_trigger lt hw_ trigger gt lt toolchain gt e Library dependencies ksdk_platform_lib 2 4 Getting Started 2 4 1 Hardware configuration For the MRB KWOI It is necessary to short jumpers J10 and J11 to connect the ADC references If the A DCO_SE23 or internal DAC connection is used it is necessary to disconnect J7 to open PTE30 connection with the RESET of the RADIO part Also analog function for PTE30 DAC output is necessary on the mrb kw01 default is GPIO for RADIO part reset Kinetis SDK v 1 3 Demo Applications User s Guide 6 Freescale Semiconductor Customization Options 2 4 2 Prepare the Demo 1 Connect a USB cable between the PC host and the OpenSDA USB port on the board 2 Open a serial terminal with these settings e 115200 baud rate
131. ch the debugger in your IDE to begin running the example 68 4 3 Run the example These instructions are displayed shown on the terminal window SLCD enters interrupt For TWR KM34Z75M This example turns on all SLCD segments and blinks several times No instruc tions on the terminal window Kinetis SDK v 1 3 Demo Applications User s Guide 270 Freescale Semiconductor Chapter 69 Smart Card Example 69 1 Overview This example demonstrates the SDK Peripheral drivers working with different methods e Using blocking method e Using non blocking method Transfer data between the board and the smart card Zeitcontrol ZC7 5 RevD The example transfers using both TO and TI modes 69 2 Supported Platforms These Freescale Freedom development platforms and Tower System modules are supported by the smart card example e TWR K21F120M using TWR POSCARD combination of smartcard_uart and smartcard ncn8025 drivers e TWR K80FI50M using on bard micro SIM socket combination of smartcard_emvsim and smartcard_direct drivers 69 3 System Requirement 69 3 1 Hardware requirements J Link ARM PE Micro Multi link universal Mini micro USB cable e USB A to micro AB cable e Hardware tower base board for specific device Personal Computer e TWR POSCARD Tower System module in case of micro SIM interface absence on microprocessor Tower System module e smart card Zeitcontrol ZC7 5 RevD 69 3 2 Software requirements e The pro
132. cters on the keyboard and the board receives and then echoes them to terminal screen Type the characters on the keyboard and the board receives and then echoes them to terminal screen Kinetis SDK v 1 3 Demo Applications User s Guide 296 Freescale Semiconductor Chapter 75 WDOG Example 75 1 Overview The WDOG Example project is a demonstration program that uses the KSDK software to show a simple application that enables Watchdog then continuously refreshes the watchdog to prevent CPU reset Upon SW button push the Watchdog expires after approximately 2 seconds and the chip resets e Use a SW to start WDOG When SW is pressed WDOG begins to expire Combine refresh and reset operation on WDOG timer e Use a LED to indicate reset process At first LED is turned on when SW is pressed LED start blinking and after resetting LED is turned off And then LED is turned on after reset is success 75 2 Supported Platforms These Freescale Freedom development platforms and Tower Svstem modules are supported bv the WDOG example FRDM K22F FRDM K64F FRDM KV10Z FRDM KV31F FRDM KW24 TWR K21D50M TWR K21F120M TWR K22F120M TWR K24F120M TWR K60D100M TWR K64F120M TWR K65F180M TWR K80F150M TWR KM34Z75M TWR KV10Z32 TWR KV11Z75M TWR KV31F120M TWR KW24D312 75 3 System Requirement 75 3 1 Hardware requirements J Link ARM P amp E Micro Multi link universal Kinetis SDK v 1 3 Demo Applications User s Guide Freescale S
133. cts LI 17 2 Supported RTOS e Freescale MQX RTOS FreeRTOS uC OS II uC OS III e Bare Metal no RTOS 17 3 Supported Platforms These Freescale Freedom development platforms and Tower Svstem modules are supported bv the KSDK I2C demo with RTOS The Bare Metal no RTOS demo Supported Platforms Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 69 B Supported Platforms e FRDM K22F e FRDM K64F e FRDM KLO2Z e FRDM KLO3Z e FRDM KL25Z e FRDM KL26Z e FRDM KL27Z e FRDM KL43Z e FRDM KL46Z e FRDM KVIOZ e FRDM KV31F e FRDM KW40Z e MRB KWOL TWR K21D50M TWR K21F120M TWR K22F120M TWR K24F120M e TWR K60D100M TWR K64F120M TWR K65F180M TWR K80F150M e TWR KL43Z48M e TWR KV11Z75M The FreeRTOS uC OS II wC OS I demo Supported Platforms e FRDM K22F e FRDM K64F e FRDM KL25Z e FRDM KL26Z e FRDM KL27Z e FRDM KL43Z e FRDM KL46Z e FRDM KV31F e MRB KWOL TWR K21D50M TWR K21F120M TWR K22F120M TWR K24F120M e TWR K60D100M TWR K64F120M e TWR K65F180M e TWR KL43Z48M The MQX demo Supported Platforms e FRDM K22F Kinetis SDK v 1 3 Demo Applications User s Guide 70 Freescale Semiconductor AS A Getting Started e FRDM K64F e FRDM KL27Z e FRDM KL43Z e FRDM KV31F TWR K21D50M TWR K21F120M TWR K22F120M TWR K24F120M e TWR K60D100M TWR K64F120M TWR K65F180M e TWR KL43Z48M 17 4 System Requirement 17 4 1 Hardware requirements e J Link ARM e P amp E M
134. d Demo This demo application demonstrates the Hello World demo 131 Overview The Hello World project is a simple demonstration program that uses the KSDK software It prints the Hello World message to the terminal using the KSDK UART drivers The purpose of this demo is to show how to use the UART and to provide a simple project for debugging and further development 13 2 Supported Platforms These Freescale Freedom development platforms and Tower System modules are supported by the KSDK Hello World demo e FRDM K22F e FRDM K64F e FRDM KLO2Z e FRDM KLO3Z e FRDM KL25Z e FRDM KL26Z e FRDM KL27Z e FRDM KL43Z e FRDM KL46Z e FRDM KVIOZ e FRDM KV31F e FRDM KW24 e FRDM KW40Z e MRB KWOL TWR K21D50M TWR K21F120M TWR K22F120M TWR K24F120M e TWR K60D100M TWR K64F120M TWR K65F180M TWR K80F150M e TWR KL43Z48M e TWR KM34Z75M e TWR KV10Z32 e TWR KV11Z75M e TWR KV31F120M Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 47 PeO O Run the demo e TWR KW24D512 e USB KW24D512 e USB KW40Z K22F e USB KW40Z 13 3 System Requirement 13 3 1 Hardware requirements J Link ARM e P amp E Micro Multi link universal e Mini micro USB cable e USB A to micro AB cable e Hardware tower base board for specific device e Personal Computer 13 3 2 Software requirements e The project files are in lt SDK_Install gt examples lt board gt demo_apps hello_world lt toolchain gt e Library
135. d Location DCI SCL J2 Pin 20 gt I2C1_SCL J2 Pin 20 I2C1_SDA J2 Pin 18 gt DCI SDA J2 Pin 18 GND J2 Pin 14 D GND J2 Pin 14 FRDM KLO2Z Master Board Connects To Slave Board Pin Name Board Location Pin Name Board Location DC0 SCL JT Pin 10 D DC0 SCL J7 Pin 10 DC0 SDA J7 Pin 9 gt DC0 SDA JT Pin 9 GND J7 Pin 7 gt GND J7 Pin 7 FRDM KLO3Z Master Board Connects To Slave Board Pin Name Board Location Pin Name Board Location 12C0_SCL J2 Pin 10 gt DC0 SCL J2 Pin 10 DC0 SDA J2 Pin9 gt DC0 SDA J2 Pin 9 GND J2 Pin 7 gt GND J2 Pin 7 FRDM KL25Z The board doesn t support external pull up resistors for I2C pins So the internal pull up resistors is enable for I2C pins However the resistor is quite huge 20KOhm SOKOhm The 12C may run FAIL in high Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 61 Getting Started baurate In this case user need to use external pull up resistors Master Board Connects To Slave Board Pin Name Board Location Pin Name Board Location DC1 SCL J10 Pin 12 gt I2C1_SCL J10 Pin 12 DC1 SDA J10 Pin 10 gt DC1 SDA J10 Pin 10 GND J9 Pin 14 gt GND J9 Pin 14 FRDM KL26Z The board doesn t support external pull up resistors for I2C pins So the internal pull up resistors is enable for I2C pins However the resistor is quite huge 20KOhm SOKOhm The I2C may run FAIL in high baurate In this case user need to us
136. d rate e 8 data bits e No parity e One stop bit e No flow control Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 243 ARA NNN Getting Started 3 Download the program to the target board 4 Either press the reset button on your board or launch the debugger in your IDE to begin running the example 58 4 3 Run the example These instructions are displaved shown on the terminal window MMAU example start Sin pi 0 in frac32 format Sin 0 8xpi 1262259216 in frac32 format Sin 0 6xpi 2042378312 in frac32 format Sin 0 4xpi 2042378312 in frac32 format Sin 0 2xpi 1262259216 in frac32 format Sin 0 0 in frac32 format Sin 0 2xpi 1262259224 in frac32 format Sin 0 4xpi 2042378320 in frac32 format Sin 0 6xpi 2042378320 in frac32 format Sin 0 8xpi 1262259224 in frac32 format Sin pi 0 in frac32 format MMAU example end Afterwards the program enters an infinite loop Kinetis SDK v 1 3 Demo Applications User s Guide 244 Freescale Semiconductor Chapter 59 MPU Example 591 Overview MPU Example defines protected unprotected memory region from the core A memory region is config ured as the non writable region If any operation writes to this region this example provides a prevention alert by outputting a message on terminal Then this region becomes accessible and writing to it is suc cessful 59 2 Supported Platforms These Freescale Freedom de
137. demo lt toolchain gt e Library dependencies ksdk_platform_lib Kinetis SDK v 1 3 Demo Applications User s Guide 36 Freescale Semiconductor Commands Directions 104 Getting Started The Flash Demo example code shows how to erase and program the Flash content and use the swap feature if it is supported on the device 10 4 1 Prepare the Demo 1 Connect a USB cable between the PC host and the OpenSDA USB port on the board 2 Open a serial terminal with these settings e 115200 9600 for FRDM KLO3ZA8M for baud rate e 8 data bits e No parity e One stop bit e No flow control 3 Download the program to the target board 4 Either press the reset button on your board or launch the debugger in your IDE to begin running the demo For detailed instructions see a Kinetis SDK User s Guide for your board 10 5 Commands Directions 1 Select the Debug target from within the IDE and build the project selected for the target hardware The default Debug target runs from flash and demonstrates the Swap feature for devices that support Swap e g TWR K64F120M 2 Connect one end of the USB cable to a PC host and the other end to the OpenSDA connector on the board Open Terminal program such as TeraTerm Putty or Hyperterminal 4 Configure the Terminal program to select the OpenSDA COMX port for the board using e 115200 8NI 115200 baud 8 data bits No parity 1 Stop bit e Or FRDM KL03Z48M 9600 8N1 9600 baud 8 data bits No par
138. ds a Web page back to the PC 19 2 Supported RTOS e Freescale MQX RTOS e FreeRTOS e uC OS II e UC OS MI e Bare Metal no RTOS 19 3 Supported Hardware These Freescale Freedom development platforms and Tower System modules are supported by the Kinetis software development kit HTTPServer demo e FRDM K64F e TWR K60D100M e TWR K64F120M e TWR K65F180M 19 4 System Requirement 19 4 1 Hardware requirements e J Link ARM e P amp E Micro Multi link universal e Mini micro USB cable e USBA to micro AB cable e Hardware tower base board for specific device e Personal Computer Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 87 Getting Started 19 4 2 Software requirements e The project files are in Baremetal lt SDK_Install gt examples lt board gt demo_apps lwip lwip_httpserver_demo httpserver _bm lt toolchain gt RTOS lt SDK_Install gt examples lt board gt demo_apps lwip lwip_httpserver_demo httpserver _rtos lt rtos gt lt toolchain gt e Library dependencies Baremetal FreeRTOS uC OS ksdk_platform_lib MQX RTOS mqx_ lt board gt mqx_stdlib_ lt board gt 19 5 Getting Started See the Iw1P TCPIP Stack and Kinetis SDK Integration User s Guide document KSDKLWIPUG for more information about the setup and requirements 19 5 1 Prepare the Demo 1 Connect a USB cable between the PC host and the OpenSDA USB port on the board 2 Open a serial termi
139. e 25 4 4 Supported Low Power Modes By Platform This table shows the supported modes on different platforms Platform Supported Power Modes Wakeup Sources FRDM K22F WAIT STOP VLPR 4 MHz VL RTC SW2 PW VLPS LLS3 VLLSO VLLSI VLLS2 VLLS3 RUN 80MHz H SRUN 120MHz FRDM K64F WAIT STOP VLPR 4 MHz VL RTC SW2 PW VLPS LLS VLLSO VLLSI VLLS2 VLLS3 RUN 120MHz FRDM KL02Z48M WAIT STOP VLPR 1 MHz VL LPTMR PW VLPS VLLSI VLLS3 RU N 48MHz FRDM KL03Z48M WAIT STOP VLPR 2 MHz VL RTC SW2 PW VLPS LLS VLLSO VLLSI VLLS3 RUN 48MHz FRDM KL25Z WAIT STOP VLPR 4 MHz VL RTC PTD6 J2 17 to VSS J9 14 PW VLPS LLS VLLSO VLLSI VLLS3 RUN 48MHz FRDM KL26Z WAIT STOP VLPR 4 MHz VL RTC SW1 PW VLPS LLS VLLSO VLLSI VLLS3 RUN 48MHz FRDM KL27Z WAIT STOP VLPR 2 MHz VL RTC SW3 PW VLPS LLS VLLSO VLLSI VLLS3 RUN 48MHz FRDM KL43Z WAIT STOP VLPR 2 MHz VL RTC SW3 PW VLPS LLS VLLSO VLLSI VLLS3 RUN 48MHz FRDM KL46Z WAIT STOP VLPR 4 MHz VL RTC SW1 PW VLPS LLS VLLSO VLLSI VLLS3 RUN 48MHz Kinetis SDK v 1 3 Demo Applications User s Guide 110 Freescale Semiconductor A A Getting Started FRDM KV10Z WAIT STOP VLPR 4 MHz VL RTC SW3 PW VLPS VLLSO VLLSI VLL S3 RUN 75MHz FRDM KV31F WAIT STOP VLPR 4 MHz VL RTC SW3 PW VLPS LLS3 VLLSO VLLS1 VLLS2 VLLS3 RUN
140. e End message is displayed Hwtimer Example 15 5 Customization Options This demo application is customizable to show different types of hardware timers TWR KV11Z75M does not support PIT timer due to no PIT in KV11 silicon 15 5 1 Configure the Hardware Timer Used Determine Which timer the hardware timer driver uses The ARM core Systick timer is used by default define HWTIMER LL DEVIF kSystickDevif 15 5 22 Configure which clock is used by the hardware timer Determine Which clock source is used by the hardware timer tdefine HWTIMER LL SRCCLK kCoreClock 15 5 3 Configure which instance of the module is used Determine which instance of the selected hardware module to use For the Systick timer only 0 is valid If the PIT is used use this to select the PIT channel define HWTIMER LL ID 0 15 5 4 Hardware Timer Period Determine the timer period in microseconds define HWTIMER PERIOD 100000 Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 57 Customization Options Kinetis SDK v 1 3 Demo Applications User s Guide 58 Freescale Semiconductor Chapter 16 I2C Communication Demo This demo application demonstrates the I2C demo 16 1 Overview The I2C communication application demonstrates I2C data communication between two boards It also features low power wakeup of the slave board by using I2C address matching First the I2C slave board enters the low power wait mode An LED on the
141. e e 8 data bits e No parity e One stop bit e No flow control Download the program to the target board 4 Either press the reset button on your board or launch the debugger in your IDE to begin running the example N LI 50 4 3 Run the example These instructions are displaved shown on the terminal window Welcome to FTM example See the change of LED brightness After that the LED brightness is increasing and then dimming This is a continuous process Kinetis SDK v 1 3 Demo Applications User s Guide 210 Freescale Semiconductor Chapter 51 GPIO Example 51 1 Overview The GPIO Example project is a demonstration program that uses the KSDK software to manipulate the general purpose outputs The example is supported by the set clear and toggle write only registers for each port output data register The example uses the software button to control toggle the LED 51 2 Supported Platforms These Freescale Freedom development platforms and Tower System modules are supported by the GPIO example e FRDM K22F e FRDM K64F e FRDM KLO3Z e FRDM KL26Z e FRDM KL27Z e FRDM KL43Z e FRDM KL46Z e FRDM KVIOZ e FRDM KV31F e FRDM KW24 e FRDM KW40Z TWR K21D50M TWR K21F120M TWR K22F120M TWR K24F120M e TWR K60D100M TWR K64F120M TWR K65F180M TWR K80F150M e TWR KM34Z75M e TWR KL25Z48M e TWR KL43Z48M e TWR KV10Z32 e TWR KV11Z75M e TWR KV31F120M e TWR KW24D312 e USB KW4OZ KW40Z Kinetis SDK v 1 3 Demo Applicatio
142. e FlexIO simulated UART compares the received buffer in the FlexIO simulated UART side with the txBuff and checks whether the result is successful FlexIO simulated UART receive from FlexIO LPUART using DMA successfully FlexIO simulated UART receive from FlexIO LPUART using DMA successfully FlexIO simulated UART receive from FlexIO LPUART using DMA successfully FlexIO simulated UART receive from FlexIO LPUART using DMA successfully For other boards Transfer from FlexIO simulated UART to LPUART using DMA successfully FlexIO simulated UART receive from FlexIO LPUART using DMA successfully Transfer from FlexIO simulated UART to LPUART using DMA successfully FlexIO simulated UART receive from FlexIO LPUART using DMA successfully Transfer from FlexIO simulated UART to LPUART using DMA successfully FlexIO simulated UART receive from FlexIO LPUART using DMA successfully Transfer from FlexIO simulated UART to LPUART using DMA successfully FlexIO simulated UART receive from FlexIO LPUART using DMA successfully Kinetis SDK v 1 3 Demo Applications User s Guide 208 Freescale Semiconductor Chapter 50 FTM Example 501 Overview The FTM Example project is a demonstration program that uses the KSDK software to generate a square pulse PWM to control the LED brightness e FTM generates a PWM with the increasing and decreasing dutv cvcle e LED brightness is increasing and then dimming This is a continuous process 50 2 Supported Platforms The
143. e LEDs so the only available commands are 4 Read Tem perature and 5 Read Id MRB KW01 Single Board Master Connects To Slave Pin Name Board Location Pin Name Board Location I2C0_SCL J15 Pin 12 gt I2C1_SCL J15 Pin 13 D2C0 SDA J14 Pin8 gt DC1 SDA J15 Pin 11 Kinetis SDK v 1 3 Demo Applications User s Guide 76 Freescale Semiconductor Getting Started MRB KW01 Two Boards Master Board 1 Connects To Slave Board 2 Pin Name Board Location Pin Name Board Location I2CO_SCL J15 Pin 12 gt I2C1_SCL J14 Pin 14 I2CO_SDA J14 Pin 8 gt DC1 SDA J14 Pin 12 GND J14 Pin 18 gt GND J14 Pin 18 TWR K21D50M Tower System module TWR K21D50M Single Board Master Connects To Slave Pin Name Board Location Pin Name Board Location PTC10 12C0 SCL Primary Elevator gt PTD2 2C1 SCL Primary Elevator Pin A7 Pin B45 PTC11 I2 CO SDA Primary Elevator b PTD3 12C1 SDA Primary Elevator Pin AS Pin B44 TWR K21D50M Two Boards Master Board 1 Connects To Slave Board 42 Pin Name Board Location Pin Name Board Location PTC10 12C0_SCL Primary Elevator gt PTD2 12C1_SCL Primary Elevator Pin A7 Pin B45 PTC11 2C0_SDA Primary Elevator gt PTD3 I2C1_SDA Primary Elevator Pin A8 Pin B44 GND Primary Elevator gt GND Primary Elevator Pin A65 P
144. e TWR K60D100M e TWR K64F120M The freemaster demo lpuart demo Supported Platforms e FRDM KLOZZ notice cannot support the clock configuration of CLOCK SETUP 2 in k103 e TWR KLA3Z48M The freemaster demo uart demo Supported Platforms e FRDM K22F e FRDM K64F e TWR K21D50M e TWR K22F120M e TWR K60D100M TWR K64F120M e TWR KV10Z32 e TWR KV31F120M The freemaster demo usbcdc demo Supported Platforms e TWR K22F120M Kinetis SDK v 1 3 Demo Applications User s Guide 40 Freescale Semiconductor ij FreeMASTER Demo Introduction e TWR K60D100M e TWR K64F120M e TWR KL43Z48M However the driver included in the src folder also supports other Kinetis platforms Get the FreeMASTER PC Host tool installer from the http www freescale com freemaster web site 11 2 1 System Requirement 11 2 1 1 Hardware requirements e J Link ARM e P amp E Micro Multi link universal e Mini micro USB cable e USB A to micro AB cable e Hardware tower base board for specific device e Personal Computer Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 41 A EEE FreeMASTER Demo User s Guide 11 3 FreeMASTER Demo User s Guide This chapter provides a user s guide to the FreeMASTER Demo application Getting Started Open the demo application project in vour favorite development environment If the application project is not ready out of the box for your particular board you can create an empty KSD
145. e external pull up resistors Master Board Connects To Slave Board Pin Name Board Location Pin Name Board Location I2CO_SCL J2 Pin 20 gt I2C0_SCL J2 Pin 20 PCO SDA J2 Pin 18 gt I2CO_SDA J2 Pin 18 GND J2 Pin 14 gt GND J2 Pin 14 FRDM KL27Z Master Board Connects To Slave Board Pin Name Board Location Pin Name Board Location DC1 SCL J2 Pin 20 gt DC1 SCL J2 Pin 20 DC1 SDA J2 Pin 18 gt DC1 SDA J2 Pin 18 GND J2 Pin 14 gt GND J2 Pin 14 FRDM KL43Z FRDM KL43ZKL33 FRDM KL46Z The board doesn t support external pull up resistors for I2C pins So the internal pull up resistors is enable for I2C pins However the resistor is quite huge 20KOhm SOKOhm The 12C may run FAIL in high baurate In this case user need to use external pull up resistors Master Board Connects To Slave Board Pin Name Board Location Pin Name Board Location I2CO_SCL J2 Pin 20 gt I2C0_SCL J2 Pin 20 PCO SDA J2 Pin 18 gt PCO SDA J2 Pin 18 Kinetis SDK v 1 3 Demo Applications User s Guide 62 Freescale Semiconductor Getting Started GND J2 Pin 14 gt GND J2 Pin 14 FRDM KW24 Master Board Connects To Slave Board Pin Name Board Location Pin Name Board Location DC0 SCL J2 Pin 20 gt I2CO SCL J2 Pin20 DC0 SDA J2 Pin 18 D
146. e input digital signal from the ADCO SE23 ADCO SE6 on FRDM KV10Z pin and records each sample point with the appropriate amplitude After 2 period samples are complete it prints out the rough shape of the signal wave on the debug console like a primitive oscilloscope 2 2 Supported Platforms These Freescale Freedom development platforms and Tower System modules are supported by the KSDK ADC Hardware Trigger demo The adc Iptmr trigger demo Supported Platforms e FRDM K22F e FRDM K64F e FRDM KLO2Z e FRDM KLO3Z e FRDM KL25Z e FRDM KL26Z e FRDM KL27Z e FRDM KL43Z e FRDM KL46Z e FRDM KVIOZ e FRDM KV31F e FRDM KW40Z e MRB KWOL Kinetis SDK v 1 3 Demo Applications User s Guide 4 Freescale Semiconductor AS ii Supported Platforms TWR K21D50M TWR K21F120M TWR K22F120M TWR K24F120M e TWR K60D100M TWR K64F120M TWR K65F180M TWR K80F150M e TWR KL43Z48M e TWR KM34Z75M e TWR KV10Z32 e TWR KV11Z75M e TWR KV31F120M The adc_pdb_trigger demo Supported Platforms e FRDM K22F e FRDM K64F FRDM KV10Z e FRDM KV31F TWR K21D50M TWR K21F120M TWR K22F120M TWR K24F120M e TWR K60D100M TWR K64F120M TWR K65F180M TWR K80F150M e TWR KM34Z75M e TWR KV10Z32 e TWR KV11Z75M e TWR KV31F120M The adc_pit_trigger demo Supported Platforms e FRDM K22F e FRDM K64F e FRDM KL25Z e FRDM KL26Z e FRDM KL27Z e FRDM KL43Z e FRDM KL46Z e FRDM KV31F e FRDM KW40Z e MRB KWOL TWR K21D50M TWR K21F120M Kinetis SDK v 1 3 Demo Appli
147. e keyboard and the board receives and then echoes them to terminal screen 74 4 3 2 UART non blocking These instructions are displayed shown on the terminal window ttt UART Send Receive Non Blocking Example Type the characters on the keyboard and the board receives and then echoes them to terminal screen Type the characters on the keyboard and the board receives and then echoes them to terminal screen 74 4 3 3 UART DMA blocking These instructions are displayed shown on the terminal window ttt UART DMA Send Receive Blocking Example Type the characters on the keyboard and the board receives and then echoes them to terminal screen Type the characters on the keyboard and the board receives and then echoes them to terminal screen 74 4 3 4 UART DMA non blocking These instructions are displayed shown on the terminal window ttt UART DMA Send Receive Non Blocking Example Type characters from keyboard the board receives and then echoes them to the terminal screen Type the characters on the keyboard and the board receives and then echoes them to terminal screen Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 295 ARA Getting Started 74 4 3 5 UART polling These instructions are displaved shown on the terminal window UART Send Receive Polling Example Type the chara
148. e recommendation is to leave the development board s jumper settings and configurations in default state when running this example 55 4 2 Prepare the example 1 Connect a USB cable between the PC host and the OpenSDA USB port on the board 2 Open a serial terminal with these settings e 115200 baud rate e 8 data bits e No parity e One stop bit e No flow control 3 Download the program to the target board 4 Either press the reset button on your board or launch the debugger in your IDE to begin running the example 55 4 3 Run the example These instructions are displayed shown on the terminal window Low Power Timer Example Kinetis SDK v 1 3 Demo Applications User s Guide 232 Freescale Semiconductor A i Getting Started LPTMR interrupt No l LPTMR interrupt No 2 LPTMR interrupt No 3 An LPTMR interrupt is triggered once every second The LED blinks and prints out the number of interrupts that have occurred since the program started running Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 233 AN A Getting Started Kinetis SDK v 1 3 Demo Applications User s Guide 234 Freescale Semiconductor Chapter 56 Low Power Universal Asvnchronous Receiver Transmitter LPUA RT Example with other methods 561 Overview This LPUART example application demonstrates the SDK Peripheral drivers working with different meth ods The LPUART example shows transmit receive LPUART driver with these effici
149. e sure DSPIO DSPIO are connected Transfer at baudrate 468750 Master transmit 01 02 03 04 05 06 07 08 09 OA OB OC OD OE OF 10 11 12 13 14 15 16 17 18 19 1A 1B IC ID IE IF 20 Master receive 01 02 03 04 05 06 07 08 09 OA OB OC OD OE OF 10 11 12 13 14 15 16 17 18 19 1A 1B IC ID IE IF 20 DSPI Master Sends Receives successfully Press any key to run again The slave board receives and prints this message on the terminal Slave receive 01 02 03 04 05 06 07 08 09 OA OB OC OD OE OF 10 11 12 13 14 15 16 17 18 19 1A 1B IC ID IE IF 20 Slave example is running DSPI eDMA blocking Master Slave Set up the slave first and the slave board displays this message on the terminal Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 169 AR Getting Started DSPI board to board EDMA blocking example This example run on instance 0 Be sure DSPIO DSPIO are connected Slave example is running The master sends an array to the slave and receives the array back from the slave It also compares whether the two buffers are the same The master board print this message on the terminal DSPI board to board eDMA blocking example This example run on instance 0 Be sure DSPIO DSPIO are connected Transfer at baudrate 468750 Master transmit 01 02 03 04 05 06 07 08 09 OA OB OC OD OE OF 10 11 12 13 14 15 16 17 18 19 1A 1B IC ID IE IF 20 Master receive 01 02 03 04 05 06 07 08 09 OA OB OC OD OE OF 10 11 12 13 14 15 16 17 18 19 1A
150. ect J1 10 with J3 13 by using external wire 35 4 3 Prepare the example 1 Connect a USB cable between the PC host and the OpenSDA USB port on the board 2 Open a serial terminal with these settings e 115200 baud rate e 8 data bits e No parity e One stop bit e No flow control 3 Download the program to the target board 4 Either press the reset button on your board or launch the debugger in your IDE to begin running the example 35 4 4 Run the example These instructions are displayed shown on the terminal window The demo compares analog input to the reference DAC output to control an LED he LED is turned ON OFF when the analog input is LOWER HIGHER than the DAC output Press SW to see the LED status H for TWR KM34Z75M hange the potentiometer position to see the LED status Q he analog input is HIGHER than DAC output he analog input is LOWER than DAC output he analog input is HIGHER than DAC output he analog input is LOWER than DAC output Kinetis SDK v 1 3 Demo Applications User s Guide 150 Freescale Semiconductor A i Getting Started Press the SW x button on the board and observe the LED toggle NOTE For the TWR K65F180M board the on board potentiometer is used instead of the SW button Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 151 AN A Getting Started Kinetis SDK v 1 3 Demo Applications User s Guide 152 Freescale Semiconductor Chapter 36 CMT Example
151. ed id sek 2 aa a avkos aka res 57 13 2 Configure which clock is used by the hardware timer 57 15 5 3 Configure which instance of the module is used 57 1854 Hardware Timer Period soso 57 Kinetis SDK v 1 3 Demo Applications User s Guide viii Freescale Semiconductor Section number Title Page Chapter 16 I2C Communication Demo 16 1 CRC JO 59 16 2 Supported Platforms 59 16 3 System Requirement s s 60 16 3 1 Hardware requirements o ke kem a ee RRR Re kok kok kok RS 60 16 3 2 Software requirements 6 sasa sa bba bb arar 60 16 4 Getting Started 06 skada kk 4 4 ee kokon a na 60 16 4 1 Hardware configu ration s a ea OS Oe OS koko kok Oe kva ee 60 16 4 2 Terminal configuration lt eb eh a ag a AR ARA 67 16 4 3 OE ap aa kuo kok akoo KO dri i loje Sek SE see Re A 67 Chapter 17 I2C Demo with RTOS 17 1 RETINO SS a ORS da SRE ke ka SRS ORS B oS 69 17 2 Supported RTOS o SAH ERS HER op la EK a EHR o ESS 69 17 3 Supported Platforms s s 69 17 4 System Requirement aaa 71 17 4 1 Hardware IEQUIESMED S coord 71 17 4 2 Software POQUINGIMGNIS oceania ao aao l o RR a a aa 71 17 5 Getting Started cociendo keke kk ok i koe i ok OS 71 1735 1 Build with different RTOS support 71 17 5 2 Hardware configuration MAA 12 ps Prepare ihe Demo o ajo kelaro o eo e Eo ke ko a dv Du e avo a lv SIUN KU N
152. ed type X character from the keyboard These instructions are displayed shown on the terminal window Start write read compare demo Single block write read compare demo passed Multi block write read compare demo passed Erase blocks demo passed SD Card Demo End Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 265 AN A Getting Started Kinetis SDK v 1 3 Demo Applications User s Guide 266 Freescale Semiconductor Chapter 67 SDRAMC Example 67 1 Overview The svnchronous DRAM controller module SDRAM provides a seamless integration of SDRAM This example uses the SDRAMC peripheral to initialize the SDRAM 67 2 Supported Platforms These Tower Svstem modules are supported bv the SDRAMC example e TWR K65F180M e TWR K80F150M 67 3 System Requirement 67 3 1 Hardware requirements J Link ARM P amp E Micro Multi link universal e Mini micro USB cable e USB A to micro AB cable e Hardware Tower System base board for specific device e Personal Computer 67 3 2 Software requirements e The project files are in lt SDK_Install gt examples lt board gt driver_examples sdramc lt toolchain gt e Library dependencies ksdk platform lib 67 4 Getting Started 67 4 1 Hardware settings The SDRAMC Example project does not call for anv special hardware configurations Although not required the recommendation is to leave the development board s jumper settings and configurations in defa
153. emiconductor 297 7888383833 Getting Started e Mini micro USB cable e USBA to micro AB cable e Hardware tower base board for specific device e Personal Computer 75 3 2 Software requirements e The project files are in lt SDK_Install gt examples lt board gt driver_examples wdog lt toolchain gt e Library dependencies ksdk platform lib 754 Getting Started 75 4 1 Hardware settings The WDOG Example project does not call for any special hardware configurations Although not required the recommendation is to leave the development board s jumper settings and configurations in default state when running this example 75 4 2 Prepare the example 1 Connect a USB cable between the PC host and the OpenSDA USB port on the board 2 Open a serial terminal with these settings e 115200 baud rate e 8 data bits e No parity e One stop bit e No flow control 3 Download the program to the target board 4 Either press the reset button on your board or launch the debugger in your IDE to begin running the example 75 4 3 Run the example These instructions are displaved shown on the terminal window WDOG example Press SW to expire watchdog WDOG reset occurred Press SW to expire watchdog WDOG reset occurred Press SW to expire watchdog After that user need press the SW x button on board and observe a LED toggle for showing that the watchdog is about to expire Kinetis SDK v 1 3 Demo Applications User s Guide 2
154. ency methods e Using blocking method e Using non blocking method e Using DMA blocking method e Using DMA non blocking method e Using polling method Transfer data between the board and the PC The board transfers and receives characters through the LP UART interface Type characters on the keyboard and the board receives and echoes them to the terminal screen Look for instructions output to the terminal 56 2 Supported Platforms These Freescale Freedom development platforms and Tower System modules are supported by the LPU ART example e FRDM KLO3Z x EDMA not support e FRDM KL27Z e FRDM KLAZZ x EDMA not support e FRDM KW40Z e TWR K80F150M e TWR KM34Z75M USB KW40Z 56 3 System Requirement 56 3 1 Hardware requirements e J Link ARM e P amp E Micro Multi link universal e Mini micro USB cable e USB Ato micro AB cable e Hardware Tower System base board for a specific device e Personal Computer For TWR KM34Z75M Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 235 8585858551 Getting Started J Link ARM USB A to USB Mini B cable e Hardware Tower System base board for a specific device e Personal Computer USB UART TTL conversion board 56 3 2 Software requirements e The project files are in SDK Install examples board driver examples lpuart xuse case gt lt toolchain gt e Library dependencies ksdk_platform_lib 56 4 Getting Started 56 4 1
155. equires two separate boards Connect instance SPIO master to SPIO slave FRDM KLO2Z Master Board Connects To Slave Board Pin Name Board Location Pin Name Board Location MISO J7 pin 5 gt MISO J7 pin 5 MOSI J7 pin 4 gt MOSI J7 pin 4 SCK J7 pin 3 gt SCK J7 pin 3 PCSO J7 pin 6 gt PCSO J7 pin 6 GND J7 pin 7 gt GND J7 pin 7 FRDM KLO3Z Master Board Connects To Slave Board Pin Name Board Location Pin Name Board Location MISO J2 pin 3 gt MISO J2 pin 3 Kinetis SDK v 1 3 Demo Applications User s Guide 276 Freescale Semiconductor Getting Started MOSI J2 pin 5 gt MOSI J2 pin 5 SCK J2 pin 4 gt SCK J2 pin 4 PCSO J2 pin 6 gt PCSO J2 pin 6 GND J2 pin 7 gt GND J2 pin 7 FRDM KL25Z Master Board Connects To Slave Board Pin Name Board Location Pin Name Board Location MISO J1 pin 11 gt MISO J1 pin 11 MOSI Jl pin 1 gt MOSI J1 pin 1 SCK JI pin9 gt SCK J1 pin 9 PCSO JI pin 7 gt PCSO JI pin 7 GND J2 pin 14 gt GND J2 pin 14 FRDM KL26Z Master Board Connects To Slave Board Pin Name Board Location Pin Name Board Location MISO JI pin9 gt MISO JI pin 9 MOSI J1 pin 11 gt MOSI J1 pin 11 SCK J4 pin 9 gt SCK J4 pin 9 PCSO JI pin 7 gt PCSO JI pin 7 GND J2 pin 14 gt GND J2 pin 14 F
156. er receives the decoded signal 47 2 Supported Platforms This Freescale Freedom development platform is supported by the KSDK FlexIO IRDA example e FRDM KL43Z 47 3 System Requirement 47 3 1 Hardware requirements e J Link ARM e P amp E Micro Multilink universal e Mini micro USB cable e USB A to micro AB cable e Personal Computer 47 4 Getting Started 47 4 1 Hardware Settings The FlexIO IRDA project does not call for any special hardware configurations in default loop back mode For non loop back mode or using CMPO trig mode connect the FlexIO and CMPO pins according to the following settings FRDM KLAZZ CMPO Trig mode e fsl flexio irda h define IRDA RX CMPO TRIGto1 e main h define LOOPBACK TEST to 0 Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 195 Getting Started FlexIO CMPO Connects To Pin Name Board Location Pin Name Board Location PTD7 32 10 gt PTC6 Jl 9 Non loop back mode this mode loops back externallv for an easv demo test e fsl flexio irda h define IRDA RX CMPO TRIG to 0 e main h define LOOPBACK TEST to 0 FlexIO FlexIO Connects To Pin Name Board Location Pin Name Board Location PTD6 J2 8 gt PTD7 J2 10 The user can check UART and IRDA waveform at the following pins Pin Name Board Location Function Comments PTD4 J2 6 FlexIO simulated UART Optional OFF define TX FLEXIO_UART_TX_PI NEN t
157. esistors is enable for I2C pins However the resistor is quite huge 20KOhm SOKOhm The I2C may run FAIL in high baurate In this case user need to use external pull up resistors FRDM KL26Z Single Board Master Connects To Slave Pin Name Board Location Pin Name Board Location I2CO_SCL J4 Pin 6 gt I2C1_SCL J2 Pin 20 ID2C0 SDA J4 Pin 8 gt DC1 SDA J2 Pin 18 FRDM KL26Z Two Boards Master Board 1 Connects To Slave Board 2 Pin Name Board Location Pin Name Board Location I2CO_SCL J4 Pin 6 gt I2C1_SCL J2 Pin 20 ID2C0 SDA J4 Pin 8 gt DC1 SDA J2 Pin 18 GND J2 Pin 14 gt GND J2 Pin 14 Freescale Freedom FRDM KL27Z FRDM KL27Z Single Board Master Connects To Slave Pin Name Board Location Pin Name Board Location I2CO_SCL J4 Pin 20 gt I2C1_SCL J4 Pin 12 PCO SDA J4 Pin 18 gt DC1 SDA J4 Pin 10 FRDM KL27Z Two Boards Master Board 1 Connects To Slave Board 2 Pin Name Board Location Pin Name Board Location I2CO_SCL J4 Pin 20 gt I2C1_SCL J4 Pin 12 I2CO_SDA J4 Pin 18 gt DC1 SDA J4 Pin 10 GND J2 Pin 14 gt GND J2 Pin 14 Freescale Freedom FRDM KL43Z The board doesn t support external pull up resistors for I2C pins So the internal pull up resistors is enable for I2C pins However the resistor is quite huge 20KOhm 50KOhm The I2C may run FA
158. gram the external serial flash e QSPI using DMA method to program the external serial flash 62 2 Supported Platforms This Tower System modules are supported by the QSPI example e TWR K80F150M 62 3 System Requirement 62 3 1 Hardware requirements e J Link ARM e P amp E Micro Multi link universal e Mini micro USB cable e USB A to micro AB cable e Hardware Tower System base board for a specific device e Personal Computer 62 3 2 Software requirements e The project files are in lt SDK_Install gt examples lt board gt driver_examples qspi lt toolchain gt e Library dependencies ksdk_platform_lib 62 4 Getting Started 62 4 1 Hardware settings This example requires external serial flash powered TWR K80F 150M Jumper J30 pin4 and pin6 should be connected Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 253 L Getting Started 62 4 2 Prepare the example 1 Connect a USB cable between the PC host and the OpenSDA USB port on the board 2 Open a serial terminal with these settings e 115200 baud rate e 8 data bits e No parity e One stop bit e No flow control 3 Download the program to the target board 4 Either press the reset button on your board or launch the debugger in your IDE to begin running the example 62 4 3 Run the example These instruction are displayed shown on the terminal window QSPI example started Erase finished Program data finished Prog
159. he http banskv net echotool example echotool 192 168 2 102 p udp r 7 d hello 6 If the operation is successful all packets sent back are the same as the packets sent to the board Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 99 Run the demo Kinetis SDK v 1 3 Demo Applications User s Guide 100 Freescale Semiconductor Chapter 23 MMAU Filter Demo 23 1 Overview The Memorv Mapped Arithmetic Unit MMAU provides acceleration to a set of mathematical operations including signed unsigned multiplication and accumulation division and square root and so on This demo shows a typical use of the Memory Mapped Arithmetic Unit MMAU for 4th order lowpass filter computing The operation of 4th order lowpass filter function is given by the following equation y n b0 x n b 1 x n 1 b2 x n 2 b3 x n 3 b4 x n 4 al y n 1 a2xy n 2 a3xy n 3 a4 y n 4 23 2 Supported Platforms This Tower System module is supported by the MMAU example e TWR KM34Z75M 23 3 System Requirement 23 3 1 Hardware requirements J Link ARM P amp E Micro Multi link universal e Mini micro USB cable e USB A to micro AB cable e Hardware tower base board for specific device e Personal Computer 23 4 Getting Started 23 4 1 Hardware settings The MMAU Example project does not call for any special hardware configurations Although not required the recommendation is to leave the development board s jumper setting
160. he PDB Pre trigger A B channel FRDM K L26Z and MRB KWOL does not support PDB trigger because PDB is not present neither on KL26 nor on KWOI silicon 2 1 3 Trigger by LPTMR The Low Power Timer LPTMR is a period timer source and the ADC hardware trigger event Because the LPTMR trigger event can only be used to trigger one of the ADC channels channel 0 or 1 this demo uses the LPTMR as a trigger source for the ADCx channel 0 The LPTMR triggers the ADC in a fixed frequency and the demo gets the ADC conversion result in the ADC Conversion Complete COCO interrupt Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 3 8585858555 Supported Platforms 2 1 4 Input signal for ADC Use the DAC module to generate a sine wave as the ADC input on the DACO OUT pin Normallv the DACO OUT is internallv connected to the ADCO SE23 DACO OUT is a source of ADCO SE23 there is no need to connect any external signals for this demo For TWR KV11 ADCI SEA is used Boards listed below need external sine wave connected either because of lack of the DAC hardware feature support or lack of the SoC Board signal connection support For FRDM KV10Z use external generator to generate a sine wave on the ADCO_SE6 pin J2 1 e FRDM KLO2Z e FRDM KLO3Z e FRDM KL25Z e FRDM KL26Z e FRDM KL27Z e FRDM KL43Z e FRDM KL46Z e FRDM KVIOZ e FRDM KW40Z e MRB KWOL e TWR KL43Z48M e TWR KM34Z75M e TWR KVIOZ32 This demo samples th
161. he boards Preferablv this ground connection should be as close as possible to the SPI signals on each board A poor board to board con nection compromises data signal integritv causing failures in the example Master sends an array to the slave and receives the array back from the slave It also compares whether the two buffers are the same The slave sends back the received buffer from the master x Power up slave first e DSPI master loop back Transfer data through instance 0 of SPI interface The MISO pin and MOSI pin are connected Sends an array out through the MISO pin and compares it with the received buffer from the MOSI pin 40 2 Supported Platforms These Freescale Freedom development platforms and Tower Svstem modules are supported bv the DSPI example FRDM K22F FRDM K64F FRDM KV10Z FRDM KV31F FRDM KW24 FRDM KW40Z TWR K21D50M TWR K21F120M TWR K22F120M TWR K24F120M TWR K60D100M TWR K64F120M TWR K65F180M TWR K80F150M Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 163 AR Getting Started TWR KV10Z32 TWR KV11Z75M TWR KV31F120M TWR KW24D312 40 3 System Requirement 40 3 1 Hardware requirements J Link ARM e P amp E Micro Multi link universal e Mini micro USB cable e USB A to micro AB cable e Hardware tower base board for specific device e Personal Computer 40 3 2 Software requirements e The project files are in lt SDK_Install gt exam
162. he listed signals by using the external wires In case of TWR KV11Z75M also connect pin 2 and 3 on J4 and J11 Freescale Freedom FRDM K22F FRDM K22F Single Board Master Connects To Slave Pin Name Board Location Pin Name Board Location I2CO_SCL J24 Pin 12 gt I2C1_SCL J1 Pin 13 I2CO_SDA J24 Pin 10 gt DC1 SDA J2 Pin7 FRDM K22F Two Boards Master Board 1 Connects To Slave Board 2 Pin Name Board Location Pin Name Board Location I2CO_SCL J24 Pin 12 gt I2C1_SCL J1 Pin 13 I2CO_SDA J24 Pin 10 gt DC1 SDA J2 Pin7 GND TP21 gt GND TP21 Freescale Freedom FRDM K64F FRDM K64F Single Board Master Connects To Slave Pin Name Board Location Pin Name Board Location I2CO_SCL J2 Pin 20 gt I2C1_SCL J4 Pin 12 ID2C0 SDA J2 Pin 18 gt DC1 SDA J4 Pin 10 FRDM K64F Two Boards Master Board 1 Connects To Slave Board 2 Pin Name Board Location Pin Name Board Location I2CO_SCL J2 Pin 20 gt I2C1_SCL J4 Pin 12 PCO SDA J2 Pin 18 gt DC1 SDA J4 Pin 10 Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 12 Getting Started GND J2 Pin 14 gt GND J2 Pin 14 FRDM K64F Two Boards Master Board 1 Connects To Slave Board 2 Pin Name Board Location Pin Name Board Location
163. he recommendation is to leave the development board s jumper settings and configurations in default state when running this example 42 4 2 Prepare the example Connect a USB cable between the PC host and the OpenSDA USB port on the board Open a serial terminal with these settings e 115200 baud rate e 8 data bits e No parity e One stop bit e No flow control 3 Download the program to the target board 4 Either press the reset button on your board or launch the debugger in your IDE to begin running the example DD 42 4 3 Run the example These instructions are displaved shown on the terminal window EWM example Press SW to expire EWM Press the SW x button on the board to reset the counter and enable the interrupt for the next run These instruction are displaved shown on the terminal window EWM interrupt has occurred Press SW to allow the EWM to expire Kinetis SDK v 1 3 Demo Applications User s Guide 178 Freescale Semiconductor Chapter 43 FLASH Example 43 1 Overview The Flash Example project is a demonstration program that uses the KSDK software to access Flash memory The example provide following features e Check flash information e Erase a sector and verify e Program a sector and verify 43 2 Supported Platforms These Freescale Freedom development platforms and Tower System modules are supported by the FLASH example e FRDM K22F e FRDM K64F e FRDM KLO2Z e FRDM KLO3Z e FRDM KL25Z e FRDM
164. he reset button on your board or launch the debugger in your IDE to begin running the example EU IO 46 4 3 Run the example These instruction are repeatedly displayed shown on the terminal window Master Interrupt testing passed Master DMA testing passed Slave Interrupt testing passed Slave DMA testing passed Users can hear the sine wave sound in the headphones note Because the FlexIO does not have the MCLK the example has to use the MCLK in the TWR SGTL5000 Tower System module to make the codec work correctly The clock which is not a part of the FlexIO clock source is not accurate This issue causes the clock mismatch between the FlexIO and the sgtl5000 codec As a result when the FlexIO 12s is the master it has a certain amount of noise Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 193 AN A Getting Started Kinetis SDK v 1 3 Demo Applications User s Guide 194 Freescale Semiconductor Chapter 47 FlexlO IRDA Example This example application demonstrates FlexIO timer to encode and decode IRDA pulse 47 1 Overview This example uses FlexIO UART driver and FlexIO timers to send and receive IRDA signals Data is first sent via FlexIO simulated UART then the simulated UART TX signal is routed into one FlexIO timer and encoded into IRDA pulse On the receiving side the IRDA pulse is first routed into one FlexIO timer the timer decodes it into UART RX signal then FlexIO UART driv
165. hts nor the rights of others Freescale sells products pursuant to standard terms and conditions of sale which can be found at the following address freescale com Sales TermsandConditions Freescale the Freescale logo Kinetis Processor Expert are trademarks of Freescale Semiconductor Inc Reg U S Pat amp Tm Off Tower is a trademark of Freescale Semiconductor Inc All other product or service names are the property of their respective owners ARM ARM Powered logo Keil and Cortex are registered trademarks of ARM Limited or its subsidiaries in the EU and or elsewhere All rights reserved 2015 Freescale Semiconductor Inc e Po freescale
166. ibe Demo o son e a GE dj eee elkoi iele SITE SE o 9 48 13 5 IICA iia 4824 4 2 402 ai de ede A e ha Ga 48 Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor vi Section number Title Page 13 6 Communication Interface Settings 49 Chapter 14 Hello World QSPI Demo 14 1 INIO A 51 14 2 Supported Platforms co aa ak Sk DEK SON da AAA 51 14 3 System Requirement 51 14 3 1 Hardware requirements 4 o a k a 3 kos a je See a Goa ke dos 31 14 3 2 Software requirements 5 3 irc A aa SESS 51 14 4 Gena ID oe o eee kopra kapeo a eke dek di ER PES ESA 52 14 4 1 Hardware settings 4 60 ik b b b e A eS 32 14 4 2 Prepare Wie example ke s i es kei ke o ERE ka RRR a km 52 14 4 3 R n Se 00 sori cori roie Se we GOE we SUE IO KO a Soie Remera dio 53 Chapter 15 Hardware Timer Demo 15 1 yj oa a a ee p te Be e a ee a we ke ele e a O 55 15 2 Supported Platforms s s 55 15 3 System Requirement 56 13 3 1 TINA I ok o a me Se Gm Se Oe A SE 56 i Software requirements lt lt so a e we hee ee eee eee la buda GS 56 15 4 Geine Started ht Ae eae eee boa OER oka peo a EU 56 15 4 1 Prepare tlie Demo 5 ca Gb sesa ss atu a b b dl A i Pew uj vado 56 154 2 Ryn he TEO a A A ee Bada es 56 15 5 Customization Options soseo 57 13554 Configure the Hardware Timer Us
167. icro Multi link universal e Mini micro USB cable e USB A to micro AB cable e Hardware tower base board for specific device e Personal Computer 17 4 2 Software requirements e The project files are in lt SDK_Install gt examples lt board gt demo_apps i2c_rtos lt rtos gt lt toolchain gt Where lt rtos gt is the chosen RTOS configuration e Library dependencies Baremetal FreeRTOS uC OS ksdk platform lib MQX RTOS mqx board mqx stdlib board 17 5 Getting Started The I2C RTOS application is designed to work on one single board or two different boards default master uses I2CO slave uses I2C1 except special cases check symbols IZC RTOS MASTER INSTANCE and MBC RTOS SLAVE INSTANCE Note that the bare metal version only supports two boards 17 5 1 Build with different RTOS support Before running this application build it with the RTOS you want to use The projects for different RT OSes are differentiated by the workspace file name in the format of i2c_rtos_ lt rtos gt eww For example in IAR the i2c rtos ucosii eww workspace file is the uC OS II version of this application After opening Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 71 Getting Started the appropriate workspace build the ksdk rtos lib project and build the application project A binary named i2c rtos rtos out is generated 17 5 2 Hardware configuration Make the connections between t
168. imary Elevator Pin A65 Pin A65 TWR K24F120M Tower System module TWR K24F120M Single Board Master Connects To Slave Pin Name Board Location Pin Name Board Location DC0 SCL Primary Elevator gt I2C1_SCL Primary Elevator A7 B50 Kinetis SDK v 1 3 Demo Applications User s Guide 78 Freescale Semiconductor Getting Started DC0 SDA Primarv Elevator gt DCI SDA Primary Elevator AS B51 TWR K24F120M Two Boards Master Board 1 Connects To Slave Board 2 Pin Name Board Location Pin Name Board Location DC0 SCL Primary Elevator gt I2CI SCL Primarv Elevator AT B50 DC0 SDA Primary Elevator gt I2C1_SDA Primary Elevator AS B51 GND Primary Elevator gt GND Primary Elevator A6 A6 TWR K60D100M Tower System module TWR K60D100M Single Board Master Connects To Slave Pin Name Board Location Pin Name Board Location DC0 SCL Primary Elevator gt I2C1_SCL Primary Elevator A7 A75 DC0 SDA Primary Elevator gt DCI SDA Primary Elevator AS B71 TWR K60D100M Two Boards Master Board 1 Connects To Slave Board 2 Pin Name Board Location Pin Name Board Location DC0 SCL Primary Elevator D I2CI SCL Primarv Elevator AT A75 DC0 SDA Primarv Elevator gt DCI SDA Primary Elevator AS B71 GND Primary Elevator gt GND Primary Elevator A6 A6 TWR K64F120M Tower System module TWR K64F120M Single B
169. imary Elevator gt GND Primary Elevator A6 A6 TWR K65F180M TWR K80F150M Master Board Connects To Slave Board Pin Name Board Location Pin Name Board Location I2CO SCL Primary Elevator gt I2CO SCL Primary Elevator Pin A7 Pin A7 DC0 SDA Primary Elevator gt DC0 SDA Primary Elevator Pin A8 Pin A8 GND Primary Elevator gt GND Primary Elevator A65 A65 TWR KW24D512 Master Board Connects To Slave Board Pin Name Board Location Pin Name Board Location DC0 SCL Primary Elevator gt I2CO SCL Primarv Elevator AT AT DC0 SDA Primary Elevator gt DC0 SDA Primarv Elevator AS AS GND Primary Elevator gt GND Primary Elevator A81 A81 Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 65 Getting Started TWR K21F120M Master Board Connects To Slave Board Pin Name Board Location Pin Name Board Location I2CI SCL Primarv Elevator gt I2C1_SCL Primary Elevator B50 B50 I2C1_SDA Primary Elevator gt I2C1_SDA Primary Elevator B51 B51 GND Primary Elevator gt GND Primary Elevator A65 A65 FRDM KV31F The board doesn t support external pull up resistors for I2C pins So the internal pull up resistors is enable for I2C pins However the resistor is quite huge 20KOhm 50KOhm The I2C may run FAIL in high baurate In this case user need to use external pull up resistors Master Board Connects
170. imulated I2C driver working with different methods The FlexIO I2C example shows transmit receive between the FlexIO simulated I2C and I2C1 using these efficiency methods e Using blocking method e Using non blocking method 45 2 Supported Platforms These Freescale Freedom development platforms and Tower System modules are supported by the FlexIO I2C example e FRDM KL27Z e FRDM KL43Z e TWR KLA3Z48M e TWR K80F150M 45 3 System Requirement 45 3 1 Hardware requirements J Link ARM P amp E Micro Multi link universal e Mini micro USB cable USB A to micro AB cable e Personal Computer 45 3 2 Software requirements e The project files are in lt SDK_Install gt examples lt board gt driver_examples flexio i2c lt toolchain gt e Library dependencies ksdk_platform_lib 45 4 Getting Started 45 4 1 Hardware settings This example requires connecting the FlexIO pins with the 12C1 pins Connect FlexIO pins to the I2C1 pins Note that the default uses FlexIO pin5 and pin4 Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 187 Getting Started FlexIO Pins Connects To DCl Pins FlexIO Pin5 gt DC1 SDA FlexIO Pin4 gt I2C1 SCL Make these connections between the FlexIO pins and the I2C1 pins by using external wires TWR KL43Z48 FlexIO Pins Connects To DC1 Pins Pin Name Board Location Pin Name Board Location PTD5 FLEXIO PI Primary Elevator gt I2C1 SDA
171. in A65 TWR K21F120M Tower System module TWR K21F120M Single Board Master Connects To Slave Pin Name Board Location Pin Name Board Location PTD2 I2CO_SCL Primary Elevator gt PTC10 12C1 SCL Primary Elevator B45 B50 PTD3 2CO SDA Primarv Elevator gt PTC11 12C1 SDA Primary Elevator B44 B51 Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 11 Getting Started TWR K21F120M Two Boards Master Board 1 Connects To Slave Board 42 Pin Name Board Location Pin Name Board Location PTD2 2C0 SCL Primarv Elevator gt PTC10 I2C1_SCL Primary Elevator B45 B50 PTD3 I22CO SDA Primarv Elevator gt PTC11 2C1_SDA Primary Elevator B44 B51 GND Primary Elevator gt GND Primary Elevator Pin A65 Pin A65 TWR K22F120M Tower System module TWR K22F120M Single Board Master Connects To Slave Pin Name Board Location Pin Name Board Location DC0 SCL Primary Elevator gt I2C1_SCL Primary Elevator Pin A7 Pin B50 DC0 SDA Primary Elevator gt DCI SDA Primary Elevator Pin A8 Pin B51 TWR K22F120M Two Boards Master Board 1 Connects To Slave Board 2 Pin Name Board Location Pin Name Board Location 12C0_SCL Primary Elevator gt I2C1_SCL Primary Elevator Pin A7 Pin B50 DC0 SDA Primary Elevator gt I2C1_SDA Primary Elevator Pin A8 Pin B51 GND Primary Elevator gt GND Pr
172. in running the example 5 Insert smart card into socket when using TWR POSCARD Tower System module it s the socket under magnetic stripe reader when using TWR K80 Tower System modules it s the socket under micro SD card socket DD LI 69 4 3 Run the example These instructions are displaved shown on the terminal window SMARTCARD blocking SMARTCARD Driver Send Receive blocking functionality example xxxxx Insert a smart card to test Card inserted Deactivating card Done Resetting Activating card Done Send receive blocking functionality example in T 0 mode started Kinetis SDK v 1 3 Demo Applications User s Guide 272 Freescale Semiconductor A A Getting Started Smart card EEPROM Start Address 0xC00000 Smart card EEPROM Size 32 KBytes Deactivating card Done Resetting Activating card Done Send receive blocking functionality example in T 1 mode started LRC received correctly Echo data received correctly Command status OK Send receive blocking functionality example finished SMARTCARD non blocking SMARTCARD Driver Send Receive non blocking functionality example xxxxx Card inserted Deactivating card Done Resetting Activating card Done Send receive non blocking functionality example in T 0 mode started Smart card EEPROM Start Address 0xC00000 Smart card EEPROM Size 32 KBytes Deactivating card Done Resetting Activating card Done Send receive no
173. input and final number are shown on the SLCD Check SLCD for these numbers Let s play Guess the number I want 0 9999 Press enter to end 5000 The input number 5000 is smaller than what I want Guess again Guess the number I want 0 9999 Press enter to end 7500 The input number 7500 is bigger than what I want Guess again Guess the number I want 0 9999 Press enter to end 6125 The input number 6125 is smaller than what I want Guess again Guess the number I want 0 9999 Press enter to end 6396 Great 6396 you have GOT it Play again Input X or N y SLCD Guess Num Game The number input and final number are shown on the SLCD Check SLCD for these numbers Let s play Guess the number I want 0 9999 Press enter to end lt codeblock gt 29 5 Communication Interface Settings TWR KM34Z75M PTI6 UART2_RX PTI7 UART2_TX UART2 Kinetis SDK v 1 3 Demo Applications User s Guide 132 Freescale Semiconductor Chapter 30 SLCD Low Power Demo This demo application demonstrates how to use SLCD with low power support 30 1 Overview This demo application demonstrates how to use SLCD module to drive an external segment LCD and also demonstrates the SLCD s low power features 30 22 Supported Hardware These Freescale Freedom development platforms are supported by this demo e FRDM KL43Z 30 3 System Requirement 30 3 1 Hardware require
174. ins by using external wires TWR KL43Z48 Flexio Pins Connects To SAI Pins Pin Name Board Location Pin Name Board Location PTD4 FLEXIO PI Primary Elevator gt SAI SCLK x Primary Elevator N4 B9 A22 PTD5 FLEXIO_PI Primary Elevator gt SAI Fs x Primary Elevator N5 B7 A23 PTDO FLEXIO_PI Primary Elevator gt SAI TxData Primary Elevator NO B46 A25 PTD1 FLEXIO_PI Primary Elevator gt SAI TxData Primary Elevator NI B48 A24 TWR K80F150M Flexio Pins Connects To SAI Pins Pin Name Board Location Pin Name Board Location PTB10 FLEXIO_P Primary Elevator gt SAI SCLK x Primary Elevator IN4 B70 A22 PTB11 FLEXIO_P Primary Elevator gt SAI Fs x Primary Elevator INS B69 A23 PTBO FLEXIO_PI Primary Elevator gt SAI TxData Primary Elevator NO A38 A25 PTB1 FLEXIO_PI Primary Elevator gt SAI RxData Primary Elevator N1 A37 A24 Kinetis SDK v 1 3 Demo Applications User s Guide 192 Freescale Semiconductor AS A Getting Started 46 4 2 Prepare the example Connect a USB cable between the PC host and the OpenSDA USB port on the board Insert all boards into TWR ELEV Insert headphones into J7 port on the TWR SGTL5000 Tower System module Open a serial terminal with these settings 115200 baud rate e 8 data bits e No parity e One stop bit e No flow control 5 Download the program to the target board 6 Either press t
175. ions User s Guide Freescale Semiconductor 183 L Getting Started e Library dependencies ksdk_platform_lib 44 4 Getting Started 44 4 1 Hardware settings TWR SER Tower System module configuration only FlexCAN network example e Short J5 1 2 J5 3 4 J5 5 6 J5 7 8 and J5 9 10 to enable CAN connection e Connect the two TWR SER modules through the CAN port J7 Although not required the recommendation is to leave the development board jumper settings and config urations in default state when running this example 44 4 2 Prepare the example 1 Connect a USB cable between the PC host and the OpenSDA USB port on the board 2 Open a serial terminal with these settings e 115200 baud rate e 8 data bits e No parity e One stop bit e No flow control 3 Download the program to the target board 4 Either press the reset button on your board or launch the debugger in your IDE to begin running the example 44 4 3 Run the example 44 4 3 1 FlexCAN loopback These instructions are displayed shown on the terminal window Running the FlexCAN loopback example kkkkkkxkxxxELEXCAN LOOPBACK EXAMPLE kok xx xk Message format Standard 11 bit id Message buffer 8 used for Rx Message buffer 9 used for Tx Interrupt Mode Enabled Operation Mode TX and RX gt Normal FlexCAN MB receive configuration FlexCAN send configuration Data transmit Oa Ob Oc Od Oe Of 10 11 DLC 8 mb_idx 8 RX MB data 0x0a Ob Oc Od
176. irements e J Link ARM e P amp E Micro Multi link universal e Mini micro USB cable e USB A to micro AB cable e Hardware tower base board for specific device e Personal Computer 65 3 22 Software requirements e The project files are in lt SDK_Install gt examples lt board gt driver_examples rtc lt toolchain gt e Library dependencies ksdk platform lib 654 Getting Started 65 4 1 Hardware settings The RTC Example project does not call for any special hardware configurations Although not required the recommendation is to leave the development board s jumper settings and configurations in default state when running this example 65 4 2 Prepare the example Connect a USB cable between the PC host and the OpenSDA USB port on the board Open a serial terminal with these settings e 115200 baud rate e 8 data bits e No parity e One stop bit e No flow control 3 Download the program to the target board 4 Either press the reset button on your board or launch the debugger in your IDE to begin running the example Ne 65 4 3 Run the example Note On the FRDM KL25Z FRDM KL26Z and FRDM KL46Z the RTC counter is fed without the 32 kHz OSC32KCLK clock Therefore the accuracy of RTC alarms is affected These instructions are displayed shown on the terminal window Kinetis SDK v 1 3 Demo Applications User s Guide 260 Freescale Semiconductor i Getting Started RTC example set up time to wake up an ala
177. irements o 3 so icca ea pd da a ee Gee A a nS 289 72 4 Getting g i IP 290 72 4 1 Hardware AA a o eee p oe ee ooi So oni o hoko o ae ar LA 290 72 4 2 Prep re tbe example se vj a VU SO ag RR ed ee RAR RA 290 72 4 3 KII IE INE oa aran Ae ee REE e e oe Be Oe SIKA Be Ow 290 Chapter 73 TSI Example 73 1 CIE a a aa aro a aera ao e ROAT ka e a E ERE 291 73 2 Supported Platforms s s 291 73 3 System Requirement s s 291 13 31 DIANA IIA sar A A ki Sie RE A Seo 291 Te Software reguirem nts sss e 3a 8a a 3a ad a ed KA DA dk A 291 Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor XXXI Section number Title Page 73 4 Getting A G 291 73 4 1 Hardware settings MIE me es we Y 291 73 4 2 Prepare be example kk ee eo a RR RE RA RM RES RRS 292 73 4 3 Bie SA a o a aao aea ee kona a av lk ORE REM DER OO 292 Chapter 74 Universal Asvnchronous Receiver Transmitter UART Example with other methods 74 1 A II 293 74 2 Supported Platforms 66 va ean 5 vai a pa aea e 293 74 3 System Requirement 294 74 3 1 Hardware requirements gk cos css 294 74 3 2 Software requirements sss sea vasa AAA 294 74 4 Getting Started s s 5 cs a e a ais a a a a ag a asu a e maa 294 74 4 1 Hardware Settings o soc e bin eR 9 35 Oe a HO E KE ka KE BINJA Be Oe GPS 294 74 4 2 Prepare tbe example pe peo Oe SRS o EH A RRA A OS 294 74
178. ity 1 Stop bit 5 Connect to the board with the debugger download amp debug run the program and view the Termi nal messages for Flash operations being performed 6 For devices that support Swap the Flash_Debug target copies programs the application that is running from the lower half to the upper half and then issues swap commands 7 Flash memory blocks are swapped at the next reset Disconnect debug session and hit the reset button on the board Note During swap some memory locations depending on program flash size e g for TWR K64F 120M 0x7F100 amp OxFF100 are swapped and displayed on the terminal showing how the memory map changes 8 For devices that do not support swap view the terminal messages for Flash operations that are occurring for the demo 9 Terminal displays the message Flash Demo Complete when finished Note Callback functions are not currently supported during flash erase or program operations Note For K22F and KV31 Flash erase and program operations are not allowed in High Speed RUN modes Therefore the core clock speed is restricted to 80 MHz or less LI Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 37 Commands Directions Kinetis SDK v 1 3 Demo Applications User s Guide 38 Freescale Semiconductor Chapter 11 FreeMASTER Demo 11 1 Overview This demo application demonstrates usage of the FreeMASTER graphical visualization tool Modules e FreeMASTER
179. ject files are in lt SDK_Install gt examples lt board gt driver_examples smartcard lt use_ case gt lt toolchain gt e Library dependencies ksdk_platform_lib Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 271 EEE TET TOS Getting Started 694 Getting Started 69 4 1 Hardware settings The smart card example project requires a special hardware configuration when using the TWR POSCA RD In case of using e TWR POSCARD board requires following important jumper setting of J24 2 3 and J26 1 2 com mon for all supported boards e TWR K21fF20M Tower System module TWR POSCARD jumper settings required J22 3 4 J1 open J3 3 5 J7 2 4 3 5 J19 1 2 J18 open J2 3 5 e TWR K80F150M Tower System module in combination with the TWR POSCARD the following jumper settings are required J21 1 2 J22 1 2 3 4 JI 4 6 J3 4 6 J7 1 3 4 6 J19 O J18 open J2 4 6 on TWR K80F150M Tower System module 0 ohm resistor R215 has to be removed this R215 resistor is required to communicate with on board K80F150M SIM interface 69 4 2 Prepare the example Connect a USB cable between the PC host and the OpenSDA USB port on the board Open a serial terminal with these settings e 115200 baud rate e 8 data bits e No parity e One stop bit e No flow control Download the program to the target board 4 Either press the reset button on your board or launch the debugger in your IDE to beg
180. kud 135 Demo Code NEE o va es bra brani a im i Ex ED ball So kou 136 ADC Differential Mode of Operation 4 se sa a ama a ka ekas 137 Chapter 32 Heating Ventilating and Air Conditioning on IwIP TCP IP Stack Overview 535 8 kS o Uk b dil ga gus a aedo l OHS OSS dus 139 Supported ITO ea ea kope eee ek sek la ORS eka ua ua kaa 139 Supported Hardware s 139 System Requirement e 139 DII EEK a aa e ee ke EA a eda SER ea SE B 139 Software TEQUES lt s ios kova Aera da ao aim ko kk robo geo la 140 BOLLA IELE o as kn kak pe e a ka pale RE RS vee Sao 140 GettingStartd s sse ses s 140 Prepare LIO o sa o sao ea kiko ke tea pea amp ela Ee N 140 Network Configuration 3 23 23 ss sik 4a aia ks kardio kda da ES 140 Run edemo o po nera Ged eR e ubi o kaj dj kaj i e dao ka E EO 140 Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor XV Section number Title Page Chapter 33 ADC16 Example 33 1 CORTINA A ARCA ARA AAN 143 33 2 Supported Platforms 143 33 3 System Requirement s 144 33 341 Hardware requirements 6 6 cos a ue ak 3 4 ka a e kok kok kok ER 144 FIJA Software requirements 3 sa a sa bba bb i ka REA Re we as 144 33 4 GellingBtarlol coc i eu eau kia aos a a sm kokon a kos 144 33 4 1 Hardware PN o sori Gee a a e do i dok kak ii kok kan kc dea 144 3
181. l transfer succeed FlexIO simulated SPI master to SPI slave bidirectional transfer succeed slave example These instructions are displayed shown on the terminal window FLEXIO SPI Send Receive Example Start 1 SPIl acts as master starts transfer with masterWriteBuff and masterReadBuff 2 FlexIO simulated SPI slave also transfer with slaveWriteBuff and slaveReadBuff 3 Compare masterWriteBuff and slaveReadBuff slaveWriteBuff and masterReadBuff to see result Press any key to start transfer Type a character on the keyboard and the SPI1 master starts the transfer with the FlexIO simulated SPI slave compares the masterWriteBuff and the slaveReadBuff the slave WriteBuff and the masterReadBuff to check whether the transfer is successful SPI master to FlexIO simulated SPI slave bidirectional transfer succeeded SPI master to FlexIO simulated SPI slave DMA bidirectional transfer succeeded SPI master to FlexIO simulated SPI slave bidirectional transfer succeeded SPI master to FlexIO simulated SPI slave DMA bidirectional transfer succeededll SPI master to FlexIO simulated SPI slave bidirectional transfer succeeded SPI master to FlexIO simulated SPI slave DMA bidirectional transfer succeeded Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 203 AN A Getting Started Kinetis SDK v 1 3 Demo Applications User s Guide
182. lexCAN Example 441 Overview This FlexCAN example application demonstrates the SDK Peripheral drivers working with different meth ods FlexCAN network and FlexCAN loop back are the two provided examples e CAN network transfers data through the CAN interface On node 1 the user inputs characters by using the UART debug terminal and sends the data with the FlexCAN interface On the other node the FlexCAN receives the data and prints it to the UART terminal e CAN loop back transfers data through the CAN loop back interface On one node one 8 byte buffer stream transmitter output is internally sent back to the receiver input The board transfers and receives characters through the Fle CAN UART interface Type the characters on the keyboard and the board receives and displays them on the terminal screen Look for instructions output to the terminal 44 2 Supported Platforms These Tower System modules are supported by the FlexCAN example e TWR K21F120M TWR K60D100M TWR K64F120M TWR K65F180M TWR KV11Z75M 44 3 System Requirement 44 3 1 Hardware requirements e J Link ARM e P amp E Micro Multi link universal e Mini micro USB cable e USB A to micro AB cable e Hardware tower base board for specific device e Personal Computer 44 3 2 Software requirements e The project files are in lt SDK_Install gt examples lt board gt driver_examples flexcan lt use_ case gt lt toolchain gt Kinetis SDK v 1 3 Demo Applicat
183. line use command elftosb exe V c hello_world_qspi bd o hello world qspi sb to get a sb file 4 Prepare QSPI config block for BootROM e Ifusing TWR K80 just use the qspi config block bin located in lt SDK_Install gt examples lt board gt den _apps hello_world_qspi qspi_config_block bin e If using different flash chip the qspi config block should be re configured in source file located in SDK Install5 examples src demo apps hello world qspi qspi config block generator c users can use GCC Visual Studio Code Block to re generate a bin file for QSPI configure block e For detailed information of QSPI configure block see document from BootLoader team 5 Use blhost to configure bootloader and download code e While using blhost blhost exe p COMxx receive sb file hello world qspi sb COMxx means the virtual COM number of the board Notice If using UART as communication between blhost should not open serial terminal or it may download failed 6 Open a serial terminal with these settings e 115200 baud rate e 8 data bits e No parity e One stop bit e No flow control 7 Press the reset button on your board Kinetis SDK v 1 3 Demo Applications User s Guide 52 Freescale Semiconductor A A Getting Started 14 4 3 Run the example The example makes two LEDs light up and these instruction are displaved shown on the terminal window Hello World QSPI demo startedl Input some characters and the
184. lt toolchain gt e Library dependencies ksdk platform lib 41 4 Getting Started 41 4 1 Hardware settings The EDMA Example project does not call for any special hardware configurations Although not required the recommendation is to leave the development board s jumper settings and configurations in default state when running this example 41 4 2 Prepare the example Connect a USB cable between the PC host and the OpenSDA USB port on the board Open a serial terminal with these settings e 115200 baud rate e 8 data bits e No parity e One stop bit e No flow control 3 Download the program to the target board 4 Either press the reset button on your board or launch the debugger in your IDE to begin running the example N 41 4 3 Run the example These instructions are displaved shown on the terminal window EDMA transfer from memorv to memorv Starting EDMA channel No 0 to transfer data from addr 0xlfff0000 to addr 0x1fff0028 Transferred with eDMA channel No 0 successful Press anv kev to start transfer with other channel Starting EDMA channel No l to transfer data from addr 0xlfff0000 to addr 0x1fff0028 Transferred with eDMA channel No l successful Press any key to start transfer with other channel Starting EDMA channel No 2 to transfer data from addr 0xlfff0000 to addr 0x1fff0028 Transferred with eDMA channel No 2 successful Press any key to start transfer with other channel Starting EDMA channel No 3 to tra
185. m address 0x37ec to 0x1fffe018 Starting transfer data Transferred with DMA channel No l successful Kinetis SDK v 1 3 Demo Applications User s Guide 160 Freescale Semiconductor A A Getting Started Press anv kev to start transferring data with another channel Requesting channel 2 to transfer data from address 0x37ec to 0x1fffe018 Starting transfer data Transferred with DMA channel No 2 successful Press any key to start transferring data with another channel Requesting channel 3 to transfer data from address 0x37ec to 0x1fffe018 Starting transfer data Transferred with DMA channel No 3 successful Press any key to start transferring data with another channel Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 161 AN A Getting Started Kinetis SDK v 1 3 Demo Applications User s Guide 162 Freescale Semiconductor Chapter 40 DSPI Example with other methods 40 1 Overview The DSPI Example project is a demonstration program that uses the KSDK software This example provides 5 examples with 5 modes DSPI polling non blocking blocking DMA blocking DMA non blocking and DSPI loopback e DSPI board to board Transfers data through instance 0 of SPI interface SPIO pins of the master board are connected to the SPIO pins of the slave board ltis important to ensure all SPI board to board connections are kept as short as possible and that a solid ground wire is connected between t
186. mary Elevator B2 B2 TWR K21F120M Master Board Connects To Slave Board Pin Name Board Location Pin Name Board Location PTCIO I2ZCI SCL Primarv Elevator b PTC10 I2C1_SCL Primary Elevator B50 B50 PTC11 2C1_SDA Primary Elevator gt PTC11 2C1_SDA Primary Elevator B51 B51 GND Primary Elevator gt GND Primary Elevator A65 A65 TWR KW24D512 Master Board Connects To Slave Board Pin Name Board Location Pin Name Board Location DC0 SCL Primary Elevator gt I2CO SCL Primarv Elevator AT A7 DC0 SDA Primary Elevator gt DC0 SDA Primarv Elevator AS AS GND Primary Elevator gt GND Primary Elevator A81 A81 FRDM KV31F The board doesn t support external pull up resistors for I2C pins So the internal pull up resistors is enable for I2C pins However the resistor is quite huge 20KOhm 50KOhm The I2C may run FAIL in high baurate In this case user need to use external pull up resistors Master Board Connects To Slave Board Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 221 Getting Started Pin Name Board Location Pin Name Board Location DC0 SCL J1 16 gt DC0 SCL Jl 16 DC0 SDA J2 13 gt DC0 SDA J2 13 GND J2 14 gt GND J2 14 FRDM KV10Z Master Board Connects To Slave Board Pin Name Board Location Pin Name Board Location DC0 SCL J2 Pin 13 gt DC0 SCL J2 Pin 13 DC0 SDA JI Pin 15 gt DC0 SDA JI Pin 15 GND J2 Pin 14 gt GND J
187. ments e J Link ARM e P amp E Micro Multi link universal e Mini micro USB cable e USB Ato micro AB cable e Hardware Tower System base board for specific device e Personal Computer 30 4 Getting Started 30 4 1 Prepare the Demo 1 Connect a USB cable between the PC host and the OpenSDA USB port on the board 2 Open a serial terminal with these settings e 115200 baud rate e 8 data bits e No parity e One stop bit e No flow control 3 Download the program to the target board 4 Either press the reset button on your board or launch the debugger in your IDE to begin running the demo For detailed instructions see the Getting Started with Kinetis SDK document for your board Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 133 a OO O M Run the demo 30 5 Run the demo After demo is running the debug terminal prints the demo log and segment board on the Freescale Free dom platform board displays RTC time Kinetis SDK v 1 3 Demo Applications User s Guide 134 Freescale Semiconductor Chapter 31 Thermistor Lab Demo This demo application demonstrates how to use PDB to trigger ADC and measure on board thermistor 31 1 Overview This lab shows how to configure and use the ADC module to sample the differential voltage across on board thermistors RT1 RT4 If the user touches any on board thermistor with a finger the lab application detects a change in the thermistor temperature and star
188. mer project is a demonstration program to show how to use the LPTMR driver It triggers an LPTMR interrupt once every second and prints out the number of interrupts that have occurred since the program started running 55 2 Supported Platforms These Freescale Freedom development platforms and Tower System modules are supported by the LPT MR example e FRDM K22F e FRDM K64F e FRDM KLO2Z e FRDM KLO3Z e FRDM KL25Z e FRDM KL26Z e FRDM KL27Z e FRDM KL43Z e FRDM KL46Z e FRDM KVIOZ e FRDM KV31F e FRDM KW24 e FRDM KW40Z TWR K21D50M TWR K21F120M TWR K22F120M TWR K24F120M e TWR K60D100M TWR K64F120M TWR K65F180M TWR K80F150M e TWR KL25Z48M e TWR KL43Z48M e TWR KM34Z75M e TWR KV10Z32 e TWR KV11Z75M e TWR KV31F120M e TWR KW24D512 e USB KW4OZ KW40Z Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 231 AR Getting Started 55 3 System Requirement 55 3 1 Hardware requirements J Link ARM P amp E Micro Multi link universal e Mini micro USB cable e USB A to micro AB cable e Hardware tower base board for specific device e Personal Computer 55 3 2 Software requirements e The project files are in lt SDK_ Install gt examples lt board gt driver_examples Iptmr lt toolchain gt e Library dependencies ksdk_platform_lib 554 Getting Started 55 4 1 Hardware settings The LPTMR Example project does not call for any special hardware configurations Although not re quired th
189. micro USB cable e USB Ato micro AB cable e Hardware Tower System base board for a specific device e Personal Computer 14 3 22 Software requirements e The project files for booting from the QSPI region are in lt SDK_Install gt examples lt board gt demo apps hello world qspi xtoolchain e The project file for booting from the alias region are in lt SDK_Install gt examples lt board gt demo _apps hello_world_qspi_alias lt toolchain gt e Library dependencies ksdk platform lib e Tool dependencies Use the blhost and the elftosb tool provided bv the ROM team from www freescale com Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 51 AR Getting Started 14 4 Getting Started 14 4 1 Hardware settings This example requires external serial flash powered TWR K80F150M Jumper J30 pin 4 and pin 6 should be connected 14 4 2 Prepare the example 1 Press the SW2 button NMI button continously and connect a USB cable between the PC host and the OpenSDA USB port on the board The button should be pressed until openSDA USB port connected 2 Build the demo project and get the srec output file 3 Use elftosb tool to convert srec file to SB file needed by blhost e First a bd file is needed open bd file in lt SDK_Install gt examples lt board gt demo_ apps hello_world_qspi hello_world_qspi bd While change to other demo just change the srec file name in bd file e In command
190. ms Not mentioned platforms use the internal connection DAC Out ADC In Platform Pin Name Board Location Pin Name Board Location FRDM K22F DACO_OUT J24 11 PTBO ADCO SES J24 2 FRDM KL25Z PTE30 DACO OU JIO 11 PTE20 ADCO SEO J10 1 T FRDM K64F DACO OUT Id 11 PTB2 ADCO SE12 J4 2 FRDM KL43Z PTE30 DACO OU Id 11 PTE30 ADCO S J4 11 T E23 FRDM KL46Z PTE30 DAC_OUT J4 11 PTE20 DIFF_AD J4 1 CO DP FRDM KW40Z PTB18 DACO OU J25 11 PTB18 ADCO SE4 J25 11 T TWR K21D50M DACO OUT Primary Elevator PTB3 ADCO SE13 Primary Elevator A32 B30 TWR K22F120M DACO OUT Primary Elevator PTBO ADCO SES Primary Elevator A32 B27 Kinetis SDK v 1 3 Demo Applications User s Guide 26 Freescale Semiconductor Run the demo TWR K24F120M DACO OUT Primary Elevator ADCO DP3 Primary Elevator A32 A29 TWR K60D100M DACO OUT Primary Elevator PTB4 ADC1_SE10 Primary Elevator A32 B30 TWR K64F120M DACO OUT Primary Elevator PTB4 ADC1_SE10 Primary Elevator A32 B27 TWR K65F180M DACO OUT Primarv Elevator ADCI SE16 J24 1 A32 TWR KV10Z32 DACO OUT J16 11 PTE17 ADCO SES J16 6 TWR KV11Z75M DACO_OUT Primary Elevator PTE30 ADC1_SE4 Primary Elevator A32 A32 TWR KV31F120 DACO OUT Primary Elevator PTE2 ADCI SE6a Primary Elevator M A32 B27 TWR K21F120M DACO OUT Primary Elevator PTE2 ADCO SE23 Primary Elevator A23 B23 FRDM KV10Z PTE30 DAC_OUT J4 11 ADCO
191. n blocking functionality example in T 1 mode started LRC received correctly Echo data received correctly Command status OK Send receive non blocking functionality example finished Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 273 AN A Getting Started Kinetis SDK v 1 3 Demo Applications User s Guide 274 Freescale Semiconductor Chapter 70 SPI Example with other methods 70 1 Overview The SPI Example project is a demonstration program that uses the KSDK software This example provides 5 examples SPI board to board with 5 modes SPI polling non blocking blocking DMA blocking DMA non blocking and SPI loopback e SPI board to board Transfer data through instance 0 of SPI interface SPIO pins of master board are connected with SPIO pins of slave board Ensure that all SPI board to board connections are kept as short as possible and that a solid ground wire is connected between the boards Preferably this ground connection should be as close as possible to the SPI signals on each board A poor board to board connection compro mises data signal integrity causing failures in the example Master send an array to slave and receive the array back from slave compare whether the two buffers are the same Slave send back received buffer from master Set up the slave first e SPI master loopback Transfer data through instance 0 of SPI interface MISO pin and MOSI pin are connected
192. nal with the following settings e 115200 baud rate e 8 data bits e No parity e One stop bit e No flow control 3 Download the program to the target board 4 Either press the reset button on your board or launch the debugger in your IDE to begin running the demo For detailed instructions steps see a Kinetis SDK User s Guide for your board 19 5 2 Network Configuration Configure the IP address of PC network adapters as shown IP address 192 168 2 100 Subnet Mask 255 255 255 0 19 5 3 Run the demo Download the program to target board which should be installed in TWR or FRDM Connect the Ethernet cable between the PC and the board When successfully connected reset the board to run the demo Open the PC command window type in ping 192 168 2 102 to test whether IwIP stack is running If successful four echo request packets are successfully replied EU IO Kinetis SDK v 1 3 Demo Applications User s Guide 88 Freescale Semiconductor AS A Getting Started 5 Input 192 168 2 102 in the URL of an Internet browser on a PC If successful the web page which the board returns opens in the browser Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 89 AN A Getting Started Kinetis SDK v 1 3 Demo Applications User s Guide 90 Freescale Semiconductor Chapter 20 Ping Demo on IwIP TCP IP Stack This demo application demonstrates the Ping demo on IwIP TCP IP stack with bare metal
193. ncies ksdk platform lib 72 4 Getting Started 72 4 1 Hardware settings The TPM Example project does not call for any special hardware configurations Although not required the recommendation is to leave the development board s jumper settings and configurations in default state when running this example 72 4 2 Prepare the example 1 Connect a USB cable between the PC host and the OpenSDA USB port on the board 2 Open a serial terminal with these settings e 115200 baud rate e 8 data bits e No parity e One stop bit e No flow control 3 Download the program to the target board 4 Either press the reset button on your board or launch the debugger in your IDE to begin running the example 72 4 3 Run the example These instructions are displayed shown on the terminal window See the change of LED brightness After that LED bright is first increasing and then LED becomes dimmer continuously Kinetis SDK v 1 3 Demo Applications User s Guide 290 Freescale Semiconductor Chapter 73 TSI Example 73 1 Overview The TSI Example project is a demonstration program that uses the KSDK software to demonstrate how to use touch sensor interface This example turns on LEDs when the board is in a touch state Otherwise LEDs are turned it off 73 2 Supported Platforms These Freescale Freedom development platforms and Tower System modules are supported by the TSI example e FRDM KL25Z e FRDM KL26Z e FRDM KL46Z e FRDM KW40Z
194. nd read ADC values 8 2 Supported Platforms This demo supports these Freescale Freedom development platforms and Tower System modules e FRDM K22F e FRDM K64F e FRDM KL25Z e FRDM KL26Z e FRDM KL43Z e FRDM KL46Z e FRDM KVIOZ e FRDM KV31F e FRDM KW40Z e MRB KWOL TWR K21D50M TWR K21F120M TWR K22F120M TWR K24F120M e TWR K60D100M TWR K64F120M TWR K65F180M TWR K80F150M e TWR KL43Z48M e TWR KVIOZ32 e TWR KV11Z75M e TWR KV31F120M 8 3 Svstem Requirement 8 3 1 Hardware requirements e J Link ARM e P amp E Micro Multi link universal Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 25 AR Getting Started e Mini micro USB cable e USB A to micro AB cable e Hardware tower base board for specific device e Personal Computer 8 3 2 Software requirements e The project files are in lt SDK_Install gt examples lt board gt demo_apps dac_adc_demo lt toolchain gt e Library dependencies ksdk_platform_lib 8 4 Getting Started 8 4 1 Hardware configuration For the MRB KWOI it is necessary To short jumpers J10 and J11 to connect the ADC references To disconnect J7 to open PTE30 connection with the RESET of the RADIO part Also analog function for PTE30 DAC output is necessary on the mrb kwOl default is GPIO for RADIO part reset This is done in hardware_init function 8 4 2 Hardware Settings This table shows the connections that are required for each of the supported platfor
195. ndow FLEXIO I2C Master Send Receive Example Start 1 FlexIO simulated I2C master write a buffer to I2C1 2 I2C1 acts as slave and receives data from FlexIO simulated I2C Master 3 Compare rxBuff and txBuff to see result 4 FlexIO simulated I2C master read a buffer from I2C1 5 I2C1 send the buffer and FlexIO simulated I2C master receives the buffer 6 Compare rxBuff and txBuff to see result Press any key to start transfer Type a character on the keyboard and the FlexIO simulated I2C sends a buffer to the I2C1 It also compares the received buffer on the I2C1 side with the txBuff and checks whether the result is successful Then the I2C1 sends a buffer to the FlexIO simulated I2C compares the receive buffer in the FlexIO simulated DC side to the txBuff and checks whether the result is successful FlexIO simulated I2C master to I2C standard slave write transfer succeeded FlexIO simulated I2C master to I2C standard slave read transfer succeeded Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 189 7 Getting Started FlexIO simulated I2C master to I2C standard slave write transfer succeeded FlexIO simulated I2C master to I2C standard slave read transfer succeeded Kinetis SDK v 1 3 Demo Applications User s Guide 190 Freescale Semiconductor Chapter 46 Flexio I2S Example with other methods 46 1 Overview The FlexIO I2S example project is a
196. netis SDK v 1 3 Demo Applications User s Guide 106 Freescale Semiconductor Chapter 25 Power Manager HAL Demo 251 Overview The Power Manager demo application demonstrates different Power Manager modes supported by the Kinetis SoCs The set of supported low power modes and their transition possibility differ platform to platform See section System Mode Controller in a Reference Manual for each Kinetis sub family microcontroller 25 2 Supported Hardware These Freescale Freedom development platforms and Tower System modules are supported by the Kinetis software development kit Power Manager demo e FRDM K22F e FRDM K64F e FRDM KLO2Z e FRDM KLO3Z e FRDM KL25Z e FRDM KL26Z e FRDM KL27Z e FRDM KL43Z e FRDM KL46Z e FRDM KV10Z e FRDM KV31F e FRDM KW24 e FRDM KW40Z e MRB KWOL TWR K21D50M TWR K21F120M TWR K22F120M TWR K24F120M e TWR K60D100M TWR K64F120M TWR K65F180M TWR K80F150M e TWR KL43Z48M e TWR KM34Z75M e TWR KV10Z32 e TWR KV11Z75M e TWR KV31F120M e TWR KW24D312 Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 107 AR Getting Started e USB KW40Z 25 3 System Requirement 25 3 1 Hardware requirements J Link ARM P amp E Micro Multi link universal e Mini micro USB cable USB A to micro AB cable e Hardware tower base board for a specific device e Personal Computer 25 3 2 Software requirements e The project files are in lt SDK_Install gt examples lt
197. nfigurations Although not required the recommen dation is to leave the development board jumper settings and configurations in default state when running this demo Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 85 Run the demo 18 4 22 Prepare the Demo 1 Connect a USB cable between the PC host and the OpenSDA USB port on the board 2 Open a serial terminal with these settings e 115200 baud rate e 8 data bits e No parity e One stop bit e No flow control 3 Download the program to the target board 4 Either press the reset button on your board or launch the debugger in your IDE to begin running the demo For detailed instructions see the appropriate board User s Guide 18 5 Run the demo These instructions are displayed shown on the terminal window RIC Compensate 1HZ output demo Compensate with error 100ppm int c frac 60 The 1Hz pulse out is routed to the PTL2 XBARO OUTIO pin which can be tested on the J25 Pin 23 on board Kinetis SDK v 1 3 Demo Applications User s Guide 86 Freescale Semiconductor Chapter 19 HTTP Server Demo on IwlP TCP IP Stack This demo application demonstrates the HTTPServer demo on IwIP TCP IP stack with bare metal SDK or different RTOSes 191 Overview This is an HTTPServer set up on IwIP TCP IP stack with bare metal SDK or different RTOSes The user uses an Internet browser to send a request for connection The board acts as an HTTP server and sen
198. nning The master sends an array to the slave and receives the array back from the slave It also compares whether the two buffers are the same The master board prints this message on the terminal DSPI board to board blocking example This example run on instance 0 Be sure DSPIO DSPIO are connected Transfer at baudrate 468750 Master transmit Kinetis SDK v 1 3 Demo Applications User s Guide 168 Freescale Semiconductor AS A Getting Started 01 02 03 04 05 06 07 08 09 OA OB OC OD OE OF 10 11 12 13 14 15 16 17 18 19 1A IB IC 1D IE IF 20 Master receive 01 02 03 04 05 06 07 08 09 OA OB OC OD OE OF 10 11 12 13 14 1516 17 18 19 JA 18 1 1D IE LF 20 DSPI Master Sends Receives successfully Press any key to run again The slave board receives and prints this message on terminal Slave receive 01 02 03 04 05 06 07 08 09 OA OB OC OD OE OF 10 11 12 13 14 15 16 17 18 19 1A 1B IC ID IE IF 20 Slave example is running DSPI non blocking Master Slave Set up the slave first and the slave board displavs this message on the terminal DSPI board to board non blocking example This example run on instance 0 Be sure DSPIO DSPIO are connected Slave example is running The master sends an array to the slave and receives the array back from the slave It also compares whether the two buffers are the same The master board prints this message on the terminal DSPI board to board non blocking example This example run on instance 0 B
199. ns User s Guide Freescale Semiconductor 211 AR EENS Getting Started 51 3 System Requirement 51 3 1 Hardware requirements J Link ARM P amp E Micro Multi link universal e Mini micro USB cable e USB A to micro AB cable e Hardware tower base board for specific device e Personal Computer 51 3 2 Software requirements e The project files are in lt SDK_Install gt examples lt board gt driver_examples gpio lt toolchain gt e Library dependencies ksdk platform lib 514 Getting Started 51 4 1 Hardware settings The GPIO Example project does not call for any special hardware configurations Although not required the recommendation is to leave the development board s jumper settings and configurations in default state when running this example 51 4 2 Prepare the example 1 Connect a USB cable between the PC host and the OpenSDA USB port on the board 2 Open a serial terminal with these settings e 115200 baud rate e 8 data bits e No parity e One stop bit e No flow control 3 Download the program to the target board 4 Either press the reset button on your board or launch the debugger in your IDE to begin running the example 51 4 3 Run the example These instructions are displaved shown on the terminal window GPIO PD Driver example Kinetis SDK v 1 3 Demo Applications User s Guide 212 Freescale Semiconductor A A Getting Started Press SW to turn on off a LED1 Press the SW x button on the
200. nsfer data from addr 0xlfff0000 to addr 0x1fff0028 Transferred with eDMA channel No 3 successful Press any key to start transfer with other channel Starting EDMA channel No 4 to transfer data from addr 0xlfff0000 to addr 0x1fff0028 Transferred with eDMA channel No 4 successful Kinetis SDK v 1 3 Demo Applications User s Guide 174 Freescale Semiconductor A A Getting Started Press any key to start transfer with other channel Starting EDMA channel No 5 to transfer data from addr 0xlfff0000 to addr 0x1fff0028 Transferred with eDMA channel No 5 successful Press any key to start transfer with other channel ansfer data from addr 0Ox1fff0000 to addr 0x1fff0028 hannel No 6 successful ransfer with other channel Transferred with eDMA Starting EDMA channel No 6 to tr Press any key to start t Starting EDMA channel No 7 to transfer data from addr 0xlfff0000 to addr 0x1fff0028 Transferred with eDMA channel No 7 successful Press any key to start transfer with other channel ansfer data from addr 0x1lfff0000 to addr 0x1fff0028 hannel No 8 successful ransfer with other channel Transferred with eDMA Starting EDMA channel No 8 to tr c Press anv kev to start t ansfer data from addr 0x1fff0000 to addr 0x1fff0028 hannel No 9 successful ransfer with other channel Transferred with eDMA Starting EDMA channel No 9 to tr Press any key to sta
201. nt RTOS The application acts as both the I2C master and the slave device on different I2C buses such as the I2C Master on the I CO bus and the I2C Slave on the 12C1 bus It can run on a single board or on two different boards When connecting the two I2C buses on one board the master sends the command using the I2CO bus to the slave using the 12C1 bus When connecting the I2CO bus to the 12C1 bus on the other board the application running on the first board is a master and sends a command to the other board which acts as a slave This means that the first board can send a command and get a response from the other board by using the I2C bus The basic purpose of this demo is 1 Read the Kinetis chip UID low 32bits from the slave board 2 Read the Kinetis chip internal temperature from the slave board 3 Control the RED GREEN BLUE color LEDs on the slave board The application creates three different tasks to handle events concurrently 1 Master task responds to the user interface interaction runs as a I C master and acts as a simple UI It accepts user s commands to read the basic chip UID chip temperature and control the on board LED and power mode on the slave 2 Slave task responds to the command received from the I2C master and returns the result to the master ADC sample task responds to getting the chip temperature in a period 4 For the bare metal version the master and slave tasks are separated into two separate proje
202. ntinuously refreshes the Watchdog to prevent the CPU reset After pushing the software button the Watchdog expires after approximately 1 seconds and the chip is reset e Combine refresh and reset operation on the WDOG timer e Use a SW to start the COP After pressing the software button the COP starts to expire e Use an LED to indicate the reset process First the LED is turned off when the software button is pressed the LED starts blinking After reset the LED is turned off xx When running this example we need enable watchdog 37 2 Supported Platforms These Freescale Freedom development platforms and Tower System modules are supported by the COP example e FRDM KLO3Z e FRDM KL26Z FRDM KL27Z e FRDM KL43Z e FRDM KL46Z e FRDM KW40Z e TWR KL43Z48M 37 3 System Requirement 37 3 1 Hardware requirements J Link ARM P amp E Micro Multi link universal e Mini micro USB cable USB A to micro AB cable e Hardware tower base board for specific device e Personal Computer 37 3 2 Software requirements e The project files are in lt SDK_Install gt examples lt board gt driver_examples cop lt toolchain gt e Library dependencies ksdk_platform_lib Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 155 EEE ETT DII Getting Started 37 4 Getting Started 37 4 1 Hardware settings The COP Example project does not call for a special hardware configuration Although not required the recommend
203. o 0 PTD5 J2 12 FlexIO simulated UART No waveform in loop RX back mode PTD6 J2 8 IRDA pulse input for Non loop back mode only FlexIO timer to decode into UART PTD7 J2 10 IRDA pulse output en coded by FlexIO timer PTEO J2 18 CMPO output Can check CMPO output in CMPO trig mode 47 4 2 Prepare the Demo 1 Connect a USB cable between the PC host and the OpenSDA USB port on the board 2 Open a serial terminal with these settings e 115200 baud rate e 8 data bits e No parity e One stop bit e No flow control Download the program to the target board Either press the reset button on your board or launch the debugger in your IDE to begin running the demo Program ends with a while 1 loop to get the user input from the terminal window one character at Kinetis SDK v 1 3 Demo Applications User s Guide 196 Freescale Semiconductor A A Run the demo a time and send the input character via IRDA The character is also echoed on the terminal window For detailed instructions see the appropriate board specific document 47 5 Run the demo This example shows the following information on the terminal window Start FlexIO UART IRDA demo Non blocking Send Receive Demo String data is Hello World Binary data is 0x48656c6c6 20576 726c640 Blocking Send Demo String data is Hello Binary data is 0x48656c6c6f Blocking Receive Demo String data is He Binary data is 0x4865
204. o Applications User s Guide 268 Freescale Semiconductor Chapter 68 SLCD Example 68 1 Overview SLCD Example defines how to use slcd to display content 68 2 Supported Platforms These Freescale Freedom development platforms are supported by the SLCD example e FRDM KL43Z e FRDM KL46Z e TWR KM34Z75M 68 3 System Requirement 68 3 1 Hardware requirements J Link ARM e P amp E Micro Multi link universal e Mini micro USB cable e USB A to micro AB cable e Hardware tower base board for specific device e Personal Computer 68 3 2 Software requirements e The project files are in lt SDK_Install gt examples lt board gt driver_examples slcd lt toolchain gt e Library dependencies ksdk_platform_lib 68 4 Getting Started 68 4 1 Hardware settings The MPU Example project does not call for any special hardware configurations Although not required the recommendation is to leave the development board s jumper settings and configurations in default state when running this example 68 4 2 Prepare the example 1 Connect a USB cable between the PC host and the OpenSDA USB port on the board Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 269 Getting Started 2 Open a serial terminal with these settings e 115200 baud rate e 8 data bits e No parity e One stop bit e No flow control 3 Download the program to the target board 4 Either press the reset button on your board or laun
205. o erases and overwrites some sectors These instructions are displayed shown on the terminal window SD Card Demo Start This demo is going to access data on card A card is detected SDCard initialized e Card Information Card Type SDHC Card Capacity f GB Host Clock Max Rate 120 MHz Clock Rate 20 MHz Manufacturer ID 0x3 OEM ID 0x5344 Product name SDO4G Product serial number 0x25BD9A0 Product revision 8 0 Manufacturing data Dec 2010 CSD Structure 0x1 taac f ns nsac 0 clks tran speed f kbps ccc class 0 2 4 5 7 8 10 max read block length 512 Bytes c size 7562 Erase unit size is one or multiple units of 512 bytes Kinetis SDK v 1 3 Demo Applications User s Guide 264 Freescale Semiconductor i Getting Started he size of write protected group is 2 blocks 2W Factor 2 ax write block length 9 he content is copied ard disk like file svstem with partition table CR Structure 0x0 D Spec 0x2 D Spec 3 0 DHC Card Security Version 2 00 Card supports 1 bit bus width Card supports 4 bit bus width Support set block count command naaa mJ WH Irrrrritrrrrrrrrrrrritrrititttt CAUTION as Da 0 2 UV A 0 IA THIS DEMO IS GOING TO ERASE AND WRITE RAW DATA TO THE CARD MAKE SURE YOU TAKE BACKUP OF ANY VALUEABLE DATA PRESENT IN THE CARD BEFORE PROCEEDING LITIIITITITITITITITITITITITITI TI TIIIILITITITITITITITITITITTTITITIIIITTI Do you want to proceed Enter v IF yes User ne
206. o_apps bubble_level_tpm lt toolchain gt e Library dependencies ksdk platform lib Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 23 Run the demo 7 4 Getting Started 7 4 1 Hardware Settings The bubble level application does not call for any special hardware configuration Although not required the recommendation is to leave the development board jumper settings and configurations in default state when running this demo 7 4 2 Prepare the Demo 1 Connect a USB cable between the PC host and the OpenSDA USB port on the board 2 Optional Open a serial terminal with these settings e 115200 baud rate e 8 data bits e No parity e One stop bit e No flow control 3 Download the program to the target board 4 Either press the reset button on your board or launch the debugger in your IDE to begin running the demo For detailed instructions see the Getting Started with Kinetis SDK document 7 5 Run the demo When the board is programmed simply tilt the board to see the LED illuminate One LED color indicates X axis angle while another indicates Y axis angle Kinetis SDK v 1 3 Demo Applications User s Guide 24 Freescale Semiconductor Chapter 8 DAC ADC Demo This demo application demonstrates the DAC and ADC demo 8 1 Overview This application demonstrates how to configure the DAC and set the output on the DAC using software It also demonstrates how to configure the ADC in Blocking Mode a
207. o_start demo_state_t xprevState Prints out a welcome message and pins required by the demo Parameters Kinetis SDK v 1 3 Demo Applications User s Guide 28 Freescale Semiconductor Kev Functions prevState Pointer to previous state for state machine Returns msg Returns the character entered into the terminal by the user uint8 t device config demo state t prevState Configures the DAC and the ADC The DAC is configured for software updates The ADC is set in Blocking Mode Parameters prevState Pointer to previous state for state machine Returns msg Returns 0 uint8 t dac set demo state t xprevState Sets output level on the DAC Parameters xprevState Pointer to previous state for state machine Returns msg Returns the character entered into the terminal by user uint8 t wait state demo state t prevState Performs a wait and possible state change based on the prevState Parameters prevState Pointer to previous state for state machine Returns msg Returns 0 uint8 tadc get demo state t xprevState Gets ADC values from a channel connected to the DAC output Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 29 Kev Functions Parameters prevState Pointer to previous state for state machine Returns msg Returns the character entered into the terminal by the user uint t device deinit demo state t prevState Deinitializes
208. oard Master Connects To Slave Pin Name Board Location Pin Name Board Location Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 79 Getting Started DC0 SCL Primary Elevator gt DC1 SCL Primary Elevator Pin A7 Pin A75 DC0 SDA Primary Elevator gt DC1_SDA Primary Elevator Pin A8 Pin B71 TWR K64F120M Two Boards Master Board 1 Connects To Slave Board 2 Pin Name Board Location Pin Name Board Location 12C0_SCL Primary Elevator gt I2C1_SCL Primary Elevator Pin A7 Pin A75 DC0 SDA Primary Elevator gt DCI SDA Primary Elevator Pin A8 Pin B71 GND Primary Elevator gt GND Primary Elevator Pin A65 Pin A65 TWR K65F180M Tower System module TWR K65F180M Single Board Master Connects To Slave Pin Name Board Location Pin Name Board Location DC0 SCL Primary Elevator gt I2C1_SCL Primary Elevator Pin A7 Pin B11 DC0 SDA Primary Elevator gt I2C1_SDA Primary Elevator Pin A8 Pin B22 TWR K65F180M Two Boards Master Board 1 Connects To Slave Board 2 Pin Name Board Location Pin Name Board Location I2CO SCL Primary Elevator gt I2CI SCL Primary Elevator Pin A7 Pin B11 DC0 SDA Primary Elevator gt DCI SDA Primary Elevator Pin A8 Pin B22 GND Primary Elevator gt GND Primary Elevator Pin A65 Pin A65 TWR K80F150
209. oard Pin Name Board Location Pin Name Board Location SPIO SIN J2 pin 10 gt SPIO_SOUT J2 pin 2 SPIO_SOUT J2 pin 2 gt SPIO_SIN J2 pin 10 SPIO CLK J2 pin 12 gt SCK J2 pin 12 SPIO SCO J3 pin9 gt PCSOO J3 pin 9 GND J2 pin 14 gt GND J2 pin 14 TWR KV11Z75M Master Board Connects To Slave Board Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 167 Getting Started Pin Name Board Location Pin Name Board Location MISO Primarv Elevator gt MISO Primary Elevator B44 B45 MOSI Primary Elevator gt MOSI Primary Elevator B45 B44 SCK Primary Elevator gt SCK Primary Elevator B48 B48 PCSOO Primary Elevator gt PCSOO Primary Elevator B46 B46 GND Primary Elevator gt GND Primary Elevator B2 B2 40 4 2 Prepare the example Connect a USB cable between the PC host and the OpenSDA USB port on the board Open a serial terminal with these settings e 115200 baud rate e 8 data bits e No parity e One stop bit e No flow control 3 Download the program to the target board 4 Either press the reset button on your board or launch the debugger in your IDE to begin running the example DD 40 4 3 Run the example DSPI blocking Master Slave Note Set up the slave first and the slave board displays this message on the terminal DSPI board to board blocking example This example run on instance 0 Be sure DSPIO DSPIO are connected Slave example is ru
210. oard Connects To Slave Board Pin Name Board Location Pin Name Board Location PTD7 I2C1_SCL J2 Pin 20 gt PTD7 I2C1 SCL J2 Pin 20 x PTD6 12C1_SDA J2 Pin 18 gt PTD6 2C1 SDA J2 Pin 18 x GND J2 Pin 14 gt GND J2 Pin 14 FRDM KL43Z amp FRDM KL43ZKL33 8 FRDM KL46Z The board doesn t support external pull up resistors for I2C pins So the internal pull up resistors is enable for I2C pins However the resistor is quite huge 20KOhm 50KOhm The 12C may run FAIL in high baurate In this case user need to use external pull up resistors Master Board Connects To Slave Board Pin Name Board Location Pin Name Board Location PTD7 2C1_SCL J2 Pin 20 p PTD7 I2C1_SCL J2 Pin 20 x PTD6 I2C1_SDA J2 Pin 18 gt PTD6 I2C1_SDA J2 Pin 18 x GND J2 Pin 14 gt GND J2 Pin 14 FRDM KW24 Master Board Connects To Slave Board Pin Name Board Location Pin Name Board Location DC0 SCL J2 Pin 20 gt DC0 SCL J2 Pin 20 PCO SDA J2 Pin 18 gt ID2C0 SDA J2 Pin 18 GND J2 Pin 14 gt GND J2 Pin 14 Kinetis SDK v 1 3 Demo Applications User s Guide 218 Freescale Semiconductor Getting Started FRDM KW40Z Master Board Connects To Slave Board Pin Name Board Location Pin Name Board Location I2CI SCL J25 Pin 10 gt I2C1_SCL J25 Pin 10 DCI SDA J25 Pin 12 gt DCI SDA J25 Pin 12 GND J
211. oc u a a 4a 47a a alo aao kas a ao aao l o RR a a dea 205 49 4 Getting AR 206 49 4 1 Hardware settings o scu ho Rd a 9 a Se B 206 49 4 2 Prepare theexample ca 3 843 OR AE i OE BOR BOS G 207 49 4 3 Fe SS s o secc eG apie AR SHES ka a aa 8 EES 207 49 4 3 1 FLEXIO UART Wie Way ao e ao a ao a HEME RES 207 49 4 3 2 ELEKIO UART interrupt Way cio ee eee ees 208 Chapter 50 FTM Example 50 1 ORTEN one aoto e qe oro e pe we aa oe a ae oe Vara Vara o S 209 50 2 Supported Platforms 209 50 3 System Requirement 209 50 3 1 Hardware requirements lt 1 Ss 1 Sa FS TA SAS 341 3813 40a 3a bed a GS 209 30 3 2 Software TEQUNEMEDR a o a ea ea e ox ERK ka voe EEE Sa bos 210 50 4 Getting Started o saka EE REE ES a kun kuu ka as kak ka k kaba 210 50 4 1 Ei so sad aka ed a i kea a oa ka 210 50 4 2 Prepare MIS EKAMIS so s a mi or BS dk hoko kja i kok kan ES 210 50 4 3 Ron IS SINS 3 Sk us 8 a a a o sara a ked a kaj 210 Kinetis SDK v 1 3 Demo Applications User s Guide xxii Freescale Semiconductor Section number Title Page Chapter 51 GPIO Example 51 1 CRC o a ia a de G ie HOE ROMS 211 51 2 Supported Platforms 211 51 3 System Requirement s s 212 31 3 1 Hardware requirements 4 4 rs ark 374 ka a e kok kok kok ERS 212 SL 3 Software requirements o sasa sa bba ku w ku va ku ku iko iko as 212 51 4 Getting Started
212. ods The FlexIO SPI example shows the transmit receive between the FlexIO simulated SPI and SPI1 using these methods master e Using interrupts e Using the DMA slave e Using the interrupts e Using the DMA 48 2 Supported Platforms These Tower System modules and Freescale Freedom platforms are supported by the FlexIO SPI example e FRDM KL27Z e TWR KL43Z48M e TWR K80F150M 48 3 System Requirement 48 3 1 Hardware requirements e J Link ARM e P amp E Micro Multi link universal e Mini micro USB cable e USB A to micro AB cable e Personal Computer 48 3 2 Software requirements e The project files are in lt SDK_Install gt examples lt board gt driver_examples flexio spi lt mode gt lt toolchain gt e Library dependencies ksdk platform lib Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 199 Getting Started 48 4 Getting Started 48 4 1 Hardware settings This example requires connecting FlexIO pins with the SPIL pins Connect FlexIO pins to the SPI1 pins Note that the default uses the FlexIO pinO pin3 FlexIO Pins Connects To SPII Pins FlexIO Pin0 gt SPI1 MOSI MISO FlexIO Pinl gt SPI1 MISO MOSI FlexIO Pin2 gt SPI1 SCK FlexIO Pin3 gt SPI1 CSn Make these connections between the FlexIO Pins and the SPII pins by using external wires master example TWR KL43Z48M
213. oftware requirements e The project files are in lt SDK_Install gt examples lt board gt driver_examples pdb lt toolchain gt e Library dependencies ksdk_platform_lib 60 4 Getting Started 60 4 1 Hardware settings The PDB Example project does not call for any special hardware configurations Although not required the recommendation is to leave the development board s jumper settings and configurations in default state when running this example 60 4 2 Prepare the example 1 Connect a USB cable between the PC host and the OpenSDA USB port on the board 2 Open a serial terminal with these settings e 115200 baud rate e 8 data bits e No parity e One stop bit e No flow control 3 Download the program to the target board 4 Either press the reset button on your board or launch the debugger in your IDE to begin running the example 60 4 3 Run the example These instructions are displayed shown on the terminal window PDB example PDB ISR No 1 occurred PDB ISR No 2 occurred PDB ISR No 3 occurred PDB ISR No 4 occurred PDB ISR No 5 occurred PDB ISR No 6 occurred PDB ISR No 7 occurred PDB ISR No 8 occurred PDB ISR No 9 occurred PDB ISR No 10 occurred l PDB example finished Press any key to run example again Kinetis SDK v 1 3 Demo Applications User s Guide 248 Freescale Semiconductor Chapter 61 PIT Example 61 1 Overview The PIT Example project is a demonstration program that uses the KSDK
214. oice 1 5 You can select to toggle the RGB LED read the temperature of the client board and read the client unique ID Note that a different colored LED may turn on if the selected color is not available on that board Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 83 Run the demo Kinetis SDK v 1 3 Demo Applications User s Guide 84 Freescale Semiconductor Chapter 18 iRTC Comp 1 Hz Demo This demo application demonstrates the IRTC 1Hz output through XBAR with fine compensation 181 Overview The iRTC 1Hz output with compensation project is a demonstration program that uses the KSDK software It implements the following features e Use 32 768K external crystal as both IRTC and system FLL clock source e Enable IRC 4MHz to MCGIRCLK for iRTC fine compensation e Route the iRTC fine 1Hz output to XBAR OUTIO pin e Define the tested ppm by macro and calculate the compensate Integer and Frac value written to RTC COMPEN register 18 2 Supported Platforms This Tower System module is supported by the KSDK iRTC 1Hz output with compensation demo e TWR KM34Z75M 18 3 System Requirement 18 3 1 Hardware requirements e J Link ARM e P amp E Micro Multi link universal e Mini micro USB cable e USB A to micro AB cable e Hardware tower base board for specific device e Personal Computer 18 4 Getting Started 18 4 1 Hardware Settings This project does not call for any special hardware co
215. olchain gt e Library dependencies ksdk_platform_lib 27 4 Getting Started 27 4 1 Prepare the Demo 1 Connect a USB cable between the PC host and the OpenSDA USB port on the board 2 Open a serial terminal with these settings e 115200 baud rate e 8 data bits e No parity e One stop bit e No flow control Note that for the FRDM KLO3 platform the terminal baud rate should be 9600 3 Download the program to the target board 4 Either press the reset button on your board or launch the debugger in your IDE to begin running the demo Note For the MRB KWOL it is necessary to connect on the J8 pins 2 3 and change the CLOCK_SETUP to 1 or change the RTC input to OSC32KCLK in a different way For detailed instructions see a Kinetis SDK User s Guide for your board Kinetis SDK v 1 3 Demo Applications User s Guide 120 Freescale Semiconductor A Run the demo 27 5 Run the demo This menu is displayed on the serial terminal Please choose the sub demo to run 1 Get current date time 2 Set current date time 3 Alarm trigger show 4 Second interrupt show demo for 20s 5 Set RTC compensation Select Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 121 Run the demo Kinetis SDK v 1 3 Demo Applications User s Guide 122 Freescale Semiconductor Chapter 28 SAI Demo This demo application demonstrates how to use the SAI drivers 28 1 Overview The SAI Demo project is a digi
216. ome visitor I muttered tapping at my chamber doorOnly this and nothing more AES CBC Encryption of 320 bytes AES CBC encryption finished in 5359 ticks 89 us AES CBC Decryption of 320 bytes AES CBC decryption finished in 5151 ticks 85 us Decrypted string Once upon a midnight dreary while I pondered weak and weary Over many a quaint and curious volume of forgotten lore While I nodded nearly napping suddenly there came a tapping As of some one gently rapping rapping at my chamber doorIts some visitor I muttered tapping at my chamber doorOnly this and nothing more AES CCM Encryption of 320 bytes using iv length 12 bytes using aad length 20 bytes using key length 16 bytes using tag length 8 bytes AES CCM encryption finished in 6504 ticks 108 us AES CCM decryption of 320 bytes AES CCM decryption finished in 6473 ticks 107 us Kinetis SDK v 1 3 Demo Applications User s Guide 240 Freescale Semiconductor Getting Started Decrvpted string Once upon a midnight drearv while I pondered weak and wearv Over manv a quaint and curious volume of forgotten lore While I nodded nearly napping suddenly there came a tapping As of some one gentiv rapping rapping at mv chamber doorIts some visitor I muttered tapping at mv chamber doorOniv this and nothing more MMMM AES XCBC MAC AES XCBC MAC Computing hash of 320 bvtes Computed ha
217. ons User s Guide 8 Freescale Semiconductor Chapter 3 ADC Low Power Demo This demo application demonstrates how to use the ADC drivers in low power modes 3 1 Overview The ADC Low Power Demo project is a demonstration program that uses the KSDK software The microcontroller is set to a verv low power stop VLPS mode and everv 500 ms an interrupt wakes up the ADC module and takes the current temperature of the microcontroller While the temperature remains within boundaries both LEDs are off If the temperature is higher than average a red LED comes on If itis lower a blue LED orange LED for TWR KV10 TWR KV11Z75M comes on This demo provides an example to show how ADC works during a VLPS mode and a simple debugging golden project 3 2 Supported Platforms These Freescale Freedom development platforms and Tower System modules are supported by the Kinetis SDK ADC Low Power demo e FRDM K22F e FRDM K64F e FRDM KL25Z e FRDM KL26Z e FRDM KL27Z e FRDM KL43Z e FRDM KL46Z e FRDM KV10Z e FRDM KV31F e FRDM KW24 e FRDM KW40Z TWR K21D50M TWR K21F120M TWR K22F120M TWR K24F120M e TWR K60D100M TWR K64F120M TWR K65F180M TWR K80F150M e TWR KL43Z48M e TWR KM34Z75M e TWR KV10Z32 e TWR KV11Z75M e TWR KV31F120M Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 9 7858585531 Getting Started e TWR KW24D512 e USB KW24D512 e USB KW40Z 3 3 System Requirement 3 3 1 Hardware requirements
218. ost and the OpenSDA USB port on the board Open a serial terminal with these settings e 115200 baud rate e 8 data bits e No parity e One stop bit e No flow control 3 Download the program to the target board 4 Either press the reset button on your board or launch the debugger in your IDE to begin running the example DD 34 4 3 Run the example These instructions are displaved shown on the terminal window AFE Example An 8 MHz external crvstal is used as a clock source for AFE in this example Single and polling mode is selected Adjust the output DC value from 0 to 500 mV For example increase the output DC value while the program is running The printed log is displaved in the terminal window as shown below resultO 4910994 Ox4aef92 resultO 4928640 0x4b3480 resultO 5930280 0x5a7d28 result0 6031566 0x5c08ce result0 6633264 0x653730 result0 6723942 0x669966 result0 6948546 0x6a06c2 resulto 7288512 0x6f36c0 resultO 7418664 0x713328 resultO 7620930 0x744942 result0 8039334 0x7aaba6 resultO 8117874 0x7bde72 resultO 8268936 0x7e2c88 resultO 8276484 0x7e4a04 result0 8280666 Ox7e5a5a result0 8294334 0x7e8fbe Kinetis SDK v 1 3 Demo Applications User s Guide 148 Freescale Semiconductor Chapter 35 CMP Example 35 1 Overview The CMP Example compares the analog input to the reference DAC output to control an LED If the analog input is higher than the DAC output the LED is on O
219. ouch state change Kinetis SDK v 1 3 Demo Applications User s Guide 292 Freescale Semiconductor Chapter 74 Universal Asvnchronous Receiver Transmitter UART Example with other methods 74 1 Overview This UART example application demonstrates the KSDK Peripheral drivers with different methods e Using blocking method e Using non blocking method e Using DMA blocking method e Using DMA non blocking method e Using polling method Transfer data between the board and the PC The board transfers and receives characters the UART in terface Type characters from the keyboard and the board receives and then echoes them to the terminal screen See instructions output to the terminal 74 2 Supported Platforms These Freescale Freedom development platforms and Tower System modules are supported by the UART example e FRDM K22F e FRDM K64F e FRDM KLOZZ x eDMA not supported FRDM KV10Z e FRDM KV31F FRDM KW2A x eDMA not supported TWR K21D50M x CDMA not supported TWR K21F120M x eDMA not supported TWR K22F120M TWR K24F120M e TWR K60D100M x DMA not supported TWR K64F120M TWR K65F180M e TWR KL43Z48M x eDMA not supported e TWR KM34Z75M e TWR KVIOZ32 e TWR KV11Z75M e TWR KV31F120M e TWR KW24D512 x eDMA not supported Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 293 AR 8585858585 Getting Started 74 3 System Requirement 74 3 1 Hardware requirements J Link
220. platforms The application software is divided in two sections e BLDC motor control algorithm process input variables to output variables and flags e TWR board hardware and microprocessor serves as a bridge between hardware peripheral modules and BLDC motor control software algorithm 5 2 Supported Platforms This Tower System module is supported by the Kinetis software development kit e TWR KV10Z32 e TWR KV11Z75M 5 3 System Requirement 5 3 1 Hardware requirements e J Link ARM e P amp E Micro Multi link universal e Mini micro USB cable e USB A to micro AB cable e Hardware tower base board for specific device e Personal Computer 5 3 2 Software requirements e The project files are in lt SDK_Install gt examples lt board gt demo_apps bldc_demo lt toolchain gt e Library dependencies ksdk_platform_lib Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 17 Getting Started 5 4 Getting Started This table lists the FTM channels and MCU pins and corresponding LEDs for this demo application This table also lists which connections should be made if any to ensure proper demo operation 1 TWR MC LV3PH jumper settings jumper position J2 1 2 J3 l 2 J10 2 3 JU 2 3 J12 2 3 J13 2 3 J14 1 2 2 TWR KV10Z32 jumper settings jumper position jumper position jumper position
221. ple is running DSPI polling Master Slave Set up the slave first and the slave board displays this message on the terminal DSPI board to board polling example This example run on instance 0 Be sure DSPIO DSPIO are connected Slave example is running The master sends an array to the slave and receives the array back from the slave It also compares whether the two buffers are the same The master board displays this message on the terminal DSPI board to board polling example This example run on instance 0 Be sure DSPIO DSPIO are connected Transfer at baudrate 468750 Master transmit 01 02 03 04 05 06 07 08 09 OA OB OC OD OE OF 10 11 12 13 14 15 16 17 18 19 1A IB 1C 1D 1E 1F 20 Master receive 01 02 03 04 05 06 07 08 09 OA OB OC 0D OE OF 10 11 12 13 14 15 16 17 18 19 1A 1B IC 1D 1E 1F 20 DSPI Master Sends Receives successfully Press any key to run again The slave board receives and prints this message on the terminal Slave receive 01 02 03 04 05 06 07 08 09 OA OB OC OD OE OF 10 11 12 13 14 15 16 17 18 19 1A 1B IC ID IE IF 20 Slave example is running DSPI Loopback These instructions are displaved shown on the terminal window DSPI master self loopback example This example run on instance 0 Be sure MISO to MOSI are connected Transfer at baudrate 468750 Master transmit 01 02 03 04 05 06 07 08 09 OA OB OC OD OE OF 10 11 12 13 14 15 16 17 18 19 1A 1B IC ID 1E IF 20 Master receive 01 02 03 04 05 06 07 08 09 OA
222. ples lt board gt driver_examples dspi lt use_ case gt lt toolchain gt e Library dependencies ksdk_platform_lib 40 4 Getting Started 40 4 1 Hardware settings e DSPI master loopback Transfers data through the instance 0 of the SPI interface The MISO pin and MOSI pin are connected e DSPI board to board Transfers data through the instance 0 of the SPI interface SPIO pins of the master board are connected to the SPIO pins of the slave board FRDM K22F Master Board Connects To Slave Board Pin Name Board Location Pin Name Board Location MISO J1 pin 11 gt MISO JI pin 16 MOSI J1 pin 16 gt MOSI J11 pin 11 SCK JI pin 15 gt SCK JI pin 15 PCSOO J24 pin 9 gt PCSOO J24 pin 9 GND J2 pin 14 gt GND J2 pin 14 Kinetis SDK v 1 3 Demo Applications User s Guide 164 Freescale Semiconductor Getting Started FRDM KW24 Master Board Connects To Slave Board Pin Name Board Location Pin Name Board Location MISO J2 pin 10 gt MISO J2 pin 8 MOSI J2 pin 8 gt MOSI J2 pin 10 SCK J2 pin 12 gt SCK J2 pin 12 PCSOO J2 pin 6 gt PCSOO J2 pin 6 GND J2 pin 14 gt GND J2 pin 14 FRDM KW40 Ensure that J7 is disconnected and the SPI does not interfere with the serial connection to the external Flash chip Master Board Connects To Slave Board Pin Name Board
223. r VLPR Very Low Power Run mode Press E for enter VLPW Very Low Power Wait mode Press F for enter VLPS Very Low Power Stop mode Press G for enter LLS Low Leakage Stop mode Press H for enter VLLSO Very Low Leakage Stop 0 mode Press I for enter VLLSI Very Low Leakage Stop 1 mode Press J for enter VLLS3 Very Low Leakage Stop 3 mode Waiting for key to be pressed 1 Enter a command by pressing the corresponding input key If the user enters an invalid mode tran sition the demo displays this message on the terminal window Cannot go from RUN to VLPW directly Next loop Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 109 o W 7 o 7 a b Mh M M M Mm 3 MWobn n55 Getting Started In most valid mode transitions the SoC wakes up after receiving the RTC alarm or the GPIO switch trigger However in some modes the SoC only accepts either RTC alarm or the GPIO switch trigger In that case the demo prints the following message on the terminal Note On the FRDM KL25 Z FRDM KL26Z and FRDM KL46Z the RTC counter is fed without the 32 Khz OSC32KCLK clock Therefore the accuracy of RTC alarms is impacted The board does not support wake up from this mode by RIC due to disabled External Entering Very Low Leakage Stop 0 mode press the SW1 button to wake up Wake up goes through Reset sequenc
224. r Run mode Press E for enter VLPW Very Low Power Wait mode Press F for enter VLPS Very Low Power Stop mode Press G for enter LLS Low Leakage Stop mode Press H for enter VLLSO Very Low Leakage Stop 0 mode Press I for enter VLLSI Very Low Leakage Stop 1 mode Press J for enter VLLS3 Very Low Leakage Stop 3 mode Vaiting for key to be pressed 1 Enter a command by pressing the corresponding input key If the user enters an invalid mode tran sition the demo displays this message on the terminal window Cannot go from RUN to VLPW directly Next loop In most valid mode transitions the SoC wakes up after receiving the RTC alarm or the GPIO switch trigger However in some modes the SoC only accepts either RTC alarm or the GPIO switch trigger In that case the demo prints the following message on the terminal Note On the FRDM KL25Z and FRDM KL46Z the RTC counter is fed without the 32Khz OSC32KCLK clock Therefore the accuracy of RTC alarms is impacted The board does not support wake up from this mode by RTC due to disabled External Entering Very Low Leakage Stop 0 mode press the SW1 button to wake up Wake up goes through Reset sequence 26 5 4 Supported Low Power Modes By Platform This table shows the supported modes on different platforms Platform Supported Power Modes Wakeup Sources FRDM K22F WAIT STOP VLPR 4MHz VL RTC SW2 PW VLPS LLS3 VLLSO
225. ram through QSPI polling succeeded l Erase finished Program data finished Program through QSPI Interrupt succeeded Erase finished Program data finished Program through QSPI DMA succeed l Press any key to continue again Kinetis SDK v 1 3 Demo Applications User s Guide 254 Freescale Semiconductor Chapter 63 QuadTmr Example 63 1 Overview The QuadTmr Example project is a demonstration program that uses the KSDK software to demonstrate the QuadTmr timer functionality While the program is running the user captures waveforms in the scope 63 2 Supported Platforms This Tower System module is supported by the QuadTmr example e TWR KM34Z75M 63 3 System Requirement 63 3 1 Hardware requirements J Link ARM USB A to USB Mini B cable e Hardware tower base board for specific device e Personal Computer e Oscilloscope 63 4 Getting Started 63 4 1 Hardware settings This example requires one board and one oscilloscope Connect the oscilloscope to the QuadTmr output pin Board Connects To oscilloscope QTMRO TMRI gt Positive end Ground Test Point gt Ground end Make these connections between the board and oscilloscope by using oscilloscope probes TWR KM34Z75M Board Connects To oscilloscope Pin Name Board Location oscilloscope connection ends Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 255
226. rd and the board receives and echoes them to the terminal screen Type characters on the keyboard and the board receives and echoes them to the terminal screen 54 4 3 3 LPSCI DMA blocking These instructions are displayed shown on the terminal window LPSCI DMA Blocking Example Type characters on the keyboard and the board receives and echoes them to the terminal screen Type characters on the keyboard and the board receives and echoes them to the terminal screen 54 4 3 4 LPSCI DMA non blocking These instructions are displayed shown on the terminal window t t t 4 LPSCI DMA Non Blocking Example 4 Type characters on the keyboard and the board receives and echoes them to the terminal screen Type characters on the keyboard and the board receives and echoes them to the terminal screen 54 4 3 5 LPSCI polling These instructions are displayed shown on the terminal window t t t t LPSCI Polling Example 4 Type characters on the keyboard and the board receives and echoes them to the terminal screen Type characters on the keyboard and the board receives and echoes them to the terminal screen Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 229 AN A Getting Started Kinetis SDK v 1 3 Demo Applications User s Guide 230 Freescale Semiconductor Chapter 55 LPTMR Example 551 Overview The LPTMR Low Power Ti
227. re requirements e J Link ARM e P amp E Micro Multi link universal e Mini micro USB cable e USBA to micro AB cable e Hardware tower base board for specific device e Personal Computer 16 3 22 Software requirements e The project files are in lt SDK_Install gt examples lt board gt demo_apps i2c_comm lt mode gt lt toolchain gt Where lt mode gt is either master or slave e Library dependencies ksdk_platform_lib 16 4 Getting Started 16 4 1 Hardware configuration This demo requires two separate boards Make these connections between the two boards by using external wires In case of TWR KV11Z75M also connect pin 2 and 3 on J4 and J11 external wires FRDM K22F Master Board Connects To Slave Board Pin Name Board Location Pin Name Board Location I2C0 SCL J24 Pin 12 gt I2C0 SCL J24 Pin 12 I2C0 SDA J24 Pin 10 gt I2CO_SDA J24 Pin 10 GND J2 Pin 14 gt GND J2 Pin 14 Kinetis SDK v 1 3 Demo Applications User s Guide 60 Freescale Semiconductor Getting Started FRDM K64F Master Board Connects To Slave Board Pin Name Board Location Pin Name Board Location 12C0_SCL J2 Pin 20 D DC0 SCL J2 Pin20 DC0 SDA J2 Pin 18 gt DC0 SDA J2 Pin 18 GND J2 Pin 14 D GND J2 Pin 14 FRDM K64F Master Board Connects To Slave Board Pin Name Board Location Pin Name Boar
228. rm Current datetime 2014 12 25 19 00 00 Input the number of second to wait for alarm The second must be positive value Type characters on the keyboard and the board receives and initializes a second value to start an alarm mode Alarm occurs on the specified second Note On the FRDM KL26Z and FRDM KL46Z the R TC counter is fed without the 32 kHz OSC32KCLK clock Therefore the accuracy of RTC alarms is affected These instructions are displayed shown on the terminal window Alarm occurs at 2014 12 25 19 00 21 Alarm occurred Current datetime 2014 12 25 19 00 22 Input the number of seconds to wait for the alarm Seconds must have a positive value After the specific RTC date time matches the alarm date time an indicated LED should turn on Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 261 AN A Getting Started Kinetis SDK v 1 3 Demo Applications User s Guide 262 Freescale Semiconductor Chapter 66 SDHC SDCard Example 66 1 Overview The SDHC SDCard Example application demonstrates the use of SD card driver It displavs the card information followed bv a write read compare test and the erase operation Provide an example with different modes e Detect card inserted e Read and write single block and multi blocks to SDCard e Erase blocks in SDCard 66 2 Supported Platforms These Freescale Freedom development platforms and Tower System modules are supported by the SDHC SdCard example
229. ro Multi link universal e Mini micro USB cable e USB A to micro AB cable e Hardware tower base board for specific device e Personal Computer 52 3 2 Software requirements e The project files are in lt SDK_Install gt examples lt board gt driver_examples i2c lt use_ case gt lt toolchain gt e Library dependencies ksdk_platform_lib 52 4 Getting Started 52 4 1 Hardware settings This example requires two separate boards Connect an instance of the I2Cx master to the I2Cx slave The process is the same as the I C common instance in the demo project In case of TWR KV11Z75M also connect pin 2 and 3 on J4 and J11 Master Board Connects To Slave Board SDA gt SDA SCL gt SCL GND gt GND Make these connections between the two boards by using external wires FRDM K22F Master Board Connects To Slave Board Pin Name Board Location Pin Name Board Location PTB2 2C0_SCL J24 Pin 12 gt PTB2 22C0 SCL J24 Pin 12 Kinetis SDK v 1 3 Demo Applications User s Guide 216 Freescale Semiconductor Getting Started PTB3 2CO SDA J24 Pin 10 gt PTB3 I2CO SDA J24 Pin 10 GND J2 Pin 14 gt GND J2 Pin 14 FRDM K64F Master Board Connects To Slave Board Pin Name Board Location Pin Name Board Location PTE24 12C0_SCL J2 Pin 20 gt PTE24 12C0_SCL J2 Pin 20 PTE25 2C0O SDA J2 Pin 18 gt PTE25 I2
230. rt t Transferred with eDMA channel No 10 successful Press any key to start transfer with other channel Starting EDMA channel No 10 to transfer data from addr 0x1fff0000 to addr 0x1fff0028 c Starting EDMA channel No 11 to transfer data from addr 0x1fff0000 to addr 0x1fff0028 Transferred with eDMA channel No ll successful Press any key to start transfer with other channel Starting EDMA channel No 12 to transfer data from addr 0x1fff0000 to addr 0x1fff0028 Transferred with eDMA channel No 12 successful Press any key to start transfer with other channel Transferred with eDMA channel No 13 successful Starting EDMA channel No 13 to transfer data from addr 0x1fff0000 to addr 0x1fff0028 a Press any key to start transfer with other channel Transferred with eDMA channel No 14 successful Starting EDMA channel No 14 to transfer data from addr 0x1fff0000 to addr 0x1fff0028 c Press anv kev to start transfer with other channel Starting EDMA channel No 15 to transfer data from addr 0x1fff0000 to addr 0x1fff0028 Transferred with eDMA channel No 15 successful Press any key to start transfer with other channel This example shows how to transfer data from Flash to RAM on each channel that are supported by the eDMA instance Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 175 AN A Get
231. rt users 53 2 Supported Platforms This Tower System module is supported by the iRTC example e TWR KM34Z75M 53 3 System Requirement 53 3 1 Hardware requirements J Link ARM USB A to USB Mini B cable e Hardware tower base board for specific device e Personal Computer 53 4 Getting Started 53 4 1 Hardware settings The RTC Example project does not call for any special hardware configurations Although not required the recommendation is to leave the development board s jumper settings and configurations in default state when running this example 53 4 2 Prepare the example 1 Connect a USB cable between the PC host and the OpenSDA USB port on the board 2 Open a serial terminal with these settings e 115200 baud rate e 8 data bits e No parity e One stop bit e No flow control 3 Download the program to the target board Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 225 AR Getting Started 4 Either press the reset button on your board or launch the debugger in your IDE to begin running the example 53 4 3 Run the example These instructions are displayed shown on the terminal window RTC Example START Alarm Time is 2015 1 21 18 55 33 Current Time is 2015 1 21 18 55 31 Current Time is 2015 1 21 18 55 32 Ring ring ring Current Time is 2015 1 21 18 55 33 RTC Example END Afterwards the program enters an infinite loop Kinetis SDK v 1 3 Demo Applications User s
232. ructions are displayed shown on the terminal window DAC Example Enter the value for DAC input from 0 to 65535 Input the DAC value and the board converts that value to the DAC output The converted value can be seen on the oscilloscope These instructions are displayed shown on the terminal window Check oscilloscope to see DAC output of 20000 Verify that the voltage is compatible with the DAC level on the oscilloscope Kinetis SDK v 1 3 Demo Applications User s Guide 158 Freescale Semiconductor Chapter 39 DMA Example 39 1 Overview The direct memorv access DMA controller performs complex data transfers with minimal intervention from the host processor This example uses the DMA peripheral to transfer data from the Flash to RAM bv using the DMA with different channels 39 2 Supported Platforms These Freescale Freedom development platforms and Tower System modules are supported by the DMA example FRDM K22F FRDM K64F FRDM KL25Z FRDM KL27Z FRDM KL43Z FRDM KL46Z FRDM KW40Z TWR K21D50M TWR K22F120M TWR K24F120M TWR K60D100M TWR K64F120M TWR KM34Z75M TWR KM34Z75M TWR KL43Z48M TWR KV10Z32 USB KW40Z_KW40Z 39 3 System Requirement 39 3 1 Hardware requirements J Link ARM P amp E Micro Multi link universal Mini micro USB cable USB A to micro AB cable Hardware tower base board for specific device Personal Computer Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor
233. s This demo uses the FTM to modulate the duty cycle of two onboard LEDs to gradually increase LED intensity as the board deviates from a level state Optionally if you would like to observe the raw accelerometer X Y data you can connect to the board s virtual COM port This application is loaded onto the board at the factory for supported hardware platforms 6 2 Supported Platforms e FRDM K22F e FRDM K64F e FRDM KVIOZ e FRDM KV31F TWR K80F150M 6 3 System Requirement 6 3 1 Hardware requirements e USB Ato micro AB cable e Personal Computer 6 3 2 Software requirements e The project files are in lt SDK_Install gt examples lt board gt demo_apps bubble_level_ftm lt toolchain gt e Library dependencies ksdk_platform_lib 6 4 Getting Started 6 4 1 Hardware Settings The bubble level application does not call for any special hardware configuration Although not required the recommendation is to leave the development board jumper settings and configurations in default state Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 21 Run the demo when running this demo 6 4 2 Prepare the Demo 1 Connect a USB cable between the PC host and the OpenSDA USB port on the board 2 Optional Open a serial terminal with these settings e 115200 baud rate e 8 data bits e No parity e One stop bit e No flow control 3 Download the program to the target board 4 Either press the reset button on yo
234. s Guide Freescale Semiconductor 11 AN A Getting Started Kinetis SDK v 1 3 Demo Applications User s Guide 12 Freescale Semiconductor Chapter 4 AFE Qtimer Demo This demo application demonstrates two AFE channels sampling external analog signals and one channel can monitor AC signal s frequencv 4 1 Overview The AFE Qtimer Demo project is a demonstration program that uses the KSDK software It implements the following features e Two AFE channels channel 2 amp 3 sample external analog signals e If the external analog signal is AC signal with internal CMP1 and QtimerO one AFE chan nel channel 2 can also monitor the external signal s frequency This is typical use case to monitor the grid frequency e g 50 Hz in metering field By default users use debug console to output AFE channel values sampling and frequency monitor ing Implement Freemaster interface on this demo users can use Freemaster GUI to check the result as another option Freemaster download http www freescale com webapp sps download license jsp colCode FMASTERSWslocation nullsfsrch lsesr 6spageNum lsParent _nodeld amp Parent_pageType 4 2 Supported Platforms This Tower System module is supported by the KSDK AFE Qtimer demo e TWR KM34Z75M 4 3 Getting Started 4 3 1 Hardware Settings e Use external power supply to input DC analog signals to AFE channel 2 amp 3 J31 pin10 12 14 16 A FE sample can support both single ended or differen
235. s and configurations in default state when running this example 23 4 2 Prepare the example 1 Connect a USB cable between the PC host and the OpenSDA USB port on the board 2 Open a serial terminal with these settings e 115200 baud rate e 8 data bits Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 101 AR A Getting Started e No parity e One stop bit e No flow control 3 Download the program to the target board 4 Either press the reset button on your board or launch the debugger in your IDE to begin running the example 23 4 3 Run the example These instructions are displayed shown on the terminal window Mmau_filter_demo Begin First column is an input signal second column is an filtered output signal 0 gt 0 2166732 gt 360 2193973 3120 1604297 gt 13224 123267 gt 37264 12239 gt 79960 1734704 gt 141864 4097830 2 220856 5326223 316240 4660528 2 431704 3040692 2 574288 2258324 gt 750080 3341806 gt 960296 5629024 1201096 7363103 gt 1467192 7274451 gt 1755928 DI2Z3831 gt 2068168 4376659 gt 2405248 4701958 2 2764856 6648280 2 3139672 8689462 gt 3520160 9199008 gt 3899152 7914891 2 4274256 6175140 gt 4646056 5711947 gt 5013856 7090722 gt 5372904 9200346 gt 5715656 10253866 6036000 9398102 gt 6332656 7482051 6608672 6291825 gt 6867456 6941
236. s any key to start transfer Type a character on the keyboard and the master board sends to the slave board and receives back from the slave board On Master board Master sends 1 bytes 01 Master Sends Receives 1 bytes successfully Master sends 2 bytes 01 02 Master Sends Receives 2 bytes successfully Master sends 3 bytes 01 02 03 Master Sends Receives 3 bytes successfully Master sends 4 bytes 01 02 03 04 Master Sends Receives 4 bytes successfully On Slave board Slave is running Slave received 01 Slave received 01 02 Slave received 01 02 03 Slave received 01 02 03 04 Slave received 01 02 03 04 05 52 4 3 2 12C non blocking These instructions are displayed shown on the terminal window same as above Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 223 AR T E 7G 7 E E EFT aI Getting Started 52 4 3 3 12C callback These instructions are displayed shown on the terminal window same as above 52 4 3 4 12C polling These instructions are displayed shown on the terminal window same as above Kinetis SDK v 1 3 Demo Applications User s Guide 224 Freescale Semiconductor Chapter 53 iRTC Example 531 Overview The iRTC Example project is a demonstration program that uses the KSDK software to demonstrate the iRTC timer functionality After a pre defined time elapse the iRTC ISR is called to ale
237. se Freescale Freedom development platforms and Tower Svstem modules are supported bv the FTM example e FRDM K22F e FRDM KVIOZ e FRDM KV31F e FRDM KW24 TWR K21D50M TWR K21F120M TWR K22F120M TWR K24F120M e TWR K60D100M TWR K64F120M e TWR K65F180M e TWR KV10Z32 e TWR KV11Z75M e TWR KV31F120M e TWR KW24D512 lt note gt The TWR K65F180M Tower System module does not have a suitable LED The PWM signal is connected to the elevator board connector B25 lt note gt 50 3 System Requirement 50 3 1 Hardware requirements e J Link ARM e P amp E Micro Multi link universal e Mini micro USB cable e USB A to micro AB cable e Hardware tower base board for specific device Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 209 777 Getting Started e Personal Computer 50 3 2 Software requirements e The project files are in lt SDK_Install gt examples lt board gt driver_examples ftm lt toolchain gt e Librarv dependencies ksdk platform lib 50 4 Getting Started 50 4 1 Hardware settings The FTM Example project does not call for anv special hardware configurations Although not required the recommendation is to leave the development board s jumper settings and configurations in default state when running this example 50 4 2 Prepare the example Connect a USB cable between the PC host and the OpenSDA USB port on the board Open a serial terminal with these settings e 115200 baud rat
238. ser s Guide Freescale Semiconductor 81 7 mp gla gg am glacea s Getting Started FRDM KV31F Tower System module The board doesn t support external pull up resistors for I2C pins So the internal pull up resistors is enable for I2C pins However the resistor is quite huge 20KOhm 50KOhm The 12C may run FAIL in high baurate In this case user need to use external pull up resistors FRDM KV31F Single Board Master Connects To Slave Pin Name Board Location Pin Name Board Location I2CO_SCL J1 16 gt I2C1_SCL J1 02 PCO SDA J2 13 gt DC1 SDA Il 04 FRDM KV31F Two Boards Master Board 1 Connects To Slave Board 2 Pin Name Board Location Pin Name Board Location I2CO_SCL J1 16 gt I2C1_SCL J1 02 I2C0 SDA J2 13 gt DC1 SDA Il 04 GND J2 14 gt GND J2 14 FRDM KV10Z FRDM KL46Z Two Boards Master Board 1 Connects To Slave Board 2 Pin Name Board Location Pin Name Board Location I2CO_SCL J2 Pin 13 gt I2CO_SCL J2 Pin 13 I2CO_SDA JI Pin 15 gt I2CO_SDA JI Pin 15 GND J2 Pin 14 gt GND J2 Pin 14 TWR KV11Z75M Tower System module KV11 derivatives have only one I2C peripheral so only connection between two boards is possible The board doesn t support external pull up resistors for I2C pins So the internal pull up resistors is enable for I2C pins However the resistor is quite huge 20KOhm
239. sh ac aa c6 e9 c7 46 81 65 38 7b f 15 d9 3f 80 8a THE END OF THE LIC AES DRIVER EXAMPLE bssekresrriaas ass eee a mi ween ee 8 8 Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 241 AN A Getting Started Kinetis SDK v 1 3 Demo Applications User s Guide 242 Freescale Semiconductor Chapter 58 MMAU Example 58 1 Overview The Memorv Mapped Arithmetic Unit MMAU provides acceleration to a set of mathematical opera tions including signed unsigned multiplication and accumulation division and square root This example uses the MMAU module for sine x computing The sine x function is implemented using a 13th order polynomial approximation derived using a Taylor Series 58 2 Supported Platforms This Tower System module is supported by the MMAU example e TWR KM34Z75M 58 3 System Requirement 58 3 1 Hardware requirements J Link ARM USB A to USB Mini B cable e Hardware tower base board for specific device e Personal Computer 58 4 Getting Started 58 4 1 Hardware settings The MMAU Example project does not call for any special hardware configurations Although not required the recommendation is to leave the development board s jumper settings and configurations in default state when running this example 58 4 2 Prepare the example 1 Connect a USB cable between the PC host and the OpenSDA USB port on the board 2 Open a serial terminal with these settings e 115200 bau
240. ssfully For other boards U Transfer from FlexIO simulated UART to LPUARTI successfully FlexIO simulated UART receive from Flex LPUARTI successfully Transfer from FlexIO simulated UART to LPUARTI successfully FlexIO simulated UART receive from Flex LPUARTI successfully Transfer from FlexIO simulated UART to LPUARTI successfully FlexIO simulated UART receive from Flex LPUARTI successfully Transfer from FlexIO simulated UART to LPUARTI successfully FlexIO simulated UART receive from Flex LPUARTI successfully Transfer from FlexIO simulated UART to LPUARTI successfully FlexIO simulated UART receive from Flex LPUARTI successfully d UO al UO d UO al UO o 49 4 3 2 FLEXIO UART interrupt way These instructions are displayed shown on the terminal window FLEXIO UART Send Receive DMA Example Start FlexIO simulated UART send a buffer using DMA LPUARTI receives data from FlexIO simulated UART Compare rxBuff and txBuff to see result LPUARTI send a buffer FlexIO simulated UART receives data from LPUARTI using DMA Compare rxBuff and txBuff to see result NO PF WN EF Press any key to start transfer Type a character from the keyboard and the FlexIO simulated UART sends a buffer to the LPUARTI compares the received buffer in the LPUARTI side with the txBuff checks whether the result is successful Then the LPUARTI sends a buffer to th
241. tack 20 1 A saka III 91 20 2 Supported RTOS sss v 91 20 3 Supported Hardware o HE HERS Ee EES as 91 20 4 System Requirement 91 20 4 1 Hardware requirements lt o resres cester KER EER ESS ERS 91 20 4 2 Software requirements card Pee dee eee ia ai bii AS 92 20 5 KDE Started oe AA SRR eS SREY e REVO 92 20 5 1 Prepare the Domo coo sam sg va a e nas HEE e e kok a p ga ko 92 20323 Network Configuration 246540 40 a Deh moa ko kak a koka kok ERS 92 Kinetis SDK v 1 3 Demo Applications User s Guide x Freescale Semiconductor Section number Title Page 20 6 Run the demo Chapter 21 TCP Echo Demo on IwIP TCP IP Stack 21 1 IIAN PA 93 21 2 Supported RTOS E 93 21 3 Supported Hardware aaa e 93 21 4 System Requirement s s 93 21 4 1 Hardware reguirements lt s oce c ea a ka ko a a a ke 93 21 4 2 Software requirements 4 44 a 203 a 4a e kaza lm ERO ER EE RS 94 21 5 Getting Started 645 aa aaa kva a ka l komon ka av a ka as 94 LA ihe Prepare fbe DemO sa se Ee EE SS A RAS va aba Iu a OR EES 94 21 5 2 Network DILO aao e e ae o oe So dea BO eaj ea Ba i S 94 21 6 Run the demo 64544555 05 5245 RSE I I e 94 Chapter 22 UDP Echo Demo on IwIP TCP IP Stack 224 1 ne a Tr ea a TII TE TET TT TTT Dw TTT TII 97 222 Supported FIN oi x 9 ka o da 8 8 a 9 o ki OE ai RO di OLA Se
242. tal audio demonstration program that uses the KSDK software It performs audio plavback from either a wav file stored in Flash or from the line in on a TWR AUDIO SGTL Tower System module using the KSDK DS and DC drivers On the TWR K22F120M TWR K24F120M TW R K64F120M and the TWR K80F150M Tower System modules the project also uses the CMSIS DSP librarv to perform a Fast Fourier Transform and return the fundamental frequencv of the line in audio 28 2 Supported Hardware This demo supports the following Freescale Freedom development platforms and Tower System modules e TWR K21D50M e TWR K21F120M e TWR K22F120M TWR K24F120M e TWR K60D100M TWR K64F120M TWR K65F180M TWR K80F150M 28 3 System Requirement 28 3 1 Hardware requirements J Link ARM P amp E Micro Multi link universal e Mini micro USB cable USB A to micro AB cable e Hardware tower base board for specific device e Personal Computer 28 3 2 Software requirements e The project files are in lt SDK_Install gt examples lt board gt demo_apps sai_demo lt toolchain gt e Library dependencies ksdk_platform_lib Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 123 Run the demo 28 4 Getting Started 28 4 1 GCC Compiler notes When building the demo with GCC ensure that the demo and platform library are built with this option lt code gt lt br gt CHOOSE_FLOAT HARD_FP lt br gt lt code gt Otherwise the project does
243. target board 5 Either press the reset button on your board or launch the debugger in your IDE to begin running the example pa 48 4 3 Run the example master example These instructions are displayed shown on the terminal window FLEXIO SPI Send Receive Example Start 1 FlexIO simulated SPI master starts transfer with the masterWriteBuff and masterReadBuff 2 SPIl acts as slave also transfer with the slaveWriteBuff and slaveReadBuff Kinetis SDK v 1 3 Demo Applications User s Guide 202 Freescale Semiconductor AS A Getting Started 3 Compare the masterWriteBuff and the slaveReadBuff and the slaveWriteBuff and the masterReadBuff to see results Press any key to start the transfer Type a character on the keyboard and the FlexIO simulated SPI master starts the transfer with the SPI1 slave compares the masterWriteBuff and slaveReadBuff the slave WriteBuff and the masterReadBuff to check whether the transfer is successful F lexIO simulated SPI master to SPI slave bidirectional transfer succeed FlexIO simulated SPI master to SPI slave transfer DMA bidirectional transfer succeed F lexIO simulated SPI master to SPI slave bidirectional transfer succeed FlexIO simulated SPI master to SPI slave transfer DMA bidirectional transfer succeed FlexIO simulated SPI master to SPI slave bidirectional transfer succeed FlexIO simulated SPI master to SPI slave transfer DMA bidirectiona
244. te e 8 data bits e No parity e One stop bit e No flow control 4 Download the program to the target board 5 Either press the reset button on your board or launch the debugger in your IDE to begin running the example 49 4 3 Run the example 49 4 3 1 FLEXIO UART interrupt way These instructions are displayed shown on the terminal window FLEXIO UART Send Receive Example Start 1 FlexIO simulated UART send a buffer 2 LPUARTI receives data from FlexIO simulated UART 3 Compare rxBuff and txBuff to see result 4 LPUARTI send a buffer 5 FlexIO simulated UART receives data from LPUARTI 6 Compare rxBuff and txBuff to see result Press any key to start transfer Type a character from the keyboard and the FlexIO simulated UART sends a buffer to the LPUARTI compares the receive buffer in the LPUARTI side with the txBuff and checks whether the result is suc cessful Then the LPUARTI sends a buffer to the FlexIO simulated UART compares the received buffer in the FlexIO simulated UART side with the txBuff and checks whether the result is successful Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 207 AAA Getting Started FlexIO simulated UART receive from FlexIO LPUARTI successfully FlexIO simulated UART receive from FlexIO LPUARTI successfully FlexIO simulated UART receive from FlexIO LPUART1 successfully FlexIO simulated UART receive from FlexIO LPUARTI succe
245. te see the next section 2 6 2 Configure the number of samples Printing of the signal wave shape depends on the console size A console can be 100x40 To get the best printing effect align the number of samples to the console column numbers and convert the ampli tude range to the 0 row 1 range The console column number should be same as sample numbers Configuring the number of samples means configuring the console column size define CHART_ROWS 30U chart row for sampled data define CHART_COLS 100U chart column for sampled data define NR_SAMPLES 100U number of samples in one period 2 6 3 Configure the signal frequency Change the following macro to configure the desired frequency in Hz units define INPUT_SIGNAL_FREQ 20U in Hz 2 6 4 Configure the ADC instance Change the ADC_INST macro to configure the ADC instance you want to use define ADC INST 0U ADC instance 2 6 5 Configure the ADC input pin If you do not use the DACO_OUT as a input signal disable the macro in the project USE DAC OUT AS SOURCE After disabling the DAC output configure one ADC input source pin to get the signal define ADC INPUT CHAN 23U default input signal channel define ADC INPUT CHAN 6U default input signal channel for FRDM KV10 define ADC INPUT CHAN 4U default input signal channel for TWR KV11 For TWR KM34Z75M tdefine ADC INPUT CHAN 15U default input signal channel Kinetis SDK v 1 3 Demo Applicati
246. ter Board Connects To Slave Board Pin Name Board Location Pin Name Board Location MISO Primary Elevator gt MISO Primary Elevator B44 B45 MOSI Primary Elevator gt MOSI Primary Elevator B45 B44 SCK Primary Elevator gt SCK Primary Elevator B48 B48 PCSOO Primary Elevator gt PCSOO Primary Elevator B46 B46 GND Primary Elevator gt GND Primary Elevator B2 B2 TWR K60D100M Master Board Connects To Slave Board Pin Name Board Location Pin Name Board Location Kinetis SDK v 1 3 Demo Applications User s Guide 166 Freescale Semiconductor Getting Started MISO Primarv Elevator gt MISO Primary Elevator A77 A76 MOSI Primary Elevator gt MOSI Primary Elevator A76 A77 SCK Primary Elevator gt SCK Primary Elevator B64 B64 PCSOO Primary Elevator gt PCSOO Primary Elevator A63 A63 GND Primary Elevator gt GND Primary Elevator B2 B2 TWR K65F180M amp TWR K80F150M Master Board Connects To Slave Board Pin Name Board Location Pin Name Board Location MISO Primary Elevator gt MISO Primary Elevator B44 B45 MOSI Primary Elevator gt MOSI Primary Elevator B45 B44 SCK Primary Elevator gt SCK Primary Elevator B48 B48 PCSOO Primary Elevator gt PCSOO Primary Elevator B46 B46 GND Primary Elevator gt GND Primary Elevator B2 B2 FRDM KV10Z Master Board Connects To Slave B
247. the DAC and the ADC module following a user command to terminate the demo Also frees allocated memory Parameters prevState Pointer to previous state for the state machine Returns msg Returns 0 uint t demo end demo state t prevState Indicates to the user that the demo has been terminated Parameters prevState Pointer to previous state for the state machine Returns msg Returns 0 Kinetis SDK v 1 3 Demo Applications User s Guide 30 Freescale Semiconductor AN A Getting Started Kinetis SDK v 1 3 Demo Applications User s Guide 34 Freescale Semiconductor Chapter 10 Flash Demo This demo application demonstrates how to use the Flash drivers 101 Overview The Flash demo project shows how to erase program and perform swap if available on the Flash module Note 1 A target exists for the Flash memorv space Because the demo operates with the two last sectors of the lower half and the whole upper half of program flash memorv of the platforms with SWAP feature and the six last sector of the program flash of the platforms without the SWAP feature the user should not store anv program code or data in the above locations 2 The flash swap demo fails if the tested board has alreadv run swap command with the swap indicator address different from the values defined in the demo To overcome this issue erase the chip to uninitialize the swap svstem and rerun the demo features include Read to non
248. the FlexTimer0 via the PDB The FlexTimer is configured to generate the 16 KHZ PWM and the channell trigger is used to trigger both ADCs via the PDB The PDB is configured to generate four delayed trigger signals to both ADCs per FlexTimero Channel trigger and as a result 4 ADCs samples are converted per each Flextimer channel trigger The ADC is configured to be in a 16 bit differential and ping pong mode When an ADC conversion is complete an interrupt is generated by the ADC module and an interrupt ser vice routine is executed The interrupt service routine ADCn ISR calls the ADCn Task which executes these tasks reads ADC results registers filters ADC results with low pass FIR filter differentiates filtered results to detect a change in a voltage across the thermistor detects a negative positive slope of a voltage change to determine which LED is turned on off executes a software timer whose time out period is 100 ms and resets every 400 ms The software timer is used to generate a time base for LEDs flashing Kinetis SDK v 1 3 Demo Applications User s Guide 136 Freescale Semiconductor AS A Getting Started 31 4 2 1 ADC Differential Mode of Operation To measure a voltage across the thermistor configure the ADC for a differential mode of operation In a differential mode the ADC measures a difference between two analogous inputs The ADC enables selecting input pairs which are treated as differential inputs Detection of
249. therwise the LED is turned off 35 2 Supported Platforms These Freescale Freedom development platforms and Tower System modules are supported by the CMP example 35 3 System Requirement 35 3 1 e P amp E Micro Multi link universal e Mini micro USB cable e USB A to micro AB cable e Hardware tower base board for specific device 35 3 2 Software requirements FRDM K64F FRDM KLO3Z FRDM KV10Z TWR K21D50M TWR K21F120M TWR K22F120M TWR K24F120M TWR K64F120M TWR K65F180M TWR KM34Z75M TWR KV11Z75M TWR KV31F120M TWR KW24D512 USB KW40Z KW40Z J Link ARM Personal Computer Hardware requirements e The project files are in lt SDK_Install gt examples lt board gt driver_examples cmp lt toolchain gt Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 149 AR A Getting Started e Library dependencies ksdk_platform_lib 35 4 Getting Started 35 4 1 Hardware configuration In case of TWR KV11Z75M 1 Remove jumpers from J4 and J17 and make the connections between J4 pin 2 and J17 pin 3 by using the external wire 2 SW3 is used instead of SW1 35 4 2 Hardware settings The CMP Example project does not call for any special hardware configurations Although not required the recommendation is to leave the development board s jumper settings and configurations in default state when running this example FRDM KV10Z The on board SW3 button must be connected to PTC2 pin manually Conn
250. tial mode Board Connects To DC Power Supply AFE Channel 2 EXT_SD_ADP2 gt DC Power source 1 positive end J31 pin10 AFE Channel 2 EXT_SD_ADM2 gt DC Power source 1 negative end J31 pin12 AFE Channel 3 EXT_SD_ADP3 gt DC Power source 2 positive end J31 pin14 Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 13 AR Getting Started AFE Channel 3 EXT_SD_ADM3 gt DC Power source 2 negative end J31 pin16 e To monitor frequency use a signal generator to input the AC sine signal to the AFE channel 2 J31 pin10 12 Board Connects To Signal Generator AFE Channel 2 EXT SD ADP2 gt Signal Generator positive end J31 pin10 AFE Channel 2 EXT_SD_ADM2 gt Signal Generator negative end J31 pin12 4 3 2 Prepare the Demo 1 Connect a USB cable between the PC host and the OpenSDA USB port on the board 2 Open a serial terminal with these settings 115200 baud rate e 8 data bits e No parity e One stop bit e No flow control 3 Download the program to the target board 4 Either press the reset button on your board or launch the debugger in your IDE to begin running the example 4 3 3 Run the demo 1 AFE two channels voltage sampling e Use the DC power supply to input the two external signals from 0 500 mV to AFE channel 2 amp 3 The converted values value_ch2 and value_ch3 change with the external input on the debug con sole 2 External AC signal
251. ting Started Kinetis SDK v 1 3 Demo Applications User s Guide 176 Freescale Semiconductor Chapter 42 EWM Example 421 Overview The EWM Example project is a demonstration program that uses the KSDK software This function uses EWM asa Watchdog for an external circuit when the counter reaches a high value First the EWM keeps refreshing When the software button is pressed the EWM expires and an interrupt occurs 42 2 Supported Platforms These Freescale Freedom development platforms and Tower System modules are supported by the EWM example e FRDM K22F e FRDM K64F e FRDM KVIOZ e FRDM KV31F e FRDM KW24 TWR K21D50M TWR K21F120M TWR K22F120M e TWR K60D100M TWR K64F120M TWR K65F180M TWR K80F150M e TWR KM34Z75M e TWR KV11Z75M e TWR KV31F120M e TWR KW24D512 42 3 System Requirement 42 3 1 Hardware requirements J Link ARM P amp E Micro Multi link universal e Mini micro USB cable USB A to micro AB cable e Hardware tower base board for specific device e Personal Computer Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 177 AN Getting Started 42 3 2 Software requirements e The project files are in lt SDK_Install gt examples lt board gt driver_examples ewm lt toolchain gt e Library dependencies ksdk platform lib 42 4 Getting Started 42 4 1 Hardware settings The EWM Example project does not call for anv special hardware configurations Although not required t
252. tions User s Guide Freescale Semiconductor 43 A Y FreeMASTER Demo User s Guide Kinetis SDK v 1 3 Demo Applications User s Guide 44 Freescale Semiconductor Chapter 12 FTM PDB ADC Demo This demo application demonstrates how to use FTM external trigger to start ADC conversion via PDB 121 Overview This application demonstrates how to use the FTM external trigger to start the ADC conversion using the PDB The FTMO is configured as a complementary combined mode Each channel output frequency is 16 KHz The complementary channel dead time is 1 us The PDB pre trigger works in back to back mode The ADCO and ADCI work in single end mode The ADCO uses channel 1 and channel 5 ADCI uses channel 1 and channel 7 12 2 Supported Platforms This Tower System module is supported by the KSDK FTM PDB ADC demo e FRDM KVIOZ e TWR KV10Z32 e TWR KV11Z75M 12 3 System Requirement 12 3 1 Hardware requirements J Link ARM e P amp E Micro Multi link universal e Mini micro USB cable e USB A to micro AB cable e Hardware tower base board for specific device e Personal Computer 12 3 2 Software requirements e The project files are in lt SDK_Install gt examples lt board gt demo_apps ftm_pdb_adc lt toolchain gt e Library dependencies ksdk_platform_lib 124 Getting Started 12 4 1 Hardware Settings The Hello World project does not call for any special hardware configurations Although not required the recommendation is to
253. tions in default state when running this example 61 4 2 Prepare the example 1 Connect a USB cable between the PC host and the OpenSDA USB port on the board 2 Open a serial terminal with these settings e 115200 baud rate e 8 data bits e No parity e One stop bit e No flow control 3 Download the program to the target board 4 Either press the reset button on your board or launch the debugger in your IDE to begin running the example 61 4 3 Run the example These instructions are displaved shown on the terminal window Starting channel No 0 Kinetis SDK v 1 3 Demo Applications User s Guide 250 Freescale Semiconductor AS ii Getting Started Starting channel No l Channel No O interrupt is occurred Channel No O interrupt is occurred Channel No l interrupt is occurred Channel No O interrupt is occurred Channel No O interrupt is occurred Channel No l interrupt is occurred Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 251 AN A Getting Started Kinetis SDK v 1 3 Demo Applications User s Guide 252 Freescale Semiconductor Chapter 62 QSPI Example with other methods 62 1 Overview The QSPI example project is a demonstration program that uses the KSDK software This example erase and program external serial flash through QSPI This example involves three methods e QSPI using polling way to program the external serial flash e QSPI using interrupt way to pro
254. ts flashing the corresponding LED pair e The lab tutorial demonstrates how to configure ADC module to read differential inputs how to filter and process ADC results how to use FreeMASTER visualization tool to display sampled results 31 2 Supported Hardware This Tower System modules are supported by the Thermistor Lab demo TWR KV10Z32 TWR KV11Z75M 31 3 System Requirement 31 3 1 Hardware requirements e J Link ARM e P amp E Micro Multi link universal e Mini micro USB cable e USB A to micro AB cable e Hardware tower base board for specific device e Personal Computer 31 3 2 Software requirements e The project files are in lt SDK_Install gt examples lt board gt demo_apps thermistor_lab lt toolchain gt e Library dependencies ksdk_platform_lib 31 4 Getting Started 31 4 1 Prepare the Demo 1 Ensure that these jumpers are shorted Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 135 ga Getting Started TWR KV10232 J8 2 3 J11 1 2 3 4 J12 1 2 3 4 J13 1 2 3 4 J14 1 2 3 4 TWR KV11Z75M J6 1 2 3 4 J7 1 2 3 4 J8 1 2 3 4 J9 1 2 3 4 J13 2 3 1 Download the program to the target board 2 Touch 4 on board thermistor to see LED change For detailed instructions see a Kinetis SDK User s Guide for vour board 31 4 2 Demo Code Overview The lab application configures both ADCs to be triggered by
255. ts so a recreates wa aea aea se ESS keo ku 245 59 4 Getting Started e sos kiss IE EIF ES ERI E kE ks e ERG ks ka 246 59 4 1 Hardware setings ss a ea poao a EE RR RE AR dea 246 59 4 2 Frepare ie exams cc ts ee ee ooi a Gok g ae o ee ROS 246 59 4 3 Ron MS SANS ses ias ag kuu SO ah a haj a ak aks oR 246 Chapter 60 PDB Example 60 1 OVOIVIOW sss ks nia kaa kupa EE HEDGE va kus kv kanao ska 247 60 2 Supported Platforms s s 247 60 3 System Requirement 4 466564 poa e da a ja a oa la oa a a HES 247 60 3 1 Hardware IQUITOS o e s a a ko ako ias o kobo RA i ao ke e ke kk A 247 60 3 2 MOLLA a DEO IA a o a o ao o da O kake Boko Bee ow 9 248 60 4 GettingStartd s s sese es o 248 Kinetis SDK v 1 3 Demo Applications User s Guide XXVI Freescale Semiconductor Section number Title Page 60 4 1 o ii de AL aan ee AJ eko eo l eku ike we Go A 248 60 4 2 Prepate he example oo oo o ebo o o o a eA a a ado ibo las dera S 248 60 4 3 Pie eee a pa aes ak ek ka a a REE ARS SPI SR E REA AO 248 Chapter 61 PIT Example 61 1 ss i a da OS e a SLES o o ala o kea oa be Dos 249 61 2 Supported Platforms o A e ako a kO a o GO GSE 249 61 3 System Requirement 250 61 3 1 Hardware requirements 666448 49 ss 4 0 a seam ka ke ave kok kos koka ko 250 61 3 2 Software requirements 3 sac sa bb a bb i ku va ku kalk e akva 250 61 4 GellingStarltol k
256. uirements L 5 o us aw ease a a ka Re kok Ve RN 232 55 4 Getting Started eooo ER HERDER PERE wR SEM ERE SS 232 55 4 1 Hardware settings lt 83 8 IS ERS Eks ak CESS REEDED SASS 232 Kinetis SDK v 1 3 Demo Applications User s Guide XXIV Freescale Semiconductor Section number Title Page 55 4 2 Prepare dhe example ao so dae dee ewe eee eR ew ee a 232 55 4 3 Run ISE EKDE va eh a edo Rolo peo a a Me ba a o on aa A 232 Chapter 56 Low Power Universal Asynchronous Receiver Transmitter LPUART Example with other methods 56 1 ss i a 8 da OS e a Se SEES o aO oa oe be Dua 235 56 2 Supported Platforms sas aas HE e a OS 235 56 3 System Requirement 235 56 3 1 Hardware requirements cc o sr 235 56 3 2 Software requirements circa ara 236 56 4 Getting Started wk 4 i ees eau aa e asu 8 pom ok kom A os 236 56 4 1 Hardware PO oo os dra laa ela la Se O e doko ee ROS 236 56 4 2 Hardware settings o su sa R a Se ARA A e ard rko 236 56 4 3 Prepare theexample scc soc a oe AE i RR AA G 237 56 4 4 Ron theexample AR 231 56 4 5 BUI IEI A o eda e ee ee Gp hee Ge ET a ko alo Da lp do eS A ey 237 56 4 5 1 FLEXIO_UART interrupt way 2 e 4 9 a te eh e 237 56 4 5 2 LPUABTIGPIIN KIOS sa sk sko ia ao RA koe Sia io 238 56 4 5 3 LPUART DMA blocking ea slava al oro a ara ark eR ER ela ka 238 56 4 5 4 LPUAKT DMA non blocking a ei a so a gos e ea ae a e HS 238 56 4 5 5 LPUART
257. ult state when running this example For TWR K80F150M the OpenSDA UART and the SDRAM have multiplex pins Therefore ensure that there is no shunt on J6 Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 267 AR A Getting Started 67 4 2 Prepare the example Connect a USB cable between the PC host and the OpenSDA USB port on the board Open a serial terminal with these settings e 115200 baud rate e 8 data bits e No parity e One stop bit e No flow control 3 Download the program to the target board 4 Either press the reset button on your board or launch the debugger in your IDE to begin running the example Ne 67 4 3 Run the example These instructions are displayed shown on the terminal window for K80 after the J6 and J8 reset after the sdram write read check SDRAM Write Data and Read Data Succeed SDRAM Spend xx milliseconds with Cache Write back SDRAM Spend xx milliseconds with Cache Write through SDRAM Spend xx milliseconds with non cacheable SDRAM Example End These instructions are displayed shown on the terminal window for others SDRAM Example Start SDRAM Memory Write Start Start Address 0x70000000 Data Length 4096 SDRAM Write finished SDRAM Read Start Start Address 0x70000000 Data Length 4096 SDRAM Read finished SDRAM Write Data and Read Data Compare Start SDRAM Write Data and Read Data Succeeded SDRAM Example End Kinetis SDK v 1 3 Dem
258. ur board or launch the debugger in your IDE to begin running the demo For detailed instructions see the Getting Started with Kinetis SDK document 6 5 Run the demo When the board is programmed simply tilt the board to see the LED illuminate One LED color indicates X axis variation while another indicates Y axis variation Kinetis SDK v 1 3 Demo Applications User s Guide 22 Freescale Semiconductor Chapter 7 Bubble Level TPM Demo This demo application utilizes the on board accelerometer to implement a bubble level 7 1 Overview The bubble level application demonstrates basic usage of the on board accelerometer to implement a bubble level A bubble level utilizes two axes to visually show deviation from a level plane 0 degrees on a given access This demo uses the TPM to modulate the duty cycle of two onboard LEDs to gradually increase LED intensity as the board deviates from a level state Optionally if you would like to observe the raw accelerometer X Y data you can connect to the board s virtual COM port This application is loaded onto the board at the factory for supported hardware platforms 7 2 Supported Platforms e FRDM KL02Z e FRDM KLO3Z e FRDM KL25Z e FRDM KL26Z e FRDM KL27Z e FRDM KL43Z e FRDM KL46Z 7 3 System Requirement 7 3 1 Hardware requirements e USB A to micro AB cable e Personal Computer 7 3 2 Software requirements e The project files are in lt SDK_Install gt examples lt board gt dem
259. v 1 3 Demo Applications User s Guide 142 Freescale Semiconductor Chapter 33 ADC16 Example 33 1 Overview The ADC16 Example project is a demonstration program that uses the KSDK software to measure the internal temperature of the chip This function uses the user input as a trigger to start the measurement Use the ADC to read the chip s temperature press anv kev in the terminal and print the converted value and temperature to the terminal 33 2 Supported Platforms These Freescale Freedom development platforms and Tower System modules are supported by the ADC16 example e FRDM K22F e FRDM K64F e FRDM KLO2Z e FRDM KLO3Z e FRDM KL25Z e FRDM KL26Z e FRDM KL27Z e FRDM KL43Z e FRDM KL46Z e FRDM KV10Z e FRDM KV31F e FRDM KW24 e FRDM KW40Z e MRB KWOL TWR K21D50M TWR K21F120M TWR K22F120M TWR K24F120M e TWR K60D100M TWR K64F120M TWR K65F180M TWR K80F150M e TWR KL43Z48M e TWR KM34Z75M e TWR KV10Z32 e TWR KV11Z75M e TWR KV31F120M e TWR KW24D312 Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 143 7 Getting Started e USB KW4OZ KW40Z 33 3 System Requirement 33 3 1 Hardware requirements e J Link ARM e P amp E Micro Multi link universal e Mini micro USB cable e USB A to micro AB cable e Hardware tower base board for specific device e Personal Computer 33 3 2 Software requirements e The project files are in lt SDK_Install gt examples lt board gt driver_e
260. velopment platforms and Tower System modules are supported by the MPU example e FRDM K64F e TWR K21F120M TWR K60D100M TWR K64F120M TWR K65F180M TWR K80F150M TWR KM34Z75M 59 3 System Requirement 59 3 1 Hardware requirements e J Link ARM e P amp E Micro Multi link universal e Mini micro USB cable e USB A to micro AB cable e Hardware tower base board for specific device e Personal Computer 59 3 2 Software requirements e The project files are in lt SDK_Install gt examples lt board gt driver_examples mpu lt toolchain gt e Library dependencies ksdk platform lib Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 245 TL T 3uuul ki Getting Started 594 Getting Started 59 4 1 Hardware settings The MPU Example project does not call for any special hardware configurations Although not required the recommendation is to leave the development board s jumper settings and configurations in default state when running this example 59 4 22 Prepare the example Connect a USB cable between the PC host and the OpenSDA USB port on the board Open a serial terminal with these settings e 115200 baud rate e 8 data bits e No parity e One stop bit e No flow control 3 Download the program to the target board 4 Either press the reset button on your board or launch the debugger in your IDE to begin running the example N 59 4 3 Run the example These instructions
261. w 4 4 ses oan ais e ovos ju 8 sm kom a kos 250 61 4 1 Hardware DANINO os p dia Ge ee ela a Se O a doko kok i kok de ke ew re 250 61 4 2 Prepare the example lt c 23 s agy aku a 9 3499 ee ao e rd pekos 250 61 4 3 KURI ENI a kea WO 250 Chapter 62 QSPI Example with other methods 62 1 NEE i o Seg rn p pk a ka ka ka a Da ke dea 253 62 2 Supported Platforms ca oo dao a HOR GE ao A e BEM 253 62 3 System Requirement 253 62 3 1 Hardware requirements c a 3 o slabs a Eve e poa EKER babe bo ku 253 62 3 2 Software requirements ss 3 so icca ea pd deeded de ee RESES A es 253 62 4 Genna Stared bh e e aE e a AR Se Ree O E T E E RES REE 253 62 4 1 Hardware settings o a ba a eo a o e keo Ra oe OG y EES a 253 62 4 2 Prepare the example o ccc RR e lao RRR RR bla EERE RE A 254 62 4 3 R n hie example coco cis ku 4 g e g e a aos 254 Chapter 63 QuadTmr Example 63 1 NOTE oh PhS a aera ao e o iu kv an a a a 255 63 2 Supported Platforms s e 255 Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor xxvii Section number Title Page 63 3 System Requirement 255 63 3 1 Hardware requirements o os a dea doko A 255 63 4 Getting Started o nosostros iwa a ea esee ika as 255 63 4 1 Hardware sehinga a SDA SIS AS kk da kia kaas meka sa 33 US 255 63 4 2 Prepare IKEK a o esot es bead ken tea teatea Se HER pieg 256 63 4 3 KAMIONI ss iS ks ae
262. xamples adc16 lt toolchain gt e Library dependencies ksdk platform lib 33 4 Getting Started 33 4 1 Hardware settings The ADC16 Example project does not call for any special hardware configurations Although not required the recommendation is to leave the development board s jumper settings and configurations in default state when running this example 33 4 2 Prepare the example 1 Connect a USB cable between the PC host and the OpenSDA USB port on the board 2 Open a serial terminal with these settings e 115200 baud rate e 8 data bits e No parity e One stop bit e No flow control 3 Download the program to the target board 4 Either press the reset button on your board or launch the debugger in your IDE to begin running the example 33 4 3 Run the example These instructions are displayed shown on the terminal window Kinetis SDK v 1 3 Demo Applications User s Guide 144 Freescale Semiconductor AS A Getting Started press anv kev to start measure temperature Input anv character from the kevboard to start calculating the temperature with the calibrated value and formula listed in the Reference Manual These instructions are displaved shown on the terminal window press anv kev to start measure temperature ADC converted value 14151 Temperature 29 press anv kev to start measure temperature Kinetis SDK v 1 3 Demo Applications User s Guide Freescale Semiconductor 145 AN A Getting Started Kinetis SDK v
Download Pdf Manuals
Related Search
Related Contents
1er DEGRÉ D`OBSERVATION PROGRAMME 乾式用スイベル 取扱説明書 【ー】 警告および注意 @ ご使用前に丶 この 15_TS_1_B1_pratique 7 MB 0505 "/" 0404 Fanton net Water Application User Manual Decisional Module DIVISION OF GENETICS INDIAN AGRICULTURAL RESEARCH USER'S MANUAL Ti700 User Manual Emerson Avocent Universal Management Gateway User Guide Copyright © All rights reserved.
Failed to retrieve file