TWR-K40D100M

This Freescale tower board is based on the K40DX256VMD10 which is a 100MHz device from the performance and integration K40 family with Cortex-M4 core, USB and SLCD (segment LCD). This K40 device has 256k Flash and 64k SRAM and is in a 144 pin MAPBGA, whereby it is also available in 80, 100 and 121 pin packages. 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-K40D100M

To configure the µTasker project for this board simply enable the define TWR_K40D100M 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-K40D100M 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. The TWR-K40D100M should be built into a tower kit with TWR-SER for USB operation :

  • uTaskerSerialBoot_TWR-K40D100M_KBOOT_HID_UART_MSD_SDHC.bin KBOOT compatible USB-HID loader with composite USB-MSD loading, as well as KBOOT UART loading on UART 0 (available on OSJTAG virtual COM) at 57'600 Baud, or from an inserted SD card 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 or as a file on the SD card). [24.5k]
    When operating, the orange LED blinks at 5Hz. To force the loader, reset the board with push button SW2 held down. To disable the watchdog, reset the board with push button SW1 held down.
    This can be loaded using CodeWarrior's Flash utility via the TWR-K40D100M's OSJTAG debug interface. Note that the loader limits application sizes to 130k - it can be built without limits using the µTasker project. When forcing the boot loader, hold the switch for about 4s; this ensures that the application is not started once the SD card check has completed.
  • uTaskerV1.4.8_BM_TWR-K40D100M_8080.bin TWR-K40D100M application with command-line menu on the UART 0 (OSJTAG virtual COM) with various menu items. Output from the on-board accelerometer can be viewed in the I2C menu. The USB device is USB-MSD and so the board appears as a hard drive to the PC when the SD card is inserted into the socket on the board. Files can then be read and written to the SD card from the PC and also worked with via the DOS-like command line interface in the disk-interface sub-menu.
    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 orange LED blinks at 2.5Hz.
    Low power modes can be set in the application menu and the processor runs at 96MHz, to allow USB operation [56.2k].
  • software.bin The same TWR-K40D100M application that can be copied to the SD card and will be loaded to the processor when the board starts [56.2k] (the name is required for it to be recognised - see the Serial Loader User's Guide for more details).
  • uTaskerV1.4.8_TWR-K40D100M.bin The same TWR-K40D100M application as stand-alone software that can be loaded using CodeWarrior's Flash utility via the TWR-K40D100M's OSJTAG debug interface [57.2k].

The following terminal output illustrates the capabilities and operation of the utFAT user interface in the application project, whereby the utFAT itself is documented in uTasker - utFAT2.0

Hello, world... KINETIS
SD-card V2 - High Capacity

Disk D mounted

Serial number: 00
Software version V1.4.012
Device identification: KINETIS K40

     Main menu
===================
1              Configure LAN interface
2              Configure serial interface
3              Go to I/O menu
4              Go to administration menu
5              Go to overview/statistics menu
6              Go to USB menu
7              Go to I2C menu
8              Go to utFAT disk interface
9              FTP/TELNET client commands
a              CAN commands
help           Display menu specific help
quit           Leave command mode
8


  Disk interface
===================
up           go to main menu
info         utFAT/card info
dir          [path] show directory content
dird         [path] show deleted directory content
dirh         [path] show hidden content
infof        [path] show file info
infod        [path] show deleted info
cd           [path] change dir. (.. for up)
file         [path] new empty file
write        [path] test write to file
mkdir        new empty dir
rename       [from] [to] rename
trunc        truncate to [length] [path]
hide         [path] file/dir to hide
unhide       [path] file/dir to un-hide
prot         [path] file/dir to write-protect
unprot       [path] file/dir to un-protet
print        [path] print file content
del          [path] delete file or dir.
undel        undelete [name]
format       [-16/12] [label] format (unformatted) disk
fformat      [-16/12] [label] full format (unformatted) disk
re-format    [-16/12] [label] reformat disk!!!!!
re-fformat   [-16/12] [label] full reformat disk!!!!!
sect         [hex no.] display sector
help         Display menu specific help
quit         Leave command mode
dir
Directory D:\

---- 26.10.2015  12:00 [DIR]            dir1
---A 26.10.2015  12:00              256 M21.txt
---A 26.10.2015  12:00            13336 software.bin
2 files with 13592 bytes
1 directories, 4115922944 bytes free
D:\>dir dir1
Directory D:\dir1

---- 26.10.2015  12:00 [DIR]            dir_x
---A 26.10.2015  12:00             1024 long_file_name_1234.bin
---- 26.10.2015  12:00 [DIR]            dir_next
1 files with 1024 bytes
2 directories, 4115922944 bytes free

D:\>infof M21.txt
File: M21.txt is LFN
Starting at entry 0x03 in sector 0x00003dc5 (cluster 0x00000002)
First object from 1
Data = 0x41 0x4d 0x00 0x32 0x00 0x31 0x00 0x2e 0x00 0x74 0x00 0x0f 0x00 0x7b 0x78 0x00 0x74 0x00 0x00 0x00 0xff 0xff 0xff 0xff 0xff 0xff 0x00 0x00 0xff 0xff 0xff 0xff
SFN File located at entry 0x04 in sector 0x00003dc5 (cluster 0x00000002)
Data = 0x20 0x00 0x0e 0x12 0x12 0x09 0x10 0x1f 0x2f 0x00 0x00 0x20 0x00 0x00 0x00 0x60 0x5a 0x47 0x5a 0x47 0x00 0x00 0x00 0x60 0x5a 0x47 0x04 0x00 0x00 0x01 0x00 0x00
SFN name (archive) =  ......./.. Alias CS = 0x7b
File length = 256 starting in sector 0x00003dd5 (cluster 0x00000004) FAT sector 0x0000005f offset 0x04

D:\>sect 3dc5
Reading sector 0x00003dc5
 0x4e555242 0x0000004f 0x08000000 0x60000000 0x475a475a 0x60000000 0x0000475a 0x00000000 0x69006441 0x31007200 0x0f000000 0xffffe400 0xffffffff 0xffffffff 0x0000ffff 0xffffffff
 0x0a010020 0x0c161d0c 0x1000002f 0x60000000 0x475a475a 0x60000000 0x0003475a 0x00000000 0x32004d41 0x2e003100 0x0f007400 0x00787b00 0x00000074 0xffffffff 0x0000ffff 0xffffffff
 0x120e0020 0x1f100912 0x2000002f 0x60000000 0x475a475a 0x60000000 0x0004475a 0x00000100 0x6f007341 0x74006600 0x0f007700 0x0061ed00 0x00650072 0x0062002e 0x00000069 0x0000006e
 0x00090020 0x181e0803 0x2000002f 0x60000000 0x475a475a 0x60000000 0x0006475a 0x00003418 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
 D:\
                

Return to the Kinetis landing page


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