Twr K40x256 Hardware Setup

Document created by GUO XIAOLI Employee on Jul 12, 2012Last modified by GUO XIAOLI Employee on Jul 12, 2012
Version 2Show Document
  • View in full screen mode


There are several main hardware configuration steps. After installing the battery, once the USB cable has been connected between the evaluation board and PC, it may be necessary to update the chip firmware which requires moving a jumper pin on the evaluation board.



Install the included battery into the VBAT (RTC) battery holder. Then, connect one end of the USB cable to the PC and the other end to the Power/OSJTAG mini-B connector on the TWRK40x256 module. Allow the PC to automatically configure the USB drivers if needed.




Before updating the firmware, it is necessary to start a CodeWarrior Project.


  1. Open Codewarrior
  2. Navigate to File-> New ->Bareboard Project
  3. Select Kinetis K40->MK40X256VMD100 , P&E Open Source Jtag, C Language, No Rapid Application Development ,Finish
  4. Click on the main.c To get project focus
  5. Selection Project->Build Configurations->MK40X256VMD100_INTERNAL_FLASH
  6. Project-»Build All
  7. Run->Debug Configurations—> Use the Codewarrior download Filter and Select "PROJECTNAME_MK40XD256VMD100_INTERNAL_FLASH_PnE_OSJTAG"
  8. Additional step is required if the firmware is out of date:

Firmware Upgrade Instructions (if needed)

Firmware may change after an evaluation board has been manufactured and shipped. As a result, an alert will be displayed during the first attempt to download software to the board. Follow the instructions carefully.



  1. Unplug the USB cable.
  2. Look for the two pins labeled JM60 Boot and put a jumper on those pins Note: As it comes from the factory, the K40 board has a free jumper on the board. . Jumper J13 is labeled "JM60 BOOT." It connects two header pins which set the evaluation board in the firmware programming mode. This jumper is behind the LCD screen, and right next to LED/Touch Sensor "E3". Remove the LCD creen to gain access to the jumper.
  3. Reconnect the USB cable and click OK.
  4. Wait for the new firmware to download. A new dialog will appear when the process is complete.




  1. Unplug the cable, remove the jumper, and reconnect the cable.
  2. Then click OK. (You can store the jumper on the board, just set it so that it does not connect pins.) You may or may not encounter the firmware issue, or the multiple configurations issue. Once resolved, you should not see them again.

With propertly set up hardware, users can return to Step 3: Import the LED Project of the Blink a LED on Kinetis Tutorial