Home
TWR-K53N512 Quick Start Demo Lab Guide
Contents
1. LS bsp_twrk53n512 Debug HR archives hi Includes i Debug Generated Code gt Generic 10 Drivers Peripheral 10 Drivers I gt Release it Sources gt bwrk53n512 BSP Files twrk53n512 User Config E Ek user_config h 16 Change define BSPCFG_ENABLE_I2C1 0 define BSPCFG_ENABLE_ESDHC 0 to define BSPCFG_ENABLE_12C1 1 define BSPCFG_ENABLE_ESDHC 1 17 Save the user_configh h file 18 Click on the Make button to re compile the K53 BSP library This makes the edits in the user_config h file take effect TWR K53N512 Quick Start Demo Lab Guide Page 8 of 22 es freescale 19 If you did not install the MQX project in the default C Program Files Freescale Freescale MQX 3 7 directory during installation you must first recompile the rest of the MQX libraries See the MQX release notes for more information before continuing on with the lab 20 Next we need to import the Quick Start Demo into our CW10 workspace 21 Click on File gt Import in the menu bar In the dialog box that comes up select Existing Projects into Workspace under the General folder Then click Next Select an import source type filter text E i General i Archive File L Existing Projects into Workspace lana File System E Preferences eS CCH 22 On the next screen select the Select root directory option and click on Browse 23 Navigate to the C Program Files Freescale Freescale MQX 3
2. freescale com maqx for more information on using MQX TWR K53N512 Quick Start Demo Lab Guide Page 16 of 22 Cp es freescale 7 Creating a new MQX project To create a new MQX project in CW10 1 use the following steps 1 Go to File gt New gt MQX 3 7 Project File Edit Refactor Navigate Search Project Run MOx Tools Profiler PEMicro Processor Expert Window New Alk Shirt h yi Linuxfuclinux Application Project Open Path Ctrl ShiFk 4 ya MO 3 7 Project Open File Bareboard Project 2 Follow the wizard to setup and create a new MQX project To create a bare board MQX project in IAR use the following steps 1 Make sure you have not modified the files in the K53 Quick Start Demo 2 Double click on the create_new_k53_mqx_project_iar exe file inside the K53 Quick Start Demo 3 Type in the new project s name with no spaces such as k53_hello 4 Hit Enter and wait for it to finish creating the new project The script will copy the project files from the K53 Quick Start Demo into a new directory in lt mqx_dir gt demo modify them to use the new name and copy the Hello World example from lt mqx_dir gt mqx examples hello 5 Hit Enter to close Window To manually copy the Quick Start Demo use the following steps 1 Copy the TWR K53N512_Quick_Start_Demo folder and place the copy in the MQX demo folder at C Program Files Freescale Freescale MQX 3 7 demo 2 Rename the folder to the new project name with no spaces
3. freescale TWR K53N512 Quick Start Demo Lab Guide Board configuration software and development tools Rev 2 2011 08 26 Most up to dated lab guide and source code are available at www freescale com twr k53n512 Freescale the Freescale logo CodeWarrior ColdFire C Ware the Energy Efficient Solutions logo are trademarks of Freescale Semiconductor Inc Reg U S Pat amp Tm Off ColdFire CoreNet Flexis Kinetis MXC Platform in a Package Processor Expert and Xtrinsic are trademarks of Freescale Semiconductor Inc All other product or service names are the property of their respective owners 2011 Freescale Semiconductor Inc Freescale Semiconductor Inc TWRK53N512QSDLAB s Tp freescale Contents L TPE OS 6 Setiorsieee cic cats aesed ares cies eniesa ces EEE E E E 3 A COMPETE SEAT CWA Ceo cece cece E e cmnc acne awe eits scent eyo tet cece na ecyeusse tus E 3 3 Runie DOTOS civ sass tae ca ete eave ceca eee wv tnc ce eee ca ene on puta EEEa EEEE aa 3 4 Development Software and Programming the Board sssssssssssussusunnunnunnunnunnunnunnnnunnunnnnnnnnnnnnnnnnnnn 6 4 1 CodeWarrior Development Studio for Microcontrollers 10 1 0 cessesesesesseseeeseseecsesesesessesseeseseseassseesaces 6 4 2 IAR Embedded Workbench for ARM 6 10 5 wu sssssssesesesssesesssessssscssacecacacecacasenscenacosasanatanauatatananatatataeaeseaeaeaess 13 PAST AW AE Depo UN easiest ce cats cece sped seems cean alfa ote accuse eae ca ec nep
4. 1 TWR K53N512 Quick Start Demo Lab Guide Page 13 of 22 Cp es freescale define BSPCFG_ENABLE_ESDHC 1 8 Save the user_config h file noe 9 Click on the Make button to re compile the K53 BSP library This makes the edits in the user_config h file take effect Make sure bsp_twrk53n512 Debug project is bolded 10 If you did not install the MQX project in the default C Program Files Freescale Freescale MQX 3 7 directory during installation you must first recompile the rest of the MQX libraries See the MQX release notes for more information before continuing on with the lab 11 Open the workspace file that will be located at C Program Files Freescale Freescale MQX 3 7 demo TWR K53N512_Quick_Start_Demo iar TWR K53N512_Quick_Start_Demo eww 12 Open the web h file in the project pane window Double click the file item located in the Source web group in the project tree AO TWR K53N512 Quick _StartDemo MFS Libraries MO Libraries RTCS Libraries Shell Libraries Hal GI Source adc sled Etsi usb a O web H cgi h 4 k cgi_index c html h html _util c RTCS c tis_data c DE Accel_Task c 13 You can change the default IP address by modifying the ENET_IPADDR definition For example to set the target address to 169 254 3 3 and the line will be define ENET_IPADDR IPADDR 169 254 3 3 14 You could also use DHCP instead of a static IP address by setting DEMOCFG_ENABLE_DHCP to 1 in web h 15 Save the file afte
5. CodeWarrior Alert X Secure Warning The current download operation attempts to modify the Flash Control Field FCF Therefore the target processor may become secured irreversibly This is often caused by an incorrect Linker Command File that does not reserve the FCF address range From Ox400 to Ox40F Do you wank to abort Choose ves to abort avoiding an unwanted secure of the target or No bo continue downloading ONLY IF you really intend to modify the FCF Cancel aborts the operation as well This is a check introduced with a CodeWarrior compiler patch Hit No to continue flashing the part as the BSP is configured to ensure the part remains unsecured 41 Once the code is done flashing the code will pause at the start of the MQX main function TWR K53N512 Quick Start Demo Lab Guide Page 12 of 22 Cp es freescale 42 Hit the run icon to continue the program execution U 4 2 IAR Embedded Workbench for ARM 6 10 5 43 Optional See Section 8 for OSJTAG Troubleshooting or follow the directions in Section 9 to update the OSJTAG firmware and drivers This step is only required if you have trouble with programming via OSJTAG or printing to the utilities of the P amp E OSBDM OSJTAG Virtual Serial Toolkit 1 Install AR Embedded Workbench for ARM 6 10 5 from DVD The Evaluation edition or Full edition will be required because of the large code size needed for the MQX Quick Start Demo software Newer versions ar
6. For example k53_demo 3 Inside the k53_demo folder go into the iar folder 4 Rename the four IAR files to k53_ demo 7idemok5S3_demotjar settings i k53 demo dep k53 demo emd F k53 demo ewp a k53 demo ewn 5 Open the k53_demo eww file with a text editor instead of IAR and change the following line to point to the new project name TWR K53N512 Quick Start Demo Lab Guide Page 17 of 22 ey freescale lt 7xml version 1 0 encoding 1580 ese659 1 gt lt workspace gt lt proqyect gt lt path gt s_ D t s k53 _demo ewp lt path gt lt r project lt hatchBuild gt lt workspace gt 6 Save the file 7 Open the k53_demo eww workspace 8 OSJTAG Open Source JTAG also known as OSBDM on Freescale tower boards allows a user to program debug and get serial data from Kinetis devices via a single USB connection The firmware is programmed on a Freescale MCFSO8JM60 MCU on the underside of the TWR K53N512 board When the tower board is plugged in it should enumerate as a composite device with one driver for debugging and the other as a serial port If you go to the Device Manager you should see the following CVOICD ROM drives ta Human Interface Devices IDE ATAJATAPI controllers E8 Jungo Eg PEMicro USB Serial Port til Eg USE Multilink 2 0 Eg winDriver ae Keyboards gt LibUSE Win32 Devices Ge Open Source BOM Debug Port Mice and other pointing devices i
7. manage and run configurations Download an application to a target then debug or run the application fH MSs m Name TWR ESSNS512_ Quick Skart_Dermo_Int_Flash_Debug_PEOSITAG vettore o E Main Arguments s Debugger B Source ME Environment E Common a Trace and Profile E CodeWarrior Attach c CodeWarrior Connect ClC application E c CodeWarrior Download Project TWR ES3N512 Quick _Start_Dermo BT WR K53N512_Quick_Start_Demo_Int_Flash_Debug_PEOSITAG Application Int Flash Deb fintflash _d af Bsesrchierasect fe TWR KSSNS12 Quick Start Demo Int Flash Release PEOSITAG ee A E aE ean n scans as one E TWR ESSNS12 Quick Start _Demo_Int_ Ram Debug PEOSITAG Launch Group Remote system System TWRESSNS12 OSBDM OSITAG a Note Note for future reference make sure that the target memory selection here is the same as step 33 For example if the build setting is flash base the debug should be configured as flash base as well Note If this is the first time you ve used CW10 1 with your board you may get a dialog box asking to update the OSJTAG firmware In that case unplug your board Put a jumper on J28 which is labeled JM60 BOOT and plug the board back in Hit OK on the dialog box and the board OSJTAG firmware will update When it is done unplug the board remove the jumper on J28 and hit OK again on the dialog box NOTE You may also see the following Warning message
8. project and the settings in the framework or if the RSE system is missing in the project 27 Click on Configure Merge Settings to avoid having the dialog box re come up for this project 28 On the screen that comes up select the Use the most recent RSE System settings option and click Apply and then OK Preferences Filtered oeg type filter text Ek Merge Remote Systems Merge Projects that reference RSE Systems contain an internal cache of the referenced RSE Systems When such projects are imported in the workspace the RSE Systems in the cache may differ From the actual RSE Systems in the workspace or be missing entirely Select how to handle differing RSE Systems Display a dialog to manually resolve the conflict Use the most recent RSE System settings Use the project cached RSE System settings Discard the project cache Create new RSE Systems if needed Select how to handle missing RSE Systems Display a dialog Re create RSE Systems 29 Then hit Yes to get rid of the error message It is very important to not hit No 30 If you did hit No you will need to reset the RSE project settings First close the project by right clicking on it and selecting Close Project and then open it up by right clicking on the project and selecting Open Project The dialog box should come up again and follow the steps listed above to solve this issue 3
9. take a few minutes to default to the auto IP address and make the connection Ensure any browser proxy settings VPN connections and wireless connections are turned off since that can interfere with making a connection to the IP address This Demo has been tested with IE explorer browser 21 If you have trouble connecting you may configure the IP address of the computer manually Select Start gt Settings gt Network Connections gt Local Area Connection Note your original TCP IP settings and then set your IP address to 169 254 3 4 set your subnet mask to 255 255 0 0 and set your gateway to 192 168 1 1 22 Open a web browser and go to the target device address In this case 169 254 3 3 23 You should see the web server welcome page in the browser window as seen in figure below T A w ahr Freescale Kinetis MOM Webserver gi B E v f Page Of Tools F op 4 freescale Po anaa g a Taja Webserver Home Accelerometer RTC LED Control Status k50 Family Browse SD Card i Kinetis k53 using Freescale MOX Web Server Kinetis K53 is the superset of the K50 family The K50 MCU family includes IEEE 1588 Ethernet full speed USB 2 0 On The Go with device charge detect capability hardware encryption and tamper detection capabilities The Kinetis family also provides a rich suite of analog communication timing and control peripherals Mt MOX Accelerate your design success with compliment
10. 1 Repeat these steps for any other RSE message boxes that appear 32 Highlight the project name on the CodeWarrrior Project Panel as shown File Mame CCC BS Be TWR ESSNS12 Quick Start Demo gt Int Ram Debug Linker Files MFS Libraries gt MOY Libraries Wma a et el ed eee E E E J TWR K53N512 Quick Start Demo Lab Guide Page 10 of 22 ey lt freescale 33 On the CodeWarrior 10 1 Menu choose Project gt Build Configuration gt Set Actve gt Int Flash Debug C C CodeWarrior Development Studio File Edit TE Refactor o MWp hy oa oo oP Hie CodeWarrior Projects 2 2 File Mame E f TWR KS3N512_Quick_Start_Dem E inl Includes gt Int Ram Debug linker Files Navigate Search PaE Run MOs Tools Profiler orp Build All Ctrl B Processor Expert Window Help A Bie 0 Q ae Close Project Build Configurations Build Project Build Working Set Clean Bald faker abir alle 1 Int Ram Debu Set Active Manage 3 Int Flash Release 34 Open the web h file located in the Source web group in the project tree E TW R KS3N512_Quick_Start_Demo pr Binaries HiH Includes Int Flash Debug C Int Ram Debug GS Linker Files E MFS Libraries gt MGs Libraries G2 RTZS Libraries Int Sa4nalysispointsManager apconfig E Shell Libraries Source H E H H HEEE
11. 7 demo TWR K53N512_Quick_Start_Demo directory and hit OK 24 Make sure TWR K53N512_Quick_Start_Demo is checked and hit Finish Please read the instructions below for the error dialog box that will likely come up after hitting Finish Import Projects Select a directory to search For existing Eclipse projects Select root directory C Program Files Freescale Freescale MOX 3 7idemolTWR KSSNS12_Ouick_Start_Demo Projects TWR KSSN512 Quick Start Demo C Program Files FreescalelFreescale MOY 3 7 demo TWR KSSNS12 Quick Start Demolcwl0iTwR k53NS12 Quick Start Derma p Select All Deselect All Copy projects into workspace o TWR K53N512 Quick Start Demo Lab Guide Page 9 of 22 ty freescale 25 At this point you may or may not see the following error message 1 Remote System Missing The project TWR K40 256 Quick Stark Demo refers to a Remote System 5D bwrk60nS512_ Int Flash Release PoE U MultiLink that does not exist in vour current Workspace Do you want to add the Remote System to your workspace QSD_twrk53n51 Int Flash Release_PnE U MultiLink Hardware or Simulator MoteGenerated From pre R SE Launch Configuration ddress Configure Merge Settings 26 When importing a project you will often see a Remote Systems Changed or Remote System Missing dialog box This occurs when CodeWarrior detects a mismatch between the RSE Remote System Explorer settings in the
12. E E E E E H E le Accel_Task c adc Ley Demo_Task c ES demo h l Demol c Ley Demola h ge Game_Task c ey Init_Task c Ley SDCard_Task c L Shell_Commands c ey Shell_ Commands h sled L Tasks c E gt tsi usb web eh cgi _index c c cgi h Le html util c key trol A Le RTCS c Hl ew E E E E i E web A 35 You can change the default IP address by modifying the ENET_IPADDR definition For example to set the target address to 169 254 3 3 and the line will be define ENET_IPADDR IPADDR 169 254 3 3 36 You could also use DHCP instead of a static IP address by setting DEMOCFG_ENABLE_DHCP to 1 in web h 37 Save the file after you are done TWR K53N512 Quick Start Demo Lab Guide Page 11 of 22 Vey Z freescale 38 Build the project by clicking on the Hammer icon in the toolbar 39 Double click on the TWR k53n512_Int_Flash ttf file In the dialog box that comes up click OK The file will then open You can then close it You only need to do this step once after initially opening the project The dialog box may also not appear so do not worry if that is the case 40 Click Run gt Debug Configurations in the menu bar and select the TWR K53N512_ Quick_Start_Demo_Int_Flash_Debug_ PESJTAG configuration Then hit the debug button in the bottom of the window The code will then be flashed to the board and the debugger will start Debug Configurations Create
13. Moderns i Monitors If you only see it enumerate as the Open Source BDM Debug Port then your computer may automatically picking up an outdated driver To fix this right click on the OSBDM driver and select Uninstall Then unplug and re plug in the board and it should enumerate correctly 2e LIbUSB Win32 Devices ad Open Source BOM Debug Por ie a ae l Update Driver Mice and other pointing devices Disable P Modems 2 Monitors Uninstall Big Network adapters acan For hardware changes If there are still problems with enumerating correctly you can also manually select the drivers as following TWR K53N512 Quick Start Demo Lab Guide Page 18 of 22 Tp Pp freescale Found New Hardware Wizard Welcome to the Found New Hardware Wizard This wizard helps you install software for Open Source BOM Debug Fort 6 If your hardware came with an installation CD lt on floppy disk insert it now what do vou want the wizard to do Install the software automaticall Found New Hardware Wizard Please choose your search and installation options Search for the best driver in these locations Use the check boxes below to lint or expand the default search which includes local paths and removable media The best driver found will be installed E Search removable media floppy CO AOM Include this location in the search C Program Files Freescale Freescale JMBO GUAM Choo
14. Quick Start Demo using MQX 3 7 with both CodeWarrior MCU 10 1 and IAR 6 10 5 You may apply the same steps mentioned in this section to program other projects as well Make sure you follow the steps in order Note For Windows Vista and Windows 7 users it is recommended to install both the compiler IDE and MQxX at a directory other than the default C Program Files directory Note If you open a project that was developed in IAR 6 10 5 with a newer version of IAR 6 20 x re opening the same project in IAR 6 10 5 again will cause compiling issues 4 1 CodeWarrior Development Studio for Microcontrollers 10 1 1 Optional See Section 8 for OSJTAG Troubleshooting or follow the directions in Section 9 to update the OSJTAG firmware and drivers This step is only required if you have trouble with programming via OSJTAG or printing to the utilities of the P amp E OSBDM OSJTAG Virtual Serial Toolkit 2 Install CodeWarrior Development Studio for Microcontrollers 10 1 from DVD The Evaluation edition will be required because of the large code size needed for the MQX Quick Start Demo software Other CodeWarrior licensing versions are also available at www freescale com codewarrior 3 You will need to update the latest CW 10 1 Patches in order for CW 10 1 to support K50 family devices Follow the Codewarrior MCU V10 1 Update Guide from DVD or from this URL to get all of the CW10 1 updates via the online method You can also use the offline instructions t
15. ary RTOS TCP IP and USB stacks provided by Freescale MOX Software Solutions Available on Freescale processors for more than 15 years Freescale MOX Software Solutions offer a straightforward API with a modular architecture making it simple to fine tune custom applications and scalable to fit most requirements The combination of our market proven Freescale MOX Software Solutions and silicon portfolio provides a streamlined and powerful platform by creating a comprehensive source for hardware software tools and services needs x i gt 9 Internet F 100 24 Browse the links on the left hand side to see other pages These pages include e Accelerometer data e Real Time Clock displaying elapsed time since first boot up or the time set by the settime command e Toggle LED s TWR K53N512 Quick Start Demo Lab Guide Page 5 of 22 Cp es freescale e Status of the switches LED s potentiometer and ADC temperature sensor e More information on the Kinetis K50 family 25 Create and save an index html file onto an SD card not included in the TWR K53N512 kit 26 Insert the SD card into the TWR K53N512 module 27 Click on Browse SD card to browse the index html created by you from the SD Card You can also access any other webpage on the SD card by going to lt board IP address gt sdcard file_name html 4 Development Software and Programming the Board Instructions below show you how to build and flash the Kinetis
16. e also available from www lAR com 2 Install Freescale RTOS MQX 3 7 from DVD or from www freescale com MQX 3 Install Freescale RTOS MQX 3 7 Patch for TWR K53N512 from DVD or from www freescale com MQX Note The source code for the Quick Start Demos is bundled with MQX 3 7 Patch for TWR K53N512 Once installed you will be able to find the project at the default installation directory at C Program Files Freescale Freescale MQX 3 7 demo TWR K53N512_Quick_Start_Demo If there are future updates it will be a file call TWRK53N512QSDLAB zip from the http www freescale com twr k53n512 4 You will need to enable the ESHDC and 2C1 drivers in the BSP library to use this demo By default the MQX 3 7 user_config h had already been configured to run the demos indicated in this document In the case that you have previously modified that file please follow Step 6 to Step 10 Otherwise jump to Step 11 5 Open the workspace at C Program Files Freescale Freescale MQX 3 7 config twrk53n512 iar build_libs eww 6 Open the user_config h file in the bsp_twrk53n512 Debug project it of ks P JCE bsp twik53n512 Debug Files an B a el build libs Le Glbsp_terk53n512 Debug v Ha G Generic 10 Drivers Peripheral IO Drivers Ha G twrk53n512 BSF Files otic Ha Ea twrk53n Th Quip Moso twrk53nbiz Debug v 7 Change define BSPCFG_ENABLE_I2C1 0 define BSPCFG_ENABLE_ESDHC 0 to define BSPCFG_ENABLE_12C1
17. ing up the 50Mhz clock from the TWR SER c Add jumper to J12 pins 9 10 to put into RMII mode d If you want to power from TWR SER USB add jumper to J16 3 4 3 Connect the TWR K53N512 and TWR SER boards via the elevator boards Make sure the primary side often marked with a white stripe goes into the elevator board with the white edges Detailed instructions are in the Quick Start Guide inside the TWR ELEV module box Connect an Ethernet cable between the TWR SER board and an Ethernet port on your computer Connect a mini B USB cable between the TWR SER board and a USB port on your computer This is only required for running the USB demo Note that the default jumper settings are in the Quick Start Guide for the TWR K53N512 and TWR SER if you want to change back to the default settings after you are done running the demo 4 5 knu 6 knne NOTE If you do not have extra jumpers you can use the ones on CAN_ SEL J5 on the TWR SER board 3 Run the Demos 1 Install P amp E OSBDM Virtual Serial Toolkit from DVD or http www pemicro com osbdm 2 Connect the TWR K53N512 tower module to your PC using a mini B USB cable TWR K53N512 Quick Start Demo Lab Guide Page 3 of 22 es freescale 3 Allow the PC to automatically configure the OSJTAG drivers used for debugging and the serial to USB feature If you have trouble connecting to the board or using the Serial Terminal see Section 8 for troubleshooting Segment LCD De
18. into the SD Socket on the underside of the board You can then access the files and create new files and directories on the SD Card via the shell interface Type help to see the full list of commands For example after you insert your SD card press Enter for shell prompt Then you can type dir to access what is in the SD card TWR K53N512 Quick Start Demo Lab Guide Page 4 of 22 ey freescale USB Mouse Demo The following steps require the TWR SER peripheral module 15 On TWR SER board make sure jumper J16 is installed for 2 3 16 On TWR K53N512 board make sure jumper J18 is installed default so that the USB transceiver is powered on 17 Connect the TWR SER card to your PC using a mini B to A type USB cable 18 The tower kit will then enumerate as a mouse on your computer You can tilt the board around to move the mouse cursor Press SW2 to left click Press SW1 to right click Web Server Demo The following steps require the TWR SER peripheral module 19 Ensure to follow jumpers settings boards assembly and cable connections accordingly to the steps in Section 2 under the section TWR K53N512 board with the TWR SER board 20 Open up a web browser The default IP address of the board is 169 254 3 3 Typically when you connect your computer directly to the board the computer will default to an auto IP address on the same subnet as the board 169 254 x x therefore requiring no setup Note The PC may
19. ls Task Summary Shack Usage Summary Lightweight Memory Blocks example _btwrk6On1 2 Int Ram Debug tne Files ae a Elmas twrk 0n512 E bsp twrk ln512 Debug v e T a im a Ma T HK 6 Demo Software Overview This demo is a combination of several tasks running in parallel while using MQxX drivers and stacks Looking at Tasks c first this contains the MQX_template_list data structure This has the attributes for all the tasks that will be created by this demo except for the webserver tasks It includes the stack size for each tasks their priority and any other attributes More details can be found in the MQX User Guide in the lt mqx_dir gt docs mqx directory TWR K53N512 Quick Start Demo Lab Guide Page 15 of 22 Cp es freescale The Init_Task is the only task with the MQX_AUTO_START_TASK attribute set so it is the only task that will be running at bootup This code for this task is in Init_Task c This task will start all the other tasks for the demo Inside the initialization task global variables are initialized and then the GPIO driver is initialized Then the Segment LCD task is started which initializes the TWRPI SLCD and determines what to display on the SLCD depending on which mode it is currently in Then the ADC _ Task is started which polls the ADC channel connected to the potentiometer and the ADC temperature sensor The values for these readings are stored in a global SENSOR_DATA
20. mo 4 When TWR K53N512 first powers up the TWRPI SLCD display will toggle all LCD segments on and off 5 Press SW2 to cycle between displaying the time seconds hour and minutes potentiometer position and temperature Accelerometer Demo 6 Make sure Jumper J21 is installed default to power the accelerometer 7 Tilt the board back and forth to see the LED s light up as it is tilted Touch Demo 8 Press SW1 twice to enter the Touch Demo Press the touch pad for the corresponding LED D6 or D7 to toggle on and off Remove the TWRPI SLCD module if it blocks you from the touch pads Terminal Demo 9 Open the P amp E Terminal Utility by clicking on Start Menu gt Programs gt P amp E OSBDM OSJTAG Virtual Serial Toolkit gt Utilities gt Terminal Utility 10 Make sure USB COM is selected with 115200 baud and click on the Open Serial Port button If you have trouble connecting see Section 8 for Troubleshooting Terminal Window application v2 01 saud 115200 Parity micro si Terminal indow 11 In the terminal program there will be a shell prompt after you hit the Enter key Type help to see the full list of commands 12 Type settime HH MM to adjust the time to HH MM 13 Type accel start to print out the accelerometer data to the terminal Type accel stop or press SW1 or SW2 to stop the printout SD Card Demo TWR K53N512 kit does not include a SD card 14 Insert an SD Card
21. ng and updating the firmware of this hardware This utility allows Updating of the firmware of these boards The Multilink Universal ig a much higher speed more fully featured interface designed to work ether with the tower cards or the user s own target hardware ary b H 1 i P S err wi A a Information Click this link for more information on this hardware 2 Select Device Embedded Kinetis OSBDM OSJTAG Device Firmware Version 30 7 Refresh list of devices 3 Select Architecture to Support Kinetis A Firmware File Selection f Automatic oztbdmens_arm 3007 f Choose Firmware Update File or 5 Record Select Unselected Update Firmware TWR K53N512 Quick Start Demo Lab Guide Page 21 of 22 Cp es freescale 4 Click on Update Firmware to update the firmware It will prompt you to disconnect the USB cord from your computer and then short the JM60 boot loader jumper header It is J28 from the TWR K53N512 board and is labelled JM60 BOOT on the silk screen Then re connect the board to your computer 5 The firmware will then be updated on your board When it is finished it will prompt you again to disconnect the USB cable remove the jumper and then re connect the board again OSJTAG is now updated 10 Resouces For most up to dated resources please visit http www freescale com TWR K53N512 and look for the following titles e Freescale MQX RTOS 3 7 Patch for TWR K53N512 includes sou
22. o install the MCU v10 1 Compiler Update MCU v10 1 Kernel Awareness Update and MCU 10 1 Update with the files downloaded from the CodeWarrior update repository URL 4 Install Freescale RTOS MQX 3 7 from DVD or from www freescale com MQX 5 Install Freescale RTOS MQX 3 7 Patch for TWR K53N512 from DVD or from www freescale com MQX Note The source code for the Quick Start Demos is bundled with MQX 3 7 Patch for TWR K53N512 Once installed you will be able to find the project at the default installation directory at C Program Files Freescale Freescale MQX 3 7 demo TWR K53N512_Quick_Start_Demo If there are future updates it will be a file call TWRK53N512QSDLAB zip from the http www freescale com twr k53n512 TWR K53N512 Quick Start Demo Lab Guide Page 6 of 22 Cp es freescale 6 You will need to enable the ESHDC and 12C1 drivers in the BSP library to use this demo By default the MQX 3 7 user_config h had already been configured to run the demos indicated in this document If you have previously modified that file please follow Step 7 to Step 18 Otherwise jump to Step 19 7 Open CW10 1 At the welcome screen set the workspace to the MQX installation directory which by default will be C Program Files Freescale Freescale MQX 3 7 8 If you already have CW10 open you can change the workspace by going to File gt Switch Workspace 9 The first time you open CW10 you will be taken to the Welcome screen Click on Go To W
23. orkbench in the lower left hand side 10 The workbench view will open up To ensure all the windows are properly set go to Window gt Reset Perspective t Window Help Mew Window Open Perspective Showy view Customize Perspective Save Perspective 45 Reset Perspective Clare Darcnar Fina 11 Click on File gt Import in the menu bar In the dialog box that comes up select Existing Projects into Workspace under the General folder Then click Next Select an import source type filter text gt General i Archive File Ei Existing Projects into Workspace File System C Preferences H E CICH 12 On the next screen select the Select root directory option and click on Browse 13 Navigate to the C Program Files Freescale Freescale MQX 3 7 mqx build cw10 bsp_twrk53n512 directory and hit OK TWR K53N512 Quick Start Demo Lab Guide Page 7 of 22 Cp eg n freescale 14 Make sure bsp_twrk53n512 is checked and hit Finish Import Projects Select a directory to search For existing Eclipse projects Select root directory C Program Files Freescale Freescale MOX 3 7 mqx buildjcw1Oibsp_twrk53n512 Projects bsp_twrk5S3n512 C Program FilesiFreescaleFreescale MOs 3 71mgsibouildicw 0 bsp_twrk53n51 2 Select All Deselect All C Copy projects into workspace er 15 Open the user_config h file in the bsp_twrk53n512 project to enable the ESDHC and 2CO drivers
24. r you are done 16 Select the Int Flash Debug target Workspace Clint Flash Debug s eno Bg K53N512_Quick_Start_Demo MFS Libraries Lom i ka ihrarinr hald TWR K53N512 Quick Start Demo Lab Guide Page 14 of 22 es freescale no 17 Compile the project by clicking the Make icon bal or right clicking on the project and select Make 18 After compilation completes download the code to the board and start the debugger by pressing the Download and Debug button 19 The code will download Flash and the debugger screen will come up and pause at the first instruction Hit the Go button to start running i ETH SWD 5 Task Aware Debugging MQX comes with Task Aware Debugging TAD when using both CodeWarrior and IAR IDE s This feature is only available in the Evaluation or Full editions of these compilers To use TAD start up an MQX project within the debugger While the project is running hit the Break button w in IAR or UH in CodeWarrior to pause the debugger Then click on MQX gt Task Summary to see all the tasks MQX is running and their current state More information on the TAD is available in the Release Notes 2 IAR Embedded Workbench IDE File Edit wiew Project Debug Disassembly J Link Mos RTOS Tools Window Help Task List Kernel Data Check For Errors Task Summary Ready Queues Stack Usage Task Name _maqsx_idle_task Lightweight Memory Poo
25. rce code of the quick start demos and MQxX K50 family devices support for IAR 6 10 5 and CW 10 1 Any future updates to Quick Start Demo Software and Lab Guide will be posted online as a zip package called TWRK53N512QSDLAB e TWR K53N512 UM TWR K53N512 board User s Manual e KQRUG Most up to date Kinetis Peripheral Module Quick Reference e KINETIS512 SC Most software mentioned in the in the KQRUG document Software has been updated to support TWR K53N512 e TWRK53QSG TWR K53N512 KIT Quick Start Guide Also included in this DVD e Under the Documentation tab of the site a series of software and documents are also available for applications such as Spirometer Pulse Oximeter Activity Monitor Blood Pressure Monitor and Electrocardiograph amp Heart Rate Monitor Freescale the Freescale logo CodeWarrior ColdFire C Ware the Energy Efficient Solutions logo are trademarks of Freescale Semiconductor Inc Reg U S Pat amp Tm Off ColdFire CoreNet Flexis Kinetis MXC Platform in a Package Processor Expert and Xtrinsic are trademarks of Freescale Semiconductor Inc All other product or service names are the property of their respective owners 2011 Freescale Semiconductor Inc TWR K53N512 Quick Start Demo Lab Guide Page 22 of 22
26. se this option to select the device driver from a list Windows does not guarantee that the driver you choose will be the best match for your hardware ETETE ETE TWR K53N512 Quick Start Demo Lab Guide Page 19 of 22 lt freescale Found New Hardware Wizard Select the device driver you want to install for this hardware Select the manufacturer and model of your hardware device and then click Next IF you 5 have a disk that contains the driwer you want to imstall click Have Disk Upen Source BOM Debug Port it This driver is not digitally signed Tell me why diver signing is important Install From Disk Insert the manufacturer s ingtallation disk and then make sure that the corect drive iz selected below Copy manufacturer s files from ST Brrree e For the Open Source BDM Debug Port use the driver at C pemicro kinetis_tower_toolkit Drivers osbdm OSJTAG_Debug_Interface_libusb inf e For the PEMicro USB Serial Port i1 use the driver at C pemicro kinetis_tower_toolkit Drivers osbdm OSJTAG_Serial_Interface_windriver_version inf TWR K53N512 Quick Start Demo Lab Guide Page 20 of 22 ltp lt freescale 9 Update OSJTAG Open Source JTAG also known as OSBDM on ColdFire tower boards allows a user to program debug and get serial data from Kinetis devices via a USB cable The firmware runs on a Freescale MCFSO8JM60 on the underside of the Kinetis tower board To ensure compatibility be
27. structure so that their information can be easily re used by other tasks Next the Accel_ Task is started which polls the MMA7660 sensor on the TWR K53N512 over 12C Next the Demo_ Task is started This determines based on the accelerometer readings and button presses which mode the demo is in and how the LED s should be controlled This is the main task for the Quick Start Demo The SLCD_ Task and Shell Task are started after that Then lastly the USB_TASK is started which starts the USB stack and waits for a USB connection to enumerate as a HID class mouse The web server is then initialized which creates two tasks for the RTCS stack and the http server The web pages are stored in the web web_ pages folder The mktfs exe executable converts them into ASCII arrays stored in the tfs_data c file which is what is programmed into flash The cgi_index c file contains the CGI functions for getting data to and from the web server Finally the TSI module is initialized and started It performs some calibration and then uses the TSI ISR to detect touches Depending on the demo mode it will set different variables upon detecting a touch The initialization task then calls _task_block to be permanently blocked and the demo is now up and ready See the comments in the source code for more information on how the demo works Also explore the documentation app notes and examples in the lt mqx_dir gt doc folder and explore online at http
28. tune cece eesvecanue icaeaeicessersee eects 15 6 Demo Software OV Ct VIO W easacsitcestancccnsaceterucuinsusvarsavaspavnicvauinvausisecendcndaiagenssansirsantnesdevassuunionseinesvananuities 15 7 Creating anew MOX DEO CCE asseciccsesecscewetoctcavccacsueuceesucuns aaa EEEE Sa aE A 17 o OSTAO aE E E 18 T Upa OSFA G e E se neeseucueen ates teueancevauentences 21 MORO S OC OS siose E EE E 22 TWR K53N512 Quick Start Demo Lab Guide Page 2 of 22 es freescale 1 Purpose This lab document will familiarize you with the TWR K53N512 kit and two development tools using Freescale RTOS MQX You will learn the full features of the TWR K53N512 demos that are pre programmed onto your Tower module You will also learn how to access the source code using development tool IAR 6 10 5 or the CodeWarrior 10 1 development tool 2 Configure Hardware If using the TWR K53N512 board in stand alone mode 1 Plug in the battery into the battery socket on the underside of the board 2 Change J16 to pins 2 3 to connect the VBAT domain to run off the battery Optional 3 Change J11 to pins 1 2 to use the 50Mhz clock from the TWR K53N512 board Default If using the TWR K53N512 board with the TWR SER board required for web server and USB demos 1 On the TWR K53N512 board a Change J11 to pins 2 3 to use the 50Mhz clock from the TWR SER board 2 On the TWR SER board a Change J2 to pins 3 4 to give a 50Mhz clock to the PHY b Add jumper to J3 pins 2 3 to br
29. tween the drivers firmware and terminal window the latest versions of each need to be installed NOTE Out of the box TWR K53N512 is programmed with OSBDM firmware version 29 07 This version will support IAR ARM version 6 10 5 OSBDM firmware version 30 x and up will not support IAR 6 10 5 It will only support IAR 6 20 and up 1 Download and install both of the latest P amp E Firmware Updates and Recovery and OSBDM Virtual Serial Toolkit programs which can be found at http www pemicro com osbdm 2 Make sure your tower board is plugged in and run the P amp E Firmware Updater Utility to use the OSJTAG boot loader to upgrade to the latest OSJTAG version 3 Under Select Hardware Type make sure OSBDM OSSTAG is selected It should automatically detect your board settings and fill out the rest of the fields automatically Multitink Osbdm Firmware Update and Architecture Selection Utility Version 1 04 x New versions of P amp E s software products automatically update the firmware of the different hardware Interfaces as necessary This application allows updating configuration of the hardware for use with older applications which do not have this capability Clopyright 2017 P amp E Microcomputer Systems ne 1 Select Hardware Type Freescale embeds an open source debug processor in many of it s Tower cards and Demonstration boards P amp E has taken a leading role along with the open source community in maintaini
Download Pdf Manuals
Related Search
Related Contents
Slim Devices SLIM DEVICES Stereo System User Manual マニュアル(上屋) [PDFファイル/3.42MB] KD-AVX44/KD-AVX22 AXIS 212 PTZ/212PTZ-Vユーザーズマニュアル AusCERT Remote Monitoring Service User Guide Doro PhoneEasy 410gsm 2" 110g White HQ TVS-AVS03B Trust Cyanide FX - Satelco Copyright © All rights reserved.
Failed to retrieve file