NXP / Mbed 2 deprecated mcr20_wireless_uart

Dependencies:   fsl_phy_mcr20a fsl_smac mbed-rtos mbed

Fork of mcr20_wireless_uart by Freescale

By default, the application uses broadcast addresses for OTA communication. This way, the application can be directly downloaded and run without any user intervention. The following use case assumes no changes have been done to the project.

  • Two (or more) MCR20A platforms (plugged into the FRDM-K64F Freescale Freedom Development platform) have to be connected to the PC using the mini/micro-USB cables.
  • The code must be downloaded on the platforms via CMSIS-DAP (or other means).
  • After that, two or more TERM applications must be opened, and the serial ports must be configured with the same baud rate as the one in the project (default baud rate is 115200). Other necessary serial configurations are 8 bit, no parity, and 1 stop bit.
  • To start the setup, each platform must be reset, and one of the (user) push buttons found on the MCR20A platform must be pressed. The user can press any of the non-reset buttons on the FRDM-K64F Freescale Freedom Development platform as well. *This initiates the state machine of the application so user can start.

Documentation

SMAC Demo Applications User Guide

Committer:
cotigac
Date:
Fri Apr 03 05:23:33 2015 +0000
Revision:
18:b02fc0e53df8
Started creating wireless uart demo based on mbed-rtos

Who changed what in which revision?

UserRevisionLine numberNew contents of line
cotigac 18:b02fc0e53df8 1 /*!
cotigac 18:b02fc0e53df8 2 * Copyright (c) 2015, Freescale Semiconductor, Inc.
cotigac 18:b02fc0e53df8 3 * All rights reserved.
cotigac 18:b02fc0e53df8 4 *
cotigac 18:b02fc0e53df8 5 * \file XcvrSpi.h
cotigac 18:b02fc0e53df8 6 *
cotigac 18:b02fc0e53df8 7 * Redistribution and use in source and binary forms, with or without modification,
cotigac 18:b02fc0e53df8 8 * are permitted provided that the following conditions are met:
cotigac 18:b02fc0e53df8 9 *
cotigac 18:b02fc0e53df8 10 * o Redistributions of source code must retain the above copyright notice, this list
cotigac 18:b02fc0e53df8 11 * of conditions and the following disclaimer.
cotigac 18:b02fc0e53df8 12 *
cotigac 18:b02fc0e53df8 13 * o Redistributions in binary form must reproduce the above copyright notice, this
cotigac 18:b02fc0e53df8 14 * list of conditions and the following disclaimer in the documentation and/or
cotigac 18:b02fc0e53df8 15 * other materials provided with the distribution.
cotigac 18:b02fc0e53df8 16 *
cotigac 18:b02fc0e53df8 17 * o Neither the name of Freescale Semiconductor, Inc. nor the names of its
cotigac 18:b02fc0e53df8 18 * contributors may be used to endorse or promote products derived from this
cotigac 18:b02fc0e53df8 19 * software without specific prior written permission.
cotigac 18:b02fc0e53df8 20 *
cotigac 18:b02fc0e53df8 21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
cotigac 18:b02fc0e53df8 22 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
cotigac 18:b02fc0e53df8 23 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
cotigac 18:b02fc0e53df8 24 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
cotigac 18:b02fc0e53df8 25 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
cotigac 18:b02fc0e53df8 26 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
cotigac 18:b02fc0e53df8 27 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
cotigac 18:b02fc0e53df8 28 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
cotigac 18:b02fc0e53df8 29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
cotigac 18:b02fc0e53df8 30 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
cotigac 18:b02fc0e53df8 31 */
cotigac 18:b02fc0e53df8 32
cotigac 18:b02fc0e53df8 33 #ifndef __XCVR_SPI_H__
cotigac 18:b02fc0e53df8 34 #define __XCVR_SPI_H__
cotigac 18:b02fc0e53df8 35
cotigac 18:b02fc0e53df8 36
cotigac 18:b02fc0e53df8 37 /*****************************************************************************
cotigac 18:b02fc0e53df8 38 * INCLUDED HEADERS *
cotigac 18:b02fc0e53df8 39 *---------------------------------------------------------------------------*
cotigac 18:b02fc0e53df8 40 * Add to this section all the headers that this module needs to include. *
cotigac 18:b02fc0e53df8 41 * Note that it is not a good practice to include header files into header *
cotigac 18:b02fc0e53df8 42 * files, so use this section only if there is no other better solution. *
cotigac 18:b02fc0e53df8 43 *---------------------------------------------------------------------------*
cotigac 18:b02fc0e53df8 44 *****************************************************************************/
cotigac 18:b02fc0e53df8 45
cotigac 18:b02fc0e53df8 46 #include "EmbeddedTypes.h"
cotigac 18:b02fc0e53df8 47 //#include "board.h"
cotigac 18:b02fc0e53df8 48
cotigac 18:b02fc0e53df8 49
cotigac 18:b02fc0e53df8 50 /*****************************************************************************
cotigac 18:b02fc0e53df8 51 * PUBLIC MACROS *
cotigac 18:b02fc0e53df8 52 *---------------------------------------------------------------------------*
cotigac 18:b02fc0e53df8 53 * Add to this section all the access macros, registers mappings, bit access *
cotigac 18:b02fc0e53df8 54 * macros, masks, flags etc ...
cotigac 18:b02fc0e53df8 55 *---------------------------------------------------------------------------*
cotigac 18:b02fc0e53df8 56 *****************************************************************************/
cotigac 18:b02fc0e53df8 57 //#define gXcvrAssertCS_d() GPIO_DRV_ClearPinOutput(kGpioXcvrSpiCsPin)
cotigac 18:b02fc0e53df8 58 //#define gXcvrDeassertCS_d() GPIO_DRV_SetPinOutput(kGpioXcvrSpiCsPin)
cotigac 18:b02fc0e53df8 59
cotigac 18:b02fc0e53df8 60 #define gXcvrSpiInstance_c 0
cotigac 18:b02fc0e53df8 61
cotigac 18:b02fc0e53df8 62 /*****************************************************************************
cotigac 18:b02fc0e53df8 63 * PUBLIC FUNCTIONS *
cotigac 18:b02fc0e53df8 64 *---------------------------------------------------------------------------*
cotigac 18:b02fc0e53df8 65 * Add to this section all the global functions prototype preceded (as a *
cotigac 18:b02fc0e53df8 66 * good practice) by the keyword 'extern' *
cotigac 18:b02fc0e53df8 67 *---------------------------------------------------------------------------*
cotigac 18:b02fc0e53df8 68 *****************************************************************************/
cotigac 18:b02fc0e53df8 69 void RF_RST_Set(int state);
cotigac 18:b02fc0e53df8 70 void RF_SLP_TR_Set(int state);
cotigac 18:b02fc0e53df8 71 void RF_CS_while_active(void);
cotigac 18:b02fc0e53df8 72 void RF_CS_Set(int state);
cotigac 18:b02fc0e53df8 73 void RF_IRQ_Init(void);
cotigac 18:b02fc0e53df8 74 void RF_IRQ_Disable(void);
cotigac 18:b02fc0e53df8 75 void RF_IRQ_Enable(void);
cotigac 18:b02fc0e53df8 76 bool_t RF_isIRQ_Pending(void);
cotigac 18:b02fc0e53df8 77
cotigac 18:b02fc0e53df8 78 void gXcvrAssertCS_d(void);
cotigac 18:b02fc0e53df8 79 void gXcvrDeassertCS_d(void);
cotigac 18:b02fc0e53df8 80
cotigac 18:b02fc0e53df8 81 void spi_master_init(uint32_t instance);
cotigac 18:b02fc0e53df8 82 void spi_master_configure_speed(uint32_t instance, uint32_t freq);
cotigac 18:b02fc0e53df8 83 void spi_master_transfer(uint32_t instance,
cotigac 18:b02fc0e53df8 84 uint8_t * sendBuffer,
cotigac 18:b02fc0e53df8 85 uint8_t * receiveBuffer,
cotigac 18:b02fc0e53df8 86 uint32_t transferByteCount);
cotigac 18:b02fc0e53df8 87
cotigac 18:b02fc0e53df8 88 #endif /* __XCVR_SPI_H__ */
cotigac 18:b02fc0e53df8 89