![]() |
Kinetis SDK v.1.2 Demo Applications User's Guide
Rev. 0
Freescale Semiconductor, Inc.
|
#include <string.h>
#include "fsl_spi_slave_driver.h"
#include "fsl_clock_manager.h"
#include "fsl_debug_console.h"
#include "board.h"
#include <stdio.h>
Macros | |
#define | SPI_SLAVE_INSTANCE |
#define | TRANSFER_SIZE |
#define | SLAVE_TRANSFER_TIMEOUT |
Functions | |
int | main (void) |
Function prototype for main function. More... | |
Variables | |
const uint32_t | g_spiFifoSize [SPI_INSTANCE_COUNT] |
SPI_Type *const | g_spiBase [SPI_INSTANCE_COUNT] |
Table of base pointers for SPI instances. More... | |
uint8_t | s_spiSinkBuffer [TRANSFER_SIZE] |
Buffer for storing data received by the SPI slave driver. More... | |
#define SLAVE_TRANSFER_TIMEOUT |
#define SPI_SLAVE_INSTANCE |
#define TRANSFER_SIZE |
int main | ( | void | ) |
Function prototype for main function.
Function prototype for main function.
This function used the input of user as trigger to start the measurement. When user press any key, the conversion will begin, then print converted value and current temperature of the chip.
Function prototype for main function.
Run a simple application which enables watchdog, then continuously refreshes the watchdog to prevent CPU reset Upon SW1 button push, the watchdog will expire after approximately 1 seconds and chip will reset.
Function prototype for main function.
This function uses terminal to enter DAC value and convert this value to DAC output.
Function prototype for main function.
This function use DMA peripheral to transfer two buffers
Function prototype for main function.
Thid function uses DSPI master to send an array to slave and receive the array back from slave, thencompare whether the two buffers are the same.
Function prototype for main function.
This function sends back received buffer from master through DSPI interface.
Function prototype for main function.
This function sends an array through DSPI loopback interface and compare it with received buffer whether they are the same.
Function prototype for main function.
This function use EDMA peripheral to transfer two buffers
Function prototype for main function.
This function use EWM as a watchdog for an external circuit. when the counter reaches high value, EWM enter interrupt.
Function prototype for main function.
This function uses SSD to demonstrate flash mode:
Function prototype for main function.
This function use PWM to controll brightness of a LED. LED is brighter and then dimmer, continuously.
Function prototype for main function.
This function toogles LED1 when press SW.
Function prototype for main function.
This function uses PDB to generate a constant period of time. Each time, PDB expires, interrupt occurres.
Function prototype for main function.
Example single timer period and interrupt on multiple channels
Function prototype for main function.
This function demostrates how to use RTC as an alarm clock.
receiveBuff | Buffer used to hold received data |
Return code from each SSD function
Address of the target location
Return protection status
Number of longword or phrase to be verified
0=normal, 1=user, 2=factory - margin read for reading
Indicate LED is brighter or dimmer
Use LPTMR in Time Counter mode
When hit compare value, set counter back to zero
bypass prescaler
use 1kHz Low Power Clock
< Enables slcd clock from osc
< SLCD starts fault detection and caused an LCD interrupt later
< SLCD starts blinking mode
< SLCD stops blinking mode
< SLCD starts blank display mode
< SLCD stops blank display mode
SPI_Type* const g_spiBase[SPI_INSTANCE_COUNT] |
const uint32_t g_spiFifoSize[SPI_INSTANCE_COUNT] |
uint8_t s_spiSinkBuffer[TRANSFER_SIZE] |