Kinetis SDK v.1.2 Demo Applications User's Guide  Rev. 0
Freescale Semiconductor, Inc.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
driver_examples/flexcan/flexcan_loopback/main.c File Reference
#include <string.h>
#include <math.h>
#include <stdio.h>
#include "fsl_clock_manager.h"
#include "fsl_flexcan_driver.h"
#include "board.h"
#include "fsl_debug_console.h"

Functions

void send_data (void)
 
void transfer_mb_loopback (void)
 
void receive_mb_config (void)
 
int main ()
 Function prototype for main function. More...
 

Variables

uint32_t txIdentifier
 
uint32_t rxIdentifier
 
uint32_t txRemoteIdentifier
 
uint32_t rxRemoteIdentifier
 
uint32_t txMailboxNum
 
uint32_t rxMailboxNum
 
uint32_t rxRemoteMailboxNum
 
flexcan_state_t canState
 
uint32_t instance
 
uint32_t numErrors
 
flexcan_time_segment_t bitRateTable60Mhz []
 
flexcan_time_segment_t bitRateTable48Mhz []
 

Function Documentation

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:

  • Check flash information.
  • Erase a sector and verify.
  • Program a sector and verify.
Parameters
receiveBuffBuffer 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

void receive_mb_config ( void  )
void send_data ( void  )
void transfer_mb_loopback ( void  )

Variable Documentation

flexcan_time_segment_t bitRateTable48Mhz[]
flexcan_time_segment_t bitRateTable60Mhz[]
flexcan_state_t canState
uint32_t instance
uint32_t numErrors
uint32_t rxIdentifier
uint32_t rxMailboxNum
uint32_t rxRemoteIdentifier
uint32_t rxRemoteMailboxNum
uint32_t txIdentifier
uint32_t txMailboxNum
uint32_t txRemoteIdentifier