| Kinetis SDK Demo Applications User Guide 1.0.0-beta Freescale Semiconductor, Inc.

- Main Page
- Related Pages
- Demos

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
I2C Demo with RTOS Introduction
I2C Demo with RTOS

Introduction and the configuration of the I2C master/slave demo with RTOS support. More...

### I2C Demo with RTOS Introduction

# Overview

This I2C application demonstrates how KSDK peripheral drivers work on different RTOS. The application acts as both I2C Master and Slave device on different I2C bus, e.g. I2C Master on I2C0 bus, I2C Slave on I2C1 bus. It can be running on one single board or on two different boards. When connecting the two I2C buses on one board, the Master sends commands from I2C0 bus to the slave on I2C1 bus. When connecting the I2C0 bus to the other board's I2C1 bus, the application running on the first board acts as Master, and sends commands to the other board which acts as slave. That means the first board can send commands and get responses from the other board by I2C bus. The basic function of this demo is:

1. Read the Kinetis chip UID(low 32bit) from the slave board
2. Read the Kinetis chip internal temperature from the slave board
3. Control the RED/GREEN/BLUE color LED on/off on slave board

The application creates three different tasks to handle events concurrently:

1. Master task: responsible for user interface interaction, running as a I2C Master and acting as a SHELL. It accepts user's command to read the basic chip UID, chip temperature and control the on board LED, and power mode on slave side.
2. Slave task: responsible for receiving the command from I2C Master and returning the result to Master.
3. ADC sample task: responsible for getting the chip temperature in a period.
4. For BM version, Master and Slave task are separated into two projects.

# Supported RTOS

- Freescale MQX™ RTOS
- FreeRTOS
- uC/OS-II
- uC/OS-III
- Bare-Metal (no RTOS)

# Supported platforms

Currently, this demo supports the following platforms:

- FRDM-K64F120M
- TWR-K64F120M

# Serial terminal configuration

The debug serial terminal is configured for the following settings:

- 115200
- 8 data bits
- No parity
- 1 stop bit