72 lines
2.2 KiB
Plaintext
72 lines
2.2 KiB
Plaintext
Overview
|
|
========
|
|
The LPI2C Example project is a demonstration program that uses the KSDK software to manipulate the Low Power Inter-
|
|
Integrated Circuit.
|
|
The example uses two instances of LPI2C, one in configured as master and the other one as slave.
|
|
The LPI2C master sends data to LPI2C slave. The slave will check the data it receives and shows the log.
|
|
|
|
|
|
Toolchain supported
|
|
===================
|
|
- Keil MDK 5.24a
|
|
- IAR embedded Workbench 8.22.2
|
|
- GCC ARM Embedded 7-2017-q4-major
|
|
- MCUXpresso10.2.0
|
|
|
|
Hardware requirements
|
|
=====================
|
|
- J-Link ARM
|
|
- Mini USB cable
|
|
- MAPS-KS22F256 board & MAPS-DOCK board
|
|
- Personal Computer
|
|
|
|
Board settings
|
|
==============
|
|
The freertos_lpi2c example is configured to use UART1 with PTE0 and PTE1 pins. To make JLink serial
|
|
device work, the jumpers on MAPS-DOCK board should be set as following:
|
|
- JP7 on MAPS-Dock: UART0 related jumpers connected
|
|
|
|
To make this demo work, connections on MAPS-KS22F256 board need to be setup as follows:
|
|
- PTB0(Pin53) --> PTC10(Pin82);
|
|
- PTB1(Pin54) --> PTC11(Pin83);
|
|
- JP13 Connected
|
|
- JP14 Connected
|
|
|
|
Prepare the Demo
|
|
================
|
|
1. Connect a mini USB cable between the PC host and the USB port (CN14) on MAPS-DOCK board.
|
|
2. Open a serial terminal on PC for JLink serial device with these settings:
|
|
- 115200 baud rate
|
|
- 8 data bits
|
|
- No parity
|
|
- One stop bit
|
|
- No flow control
|
|
3. Download the program to the target board.
|
|
4. Either press the reset button on your board or launch the debugger in your IDE to begin running
|
|
the demo. For detailed instructions, see Getting Started with Software Development Kit for
|
|
KS22F25612 (document SDKKS22F256GSUG).
|
|
|
|
Running the demo
|
|
================
|
|
==I2C example -- MasterInterrupt_SlaveInterrupt.==
|
|
Master will send data :
|
|
0x 0 0x 1 0x 2 0x 3 0x 4 0x 5 0x 6 0x 7
|
|
0x 8 0x 9 0x a 0x b 0x c 0x d 0x e 0x f
|
|
0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17
|
|
0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f
|
|
|
|
I2C slave transfer completed successfully.
|
|
|
|
|
|
Transfer successfully!
|
|
|
|
Slave received data :
|
|
0x 0 0x 1 0x 2 0x 3 0x 4 0x 5 0x 6 0x 7
|
|
0x 8 0x 9 0x a 0x b 0x c 0x d 0x e 0x f
|
|
0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17
|
|
0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f
|
|
|
|
Customization options
|
|
=====================
|
|
|