TWR-K20D72M

This Freescale tower board is based on the K20DX256VLL7 which is a 50MHz device from the performance and integration K20 family with Cortex-M4 core and USB. This K20 device has 256k Flash and 64k SRAM and is in a 100 pin LQFP, whereby the 72MHz K20 is also available in 100 pin MAPBGA and Flash sizes of 128k...256k and SRAM sizes of 32k...64k. There is an 8MHz crystal on the board for clocking the part.

Full details and documentation for this board can be obtained from the Freescale web site: TWR-K20D72M

To configure the µTasker project for this board simply enable the define TWR_K20D72M in the project's config.h file. The compiler needs to be set to build for Cortex M4 (and not Cortex M0+) and the linker script K_256_64.ld should be selected [K_256_64_BM.ld for downloadable version] {the linker script extension may vary for different compilers, whereby *.ld is valid for GCC}

TWR-K20D72M Binaries

Here are some binary files that can be loaded to the board. These were built using the µTasker applications (serial loader and V1.4 application) and can be simply generated using the supported compilers/IDEs [these were built using GCC], built using different configuration options or modified to suit specific requirements or hardware derived from this board :

  • uTaskerSerialBoot_TWR-K20D72M_KBOOT_HID_UART_MSD.bin KBOOT compatible USB-HID loader with composite USB-MSD loading, as well as KBOOT UART loading on UART 1 at 57'600 Baud [16.5k] allowing applications to be loaded at link address 0x8080 (using Freescale's KBOOT USB connection, or KBOOT UART at 57'600 Baud or USB-MSD when the board appears as upload hard disk). When operating, the green LED blinks at 5Hz. To force the loader reset the board with push button SW1 held down. To disable the watchdog reset the board with push button SW2 held down. This can be loaded using CodeWarrior's Flash utility via the TWR-K20D72M's OSJTAG debug interface. Note that the loader limits application sizes to 70k - it can be built without limits using the µTasker project.
  • uTaskerV1.4.8_BM_TWR-K20D72M_8080.bin TWR-K20D72M application with command-line menu on the virtual COM connection (115'200 Baud) with various menu items (as well as on UART1), including the ability to switch to USB-UART-1 bridge mode with end-to-end flow control. Output from the on-board accelerometer can be viewed in the I2C menu. Low power modes can be set in the application menu (when LLS has been entered, pressing the push button SW1 (LLWU_P6 input) will wake and return to the fully functional mode - more details of this operation can be found in Low-Leakage Wakeup (LLWU) Support)..
    The USB device is a composite USB-CDC with five interfaces, whereby the first is connected to the command line shell (in the USB menu it is possible to command a bridging mode to UART1).
    The second performs full-time USB-UART bridging to UART0 (Tx = PTA14, Rx = PTA15).
    The third performs full-time USB-UART bridging to UART2 (Tx = PTD3, Rx = PTD2).
    The fourth performs full-time USB-UART bridging to UART3 (Tx = PTB11, Rx = PTB10).
    The fifth performs full-time USB-UART bridging to UART4 (Tx = PTE24, Rx = PTE25).
    Drivers that can be used for this device are available below. The processor runs at 72MHz. [41.1k].
    Linked to 0x8080, this binary image can be loaded with drag-and-drop onto the upload disk that appears when the serial loader is operating or using the KBOOT loader's USB or UART connections. When the application is running the green LED blinks at 2.5Hz.
  • uTaskerV1.4.8_TWR-K20D72M.bin The same TWR-K20D72M application as stand-alone software that can be loaded using the TWR-K20D72M's OSJTAG [40.1k].

  • uTaskerFreescaleMultiVirtualCOM.inf USB CDC installation file for 32-bit windows (usable for 1..6 USB-CDC composite interfaces).
  • uTaskerFreescaleMultiVirtualCOM_64bit.inf USB CDC installation file for 64-bit windows (usable for 1..6 USB-CDC composite interfaces). See the following for a guide to installing unsigned drivers on Windows 8.1

TWR-K20D72M USB-MSD Device using internal Flash

This application shows the TWR-K20D72M as a USB-MSD device with a FAT in 166k of its internal Flash. The flash drive can be formatted by a PC host when connected via USB and is seen as a 166k disk. Usually it will format it as FAT12 which gives a usable space of 146k due to the FAT12 overhead.

The command line menu shell on the debug UART (OSJTAG virtual COM) allows the file system to also be used in the "Disk Interface" menu (this is a DOS like interface but with various extra tools for analysing visible, deleted and hidden files). The interface additionally allows formatting for FAT16 or FAT32, as well as FAT12, if desired.

The application was configured with USB_INTERFACE to enable USB and USE_USB_MSD to enable the USB-MSD operation. The define FLASH_FAT is used instead of SDCARD_SUPPORT to specify that internal flash is used (the SD-card could be used in parallel with the SDCARD_SUPPORT define) and the following defines to control the location and size of the Flash area dedicated to the FAT:
#define INTERNAL_FLASH_FAT_SIZE (166 * 1024) // size of the flash area used as disk
#define FAT_FLASH_MANAGEMENT_ADDRESS (90 * 1024) // physical address where the used flash starts


Return to the Kinetis landing page


µTasker Kinetis TWR-K20D72M support. Copyright (c) 2004..2015 M.J.Butcher Consulting