Adding the Echo Driver to an Application
#endif
/* --- Setup SPI --------------------------
*/
#define ECHO_SPI_ADDRESS
0x28
/* Location of SPI registers
/* Address varies from MCU to MCU
/* SPI clock speed
*/
*/
*/
#define ECHO_SPI_CLOCK_SPEED
8000000
/* --- Timer set up -----------------------
*/
*/
#define ECHO_TIMER_ADDRESS
#define ECHO_TIMER_CHANNEL0
0x40
/* Location of 1st timer register
/* Define which timer channel to use
/* Note:timer channels start from 0
*/
*/
#define ECHO_TIMER_CLOCK_SOURCE1/* Use to set clock source for timer
/* 1 = Bus clock
*/
*/
/* 2 = XCLK- note,not all MCUs have XCLK */
/* 3 = Ext clock
*/
#define ECHO_USE_DATACLK
0
/* Indicate if the Ext clock is DATACLK
/* output from Echo. If using DATACLK
/* and ECHO_TIMER_CLOCK_SOURCE = 3,
/* ECHO_TIMER_CLOCK_SPEED is replaced
/* with Fdataclk calculated instead.
/* 0 = dataclock not enabled
*/
*/
*/
*/
*/
*/
*/
/* 1 = dataclock enabled
#define ECHO_TIMER_CLOCK_SPEED8000000/* Set timer clock speed in Hz
*/
#define ECHO_TIMER_PRESCALE1
#define ECHO_TIMER_DISABLE1
/* Specify timer prescaler value
*/
/* Allows driver to turn off timer after */
/* use. Delete this #define if you want
/* timer to stay on
*/
*/
#define ECHO_CRYSTAL_FREQUENCY24190660/* Crystal frequency (in Hz)
*/
/* Typical values used
/* RF Output
/* 315MHz - 17581400
/* 434MHz - 24190660
/* 868MHz - 24161390
*/
*/
*/
*/
*/
/* --- Buffering parameters ---------------
*/
#define ECHO_MAX_DATA_SIZE14
/* Max length of data field in msg
*/
#define ECHO_RX_BUF_COUNT4
/* Number of Rx buffers to allocate
/* An additional buffer is allocated
/* for internal use by the driver
/* Note: each buffer consumes
*/
*/
*/
*/
/* ECHO_MAX_DATA_SIZE+2 bytes in memory! */
/* --- On/off control ---------------------
*/
#define ECHO_SOE_VALUE
1
/* 0 = strobe oscillator disabled
/* 1 = strobe oscillator enabled
*/
*/
#define ECHO_RX_TIMEOUT_BITS32
/* Number of bit-times to wait on
*/
Software Drivers for MC33696, Rev. 1
42
Freescale Semiconductor