Author Topic: KINETIS - developer's version available  (Read 18870 times)

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3236
    • View Profile
    • uTasker
KINETIS - developer's version available
« on: January 30, 2011, 02:55:55 AM »
Hi All

Note that this thread contains code from the development phase - the release versions can be found at http://www.utasker.com/forum/index.php?topic=1721.0

You may already have noticed that there is some information concerning the Freescale Kinetis devices on the web site. The following gives some additional details about the development:

1) The overview of the Kinetis with main documents and demos can be found here: http://www.utasker.com/kinetis.html. Not all documenst are ready but they are being finalised and so a demo package (à la Kirin3) should be there soon. The document http://www.utasker.com/docs/KINETIS/uTaskerV1.4_Kinetis_demo.pdf contains developer's notes in its appendix which may interest people getting started with the device.
2) The Kinetis shares the M522XX forum due to the fact that some of its peripherals have been taken from there (some are compatible but also extended). Furthermore it is expected that the Kinetis represents a suitable migration path for Freescale Coldfire users.
3) At the moment the project is in a Beta phase and its package is now being made available to developers to test it out and help adding new stuff if they wish. Links to the package are below - just send an application on the normal form to get the Kinetis project password: http://www.utasker.com/Licensing/request.html
4) The Kinetis K60 is the main focus (with Ethernet, USB and encryption) on the Freescale Tower Kit - with serial and LCD extension modules.
5) This is the first uTasker project oncluding an Eclipse based project environment as part of the package. This is because the new CodeWarrior V10.1Beta and above is Eclipse based. I am not sure whether this is going to represent a improvement but I prefer not to make any comments until the new environment has been released in its final state.
Since the Kinetis has a Cortex M4 core there is wider IDE support than the Coldfire. In order to make the project as attractive as possible the most popular ones are already included as projects - these are CodeWarrior, Rowley Crossworks, IAR6, Keil uVision4 and the usual GCC stand-alone builds. Note that the Kinetis is still quite new and so the support in the IDEs may also still be very new or also Beta too.
6) There is a flyer available as attachment.
7) The links to the present Beta packages are below - they will be extended as the package develops and several older versions are left available in case of any new problems that might evolve between packages. Essentially everyone is welcome to have a go with them but preferably more experienced developers at the moment who can help sort out any teething problems on the way....




Beta 0.0 - 14.01.2011 http://www.uTasker.com/software/V1.4/uTaskerKinetis.zip
=============================================================
Contains uTaskerV1.4 project with builds for:
- VisualStudio 6
- VisualStudio 2010
- IAR6
- Rowley Crossworks 2.1
- GCC standalone

Target for TWR-K60N512 with TWR-SER and TWR-LCD
- TFT demo (When no TWR-LCD available remove SUPPORT_GLCD in config.h)
- Ethernet Demo (when no TWR-SER available remove ETH_INTERFACE in config.h)
-- Default IP address 192.168.0.3
-- Default NETBios name "KINETIS"
-- Telnet, Web server, FTP server with uFileSystem from internal FLASH
- E1 blink at 2.5Hz


Beta 0.1 - 27.01.2011 http://www.uTasker.com/software/V1.4/uTaskerKinetisV1.4-1.zip
==================================================================
Environment suitable for Codewarrior V10.1, including CodeWarrior project and Keil uVision4 project.
- New set of web pages for the Kinetis and operating port control
- IPv6 basic included
- USB included but not tested

Beta 0.2 - 29.01.2011 http://www.uTasker.com/software/V1.4/uTaskerKinetisV1.4-2.zip
=================================================================
- UART driver added - configured for UART3 to suit the TWR-SER board connection
- LEDs can be controlled via web server or serial menu

Beta 0.3 - 30.01.2011 http://www.uTasker.com/software/V1.4/uTaskerKinetisV1.4-3.zip
=================================================================
- PITs 1..4 supported (see single -shot test in ADC_Timers.h)

Beta 0.4 - 04.02.2011 http://www.uTasker.com/software/V1.4/uTaskerKinetisV1.4-4.zip
=================================================================
- WATCHDOG added (hold SW1 on tower board to start with disabled watchdog)
- Reset command and display of reset cause on web page
- UART 7 bit mode supported with automatic masking of parity bit

Beta 0.5 - 10.03.2011 http://www.uTasker.com/software/V1.4/uTaskerKinetisV1.4-5.zip
=================================================================
- GLCDLIB extended with Bitmap windowing support
- Task Performance monitor added (MONITOR_PERFORMANCE) - request via command line menu interface (see following patch when this is used together with PIT timer test: http://www.utasker.com/forum/index.php?topic=1321.msg5329#msg5329)
- RTC, ADC and DAC registers added
- USB Mass storage improvements


Beta 0.6 - 02.04.2011 http://www.uTasker.com/software/V1.4/uTaskerKinetisV1.4-6.zip
=================================================================
- I2C driver added (not tesed)
- SD card support via SPI added (not tested)
- UART HW Flow control and RS485 HW support (MODBUS compatibility) added (not tested)
- Optional DMA support for uMemcpy() and uMemset()
- Includes boot loader and serial loader projects: serial loader tested with simulator and builds with
IAR and GCC
Note for CW10.1 users. There are now sub-projects for the boot loaders. When importing into the CW10.1 workspace these will also be included and CW10.1 will want to build them as part of the uTaskerV1.4 project. Therefore, select the two directories under the Applications folder and with right click, configure them to be excluded from the builds. Then the project will build without errors.

Beta 0.7 - 06.04.2011 http://www.uTasker.com/software/V1.4/uTaskerKinetisV1.4-7.zip
==================================================================
- Additional boot loader and serial loader projects: present set = VS6, VS2010, IAR, GCC, Keil uVision
- uTaskerFileCreate V1.7 updated (see http://www.utasker.com/forum/index.php?topic=1114.msg5330#msg5330)


Beta 0.8 - 10.04.2011 http://www.uTasker.com/software/V1.4/uTaskerKinetisV1.4-8.zip
==================================================================
- Complete set of projects for following compilers included:
IAR, Keil, CodeWarrior 10.1, GCC, Rowley Crossworks
 a) uTaskerV1.4 demo project for standalone and boot-loader operation (targets)
 b) uTaskerSerialLoader
 c) utaskerBoot

- SD card support via SPI tested on TWR kit using local SD card slot and remote uSD card slot
(requires board modification as described in http://www.utasker.com/docs/KINETIS/uTaskerV1.4_Kinetis_demo.pdf)



Beta 0.9 - 25.04.2011 http://www.uTasker.com/software/V1.4/uTaskerKinetisV1.4-9.zip
=================================================================
- SPI Flash drivers added for ATMEL, ST and SST SPI devices
- Bootloader includes SPI Flash support
- RS485 automatic RTS support now tested [the MODBUS extension package has also been updated to work together with the Kinetis project - see http://www.utasker.com/forum/index.php?topic=1424.0]

Beta 0.10 - 12.05.2011  http://www.uTasker.com/software/V1.4/uTaskerKinetisV1.4-10.zip
===================================================================
- 100 pin K60 added to simulator
- USB Device operational
- USB MSD boot loader added to serial boot loader project
- ATMEL SPI operation validated
- I2C operation validated

Note that this version contains the new USB MSD boot loader as shown here: http://www.youtube.com/watch?v=H4TYM9jY2-g
Note also that the directory /stack/SNMP may need to be excluded from all CW10.1 projects in case there are compile errors generated by its files - which are not a part of the project

When using UART4 or UART5 please correct the peripheral block addresses in kinetis.h as follows:
  #define UART4_BLOCK                    0x400ea000
  #define UART5_BLOCK                    0x400eb000



Beta 0.11 - 17.07.2011  http://www.uTasker.com/software/V1.4/uTaskerKinetisV1.4-11.zip
===================================================================
- uTaskerConvert.exe V1.6 - "uTaskerConvert.exe uTasker_BM.bin raw.bin -b" can be used to convert an input file in Motorola binary format to raw binary format.
- uTaskerFileCreate.exe Version V1.8 - corrected conversion of 24-bit bitmaps with pixel width not divisible by 8
- New USB VID/PID for Freescale MSD project
- SDHC Controller added
- USB MSD Boot Loader - password software protection added (see http://www.utasker.com/forum/index.php?topic=1434.msg5576#msg5576)
- K40 tower board support added (crystal configuration instead of external clock source - 8MHz)
- K40 Kwikstik support added (crystal configuration instead of external clock source - 4MHz)
- K40 TWRPI-SLCD and Kwikstik SLCD initialisations added and Freescale Logo blink
- K40 / K60 compiler configurations
- Zero-configuration (Auto-IP) preliminary support according to http://www.utasker.com/docs/uTasker/uTasker_zero_config.pdf


Beta 0.12 - 01.08.2011 http://www.uTasker.com/software/V1.4/uTaskerKinetisV1.4-12.zip
===================================================================
- SLCD interface and SLCD simulator added according to http://www.utasker.com/docs/uTasker/uTasker_SLCD.pdf
and shown in the video http://www.youtube.com/watch?v=nm2DmZv1rj8
- some K40 CW10.1 target settings corrections
- added option RAM test to application.c [#define RAM_TEST] accoring to http://www.utasker.com/docs/uTasker/uTasker_RAM_test.pdf
- UART simulator extended to handle 6 internal UARTs and 4 external ones
- SDHC controller simulation completed (utFAT/SD card operation possible in simulator when SDHC or SPI interface used)
- RTC support added - driver includes in-built time/Gregorian calender support according to: http://www.utasker.com/forum/index.php?topic=1656.0

CW10.1 users should check out the following post and possibly make the change suggested to speed up the initial configuration of the watchdog: http://www.utasker.com/forum/index.php?topic=1664.0
CW10.1 again : when using SD card with the SDHC set register SDHC_SYSCTL as volatile to avoid a forever loop polling this register.



Beta 0.13 - 19.10.2011 http://www.uTasker.com/software/V1.4/uTaskerKinetisV1.4-13.zip
===================================================================
- validated version of zero-configuration, including state display in simulator.
- Option (SPECIAL_LCD_DEMO) to stop GLCD demo when an image is posted to the TFT via HTTP
- Character LCD simulator allows read of character content.
- INDIVIDUAL_BUFFERED_TCP_BUFFER_SIZE allows buffered TCP sockets to define different buffer sizes for each socket. Use extern unsigned short fnDefineTCPBufferSize(USOCKET TCP_socket, unsigned short usBufferSize); to allocate the size to be used by the socket before first use. TCP_BUFFER is used (for compatibility) if no size of set.
- Simulation assertions use _EXCEPTION("text indication cause of assertion")
- Counter of number of times the start web side has been served added to the demonstration
- Display connection IPv4 address on start page of web server
- Enabling SUPPORT_FILE_TIME_STAMP (requires SUPPORT_RTC) adds date/time stamps to utFAT file/directory writes.
- _VARIABLE_HTTP_PORT allows the HTTP server to be started with a user-defined port number rather than fixed port 80.
- DNS_SERVER_OWN_ADDRESS adds command to set individual DNS server address, otherwise it follows the default gateway value.
- CW10.1 boot loader linker scripts corrected. Boot loader output is converted to binary using post build step - the path in convert_binary_k40.bat and convert_binary_k60.bat will need to be set to local computer path.
- Keil uVision projects changed to use Keil variable initialisation - also BM targets modified and verified.
- corrections in utFAT when writing clusters over sector boundaries and deleting clusters on big-endian processors.
- RTC interface extended for compatibility with Coldfire RTC (minutes, hours, day, stopwatch and alarm interrupts): refence see #define RTC_TEST in application.c
- RNGB optionally used for random number generation
- corrections in utFAT when writing clusters over sector boundaries and deleting clusters on big-endian processors.
- utFAT FAT16 mode corrections.
- uFileSystem revision 1 including seamless file operation in multiple storage media and multiple devices in each media - generic rework to allow simpler extension with new types as well as device count being set at run-time.
- EXTENDED_UFILESYSTEM extended with UFILESYSTEM_APPEND - see http://www.utasker.com/docs/uTasker/uTaskerFileSystem_3.PDF (version 0.05) [fully implemented for Kinetis Flash type requiring line writing in internal flash]
- uFileSystem revision 1 - see http://www.utasker.com/docs/uTasker/uTaskerFileSystem_Revision1.pdf
[new uFileSystem revision 1 fully integrated]
- General support (including complete port simulation of all types and packages) for K10, K20, K30, K40, K50, K51, K52, K53 and K60 [80/81 pin, 100 pin, 121 pin and 144 pins, where appropriate].
- Ethernet PHY control implimented to allow 10/100M, half and full duplex in RMII mode
- Errata E2644 and E2647 respected to disable speculation and caching when necessary to ensure stable flash operation
- Add reset cause display to web server admin page
- Add time display on web server admin page when RTC enabled
- Ethernet check sum offloading options added
- Legacy and enhanced Ethernet modes supported

When working with file system exclusively in internal flash the erase routine needs to be put into a loop as follows (the loop was missing):

    Length += (((CAST_POINTER_ARITHMETIC)ptrSector) - ((CAST_POINTER_ARITHMETIC)ptrSector & ~(FLASH_GRANULARITY - 1)));
    ptrSector = (unsigned char *)((CAST_POINTER_ARITHMETIC)ptrSector & ~(FLASH_GRANULARITY - 1)); // set to sector boundary
    do {
        if ((fnFlashNow(FCMD_ERASE_FLASH_SECTOR, (unsigned long *)(unsigned long)fnGetFlashAdd(ptrSector), (unsigned long)0)) != 0) {
            return 1;                                                    // error
        }
        if (Length <= FLASH_GRANULARITY) {                               // check whether entire deletion has completed
            break;
        }
        ptrSector += FLASH_GRANULARITY;                                  // advance sector point to next internal flash sector
        Length -= FLASH_GRANULARITY;
    } while (1);


When using UART1 on port C the following pin correction for the transmit line is needed in fnTxOn().
Incorrect = _CONFIG_PERIPHERAL(C, 3, PC_3_UART1_TX);                         // UART1_TX on PC3 (alt. function 3)
Correct = _CONFIG_PERIPHERAL(C, 4, PC_4_UART1_TX);                         // UART1_TX on PC4 (alt. function 3)
whereby also the define PC_3_UART1_TX should be renamed to PC_4_UART1_TX in kinetis.h
    Correction thanks to Christophe G.

When building the bare-minimum boot loader for operation in external SPI Flash the following define needs to be added around UserStorageListPtr in the SPI Flash driver file:
        #if !defined BOOT_LOADER                                         // the boot loader doesn't use storage lists
        UserStorageListPtr = (STORAGE_AREA_ENTRY *)&spi_flash_storage;   // insert spi flash as storage medium
        #endif



Beta 0.14 - 31.12.2011 http://www.uTasker.com/software/V1.4/uTaskerKinetisV1.4-14.zip
===================================================================
- SINGLE_FILE_SIZE is no longer used. FILE_GRANULARITY is now used exclusively in all uFileSystem components (the meaning is the same)
- Allow scrolling up and down to previous commands in command line and editing the command with option PREVIOUS_COMMAND_BUFFERS as number of buffers
- FTP client according to the FTP client user's guide: http://www.utasker.com/docs/uTasker/uTaskerFTP_client.pdf
- K70 (196 and 256 pin MAPBGA) and K61 (144, 196 and 256 pin MAPBGA)
- Some corrections to extended file system now verified for over 1'000 files and FTP directory listings
- Dual FlexCAN driver including interraction with CAN systems from uTasker simulator using KOMODO CAN DUO - see video http://youtu.be/Ha8cv_XEvco

IAR Users:
Please add the file ftp_client.c to the TCP/IP folder in IAR:
-   In the workspace view, click on the folder “TCP/IP”
-   Right click mouse to get the context menu
-   Select “Add | Add Files…”
-   Choose “ftp_client.c” in the folder “/stack”


Beta 0.15 - 02.02.2012 http://www.uTasker.com/software/V1.4/uTaskerKinetisV1.4-15.zip
===================================================================
- Correct _CONFIG_PORT_OUTPUT_FAST_LOW(), _CONFIG_PORT_OUTPUT_FAST_HIGH(), _CONFIG_PORT_INPUT_FAST_LOW() and _CONFIG_PORT_INPUT_FAST_HIGH() macros to select GPIO mode and follow peripheral changes in the simulator
- Add new routine to optimally calculate CAN clock settings (fnOptimalCAN_clock()).
- HID mouse added to USB device support - define USE_USB_HID_MOUSE enables in config.h
- PWM on FlexTimers - see Appendix E of http://www.utasker.com/docs/uTasker/uTaskerHWTimers.PDF for example
- Boot loading from SD card added as option to serial loader project

In app_hw_kinetis.h gibt es eine Define
#define USB_FIFO_INTERMEDIATE_BUFFER
This should be deleted since it selects an incorrect USB handshake mode (that is, a mode that doesn't match the USB controller's operation) and so will can cause USB OUT endpoints to discard data when their input buffers become full, and corresponding errors in the data received at the application.




*****************************************************************************************
Please note that the SW packages are protected by the corresponding project password.
To register and receive the password, simple fill out the form: http://www.utasker.com/Licensing/request.html
Don't be afraid - the project is free and supported for everyone; just for commerical use a small fee for premium
support is requested (donation after making their first million profit also welcomed..;-)
*****************************************************************************************
« Last Edit: April 27, 2012, 04:02:45 PM by mark »