Automated tests and emulators (MKL26Z and MKL27Z)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Automated tests and emulators (MKL26Z and MKL27Z)

567 Views
joeygouly
Contributor IV

Hi all,

I have begun to work on some firmware, and have been manually testing my changes.

It's starting to get annoying! Are there free emulators or simulators available for Kinetis L chips?

I'm working with USB, so being able to emulate the protocol there would be great too. Also, preferably running

on Linux or OS X. I think uTasker has an emulator, but only works on Windows?

I'm new to firmware development, how do other people run tests?

Also, I started working on MKL26Z, but since the MKL27Z has crystal-less USB, I might switch to that.

To port my code to that, I'd just need to change the clock setup code, right? Everything else stays the same.

Thanks

Joey

Labels (2)
0 Kudos
3 Replies

335 Views
mjbcswitzerland
Specialist V

Joey

There are a number of differences between the KL26 and KL27 (apart from the crystal-less capability of its USB device) so the amount of changes required depends also on the peripherals that are being used:

- it has a different main clock module

- Its UARTs are different (it has 2 LPUARTs and one UART - so the LPUARTs need a different driver)

- It has double buffered I2C which needs a different drive

- Various port MUX settings are different

- Its port interrupts are a little different

- SPIs support additional 16 bit mode (although this doesn't require a new driver).

- Various others such as FlexIO module

Regards

Mark

Kinetis: µTasker Kinetis support

KL26: µTasker Kinetis FRDM-KL26Z support / µTasker Kinetis Teensy LC support

KL27: µTasker Kinetis FRDM-KL27Z support

For the complete "out-of-the-box" Kinetis experience and faster time to market

335 Views
joeygouly
Contributor IV

Ever helpful Mark!

Could you give me a brief overview of the uTasker emulator? Would it be useful for automated tests?

Joey

0 Kudos

335 Views
mjbcswitzerland
Specialist V

Joey

I think that you are interested in USB so I will restrict to this.

The uTasker simulator (works with VisualStudio, which probably only works natively on Windows) can't hook to an real USB port of the PC since the PC has USB host and not device interfaces.This means that it uses scripts for USB development/testing as well as an integrated enumeration sequence that is executed when connecting to the USB-device.

This means that the standard USB enumeration sequence is played through the code (starting with the USB reset state interrupt, followed by the SETUP tokens setting an address, requesting strings, descriptors etc, - up to setting the configuration). This verifies that all data returned by the device/software is correct before showing that enumeration succeeded.

To subsequently test a class (and/or application) one creates test scripts which exercise standard test procedures (eg. a USB-MSD class script may request some sectors and write files to the FAT so that the software can be subjected to these standard USB communication procedures - for analysis, review, optimisation or debugging of particular cases). For example I have test scripts for typical Windows 8.1 and MAC OS X USB-MSD connections, file writes, deletes etc. since they work differently and this allows compatibility to be checked easily after code changes have been made.

[Side note: the USB scripts are created by taking recording from real USB operation - or particular good or bad cases - and using these as script inputs].

I don't know exactly what type of automated testing you are refering to. The uTasker simulator is designed to accelerate development and project maintenance, which includes efficient testing capabilities if this is what you are referring to.

Regards

Mark

P.S. The simulator generally allows (approx.) real-time interactions with the emulated Kinetis, which is demonstarted best based on its Ethernet capabilities:

http://www.utasker.com/docs/KINETIS/uTaskerV1.4_Kinetis.pdf

Kinetis: µTasker Kinetis support

For the complete "out-of-the-box" Kinetis experience and faster time to market

0 Kudos