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:
andreikovacs
Date:
Mon Jun 29 05:50:47 2015 +0000
Revision:
27:1eb29717bfd9
Parent:
19:71b793021c78
Changed app to behave like the initial Wireless UART demo

Who changed what in which revision?

UserRevisionLine numberNew contents of line
cotigac 19:71b793021c78 1 /*!
cotigac 19:71b793021c78 2 * Copyright (c) 2015, Freescale Semiconductor, Inc.
cotigac 19:71b793021c78 3 * All rights reserved.
cotigac 19:71b793021c78 4 *
cotigac 19:71b793021c78 5 * \file RNG_interface.h
cotigac 19:71b793021c78 6 * RNG implementation header file for the ARM CORTEX-M4 processor
cotigac 19:71b793021c78 7 *
cotigac 19:71b793021c78 8 * Redistribution and use in source and binary forms, with or without modification,
cotigac 19:71b793021c78 9 * are permitted provided that the following conditions are met:
cotigac 19:71b793021c78 10 *
cotigac 19:71b793021c78 11 * o Redistributions of source code must retain the above copyright notice, this list
cotigac 19:71b793021c78 12 * of conditions and the following disclaimer.
cotigac 19:71b793021c78 13 *
cotigac 19:71b793021c78 14 * o Redistributions in binary form must reproduce the above copyright notice, this
cotigac 19:71b793021c78 15 * list of conditions and the following disclaimer in the documentation and/or
cotigac 19:71b793021c78 16 * other materials provided with the distribution.
cotigac 19:71b793021c78 17 *
cotigac 19:71b793021c78 18 * o Neither the name of Freescale Semiconductor, Inc. nor the names of its
cotigac 19:71b793021c78 19 * contributors may be used to endorse or promote products derived from this
cotigac 19:71b793021c78 20 * software without specific prior written permission.
cotigac 19:71b793021c78 21 *
cotigac 19:71b793021c78 22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
cotigac 19:71b793021c78 23 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
cotigac 19:71b793021c78 24 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
cotigac 19:71b793021c78 25 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
cotigac 19:71b793021c78 26 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
cotigac 19:71b793021c78 27 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
cotigac 19:71b793021c78 28 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
cotigac 19:71b793021c78 29 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
cotigac 19:71b793021c78 30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
cotigac 19:71b793021c78 31 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
cotigac 19:71b793021c78 32 */
cotigac 19:71b793021c78 33
cotigac 19:71b793021c78 34 #ifndef _RNG_INTERFACE_H_
cotigac 19:71b793021c78 35 #define _RNG_INTERFACE_H_
cotigac 19:71b793021c78 36
cotigac 19:71b793021c78 37 #include "EmbeddedTypes.h"
cotigac 19:71b793021c78 38
cotigac 19:71b793021c78 39
cotigac 19:71b793021c78 40 /******************************************************************************
cotigac 19:71b793021c78 41 *******************************************************************************
cotigac 19:71b793021c78 42 * Public macros
cotigac 19:71b793021c78 43 *******************************************************************************
cotigac 19:71b793021c78 44 ******************************************************************************/
cotigac 19:71b793021c78 45 #define gRNG_NoHWSupport_d 0
cotigac 19:71b793021c78 46 #define gRNG_RNGAHWSupport_d 1
cotigac 19:71b793021c78 47 #define gRNG_RNGBHWSupport_d 2
cotigac 19:71b793021c78 48 #define gRNG_TRNGHWSupport_d 3
cotigac 19:71b793021c78 49
cotigac 19:71b793021c78 50 #ifndef gRNG_HWSupport_d
cotigac 19:71b793021c78 51 #define gRNG_HWSupport_d gRNG_NoHWSupport_d
cotigac 19:71b793021c78 52 #endif
cotigac 19:71b793021c78 53
cotigac 19:71b793021c78 54 #define gRngSuccess_d (0x00)
cotigac 19:71b793021c78 55 #define gRngInternalError_d (0x01)
cotigac 19:71b793021c78 56 #define gRngNullPointer_d (0x80)
cotigac 19:71b793021c78 57 #define gRngMaxRequests_d (100000)
cotigac 19:71b793021c78 58
cotigac 19:71b793021c78 59
cotigac 19:71b793021c78 60 /******************************************************************************
cotigac 19:71b793021c78 61 *******************************************************************************
cotigac 19:71b793021c78 62 * Public type definitions
cotigac 19:71b793021c78 63 *******************************************************************************
cotigac 19:71b793021c78 64 ******************************************************************************/
cotigac 19:71b793021c78 65
cotigac 19:71b793021c78 66 /******************************************************************************
cotigac 19:71b793021c78 67 *******************************************************************************
cotigac 19:71b793021c78 68 * Public memory declarations
cotigac 19:71b793021c78 69 *******************************************************************************
cotigac 19:71b793021c78 70 ******************************************************************************/
cotigac 19:71b793021c78 71
cotigac 19:71b793021c78 72 /******************************************************************************
cotigac 19:71b793021c78 73 *******************************************************************************
cotigac 19:71b793021c78 74 * Public function prototypes
cotigac 19:71b793021c78 75 *******************************************************************************
cotigac 19:71b793021c78 76 ******************************************************************************/
cotigac 19:71b793021c78 77
cotigac 19:71b793021c78 78 /******************************************************************************
cotigac 19:71b793021c78 79 * Name: RNG_Init()
cotigac 19:71b793021c78 80 * Description: Initialize the RNG HW module
cotigac 19:71b793021c78 81 * Parameter(s): -
cotigac 19:71b793021c78 82 * Return: Status of the RNG module
cotigac 19:71b793021c78 83 ******************************************************************************/
cotigac 19:71b793021c78 84 uint8_t RNG_Init(void);
cotigac 19:71b793021c78 85
cotigac 19:71b793021c78 86 /******************************************************************************
cotigac 19:71b793021c78 87 * Name: RNG_GetRandomNo()
cotigac 19:71b793021c78 88 * Description: Reads a 32-bit statistically random number from the RNG module or from 802.15.4 PHY
cotigac 19:71b793021c78 89 * Parameter(s): [OUT] pRandomNo - pointer to location where the RN will be stored
cotigac 19:71b793021c78 90 * Return: none
cotigac 19:71b793021c78 91 ******************************************************************************/
cotigac 19:71b793021c78 92 void RNG_GetRandomNo(uint32_t* pRandomNo);
cotigac 19:71b793021c78 93
cotigac 19:71b793021c78 94 /******************************************************************************
cotigac 19:71b793021c78 95 * Name: PRNG_SetSeed()
cotigac 19:71b793021c78 96 * Description: Initialize seed for the PRNG algorithm.
cotigac 19:71b793021c78 97 * Parameter(s):
cotigac 19:71b793021c78 98 * pSeed - can be set using the RNG_GetRandomNo() function
cotigac 19:71b793021c78 99 * Return: None
cotigac 19:71b793021c78 100 ******************************************************************************/
cotigac 19:71b793021c78 101 void RNG_SetPseudoRandomNoSeed(uint8_t* pSeed);
cotigac 19:71b793021c78 102
cotigac 19:71b793021c78 103 /******************************************************************************
cotigac 19:71b793021c78 104 * Name: PRNG_GetRandomNo()
cotigac 19:71b793021c78 105 * Description: Generates a NIST FIPS Publication 186-2-compliant 160 bit pseudo-random number
cotigac 19:71b793021c78 106 * Parameter(s):
cotigac 19:71b793021c78 107 * pOut - pointer to the output buffer
cotigac 19:71b793021c78 108 * outBytes - the number of bytes to be copyed (1-20)
cotigac 19:71b793021c78 109 * pXSEED - optional user SEED. Should be NULL if not used.
cotigac 19:71b793021c78 110 * Return: The number of bytes copied or -1 if reseed is needed
cotigac 19:71b793021c78 111 ******************************************************************************/
cotigac 19:71b793021c78 112 int16_t RNG_GetPseudoRandomNo(uint8_t* pOut, uint8_t outBytes, uint8_t* pXSEED);
cotigac 19:71b793021c78 113
cotigac 19:71b793021c78 114 #endif /* _RNG_INTERFACE_H_ */