The MCR20A Wireless UART application functions as an wireless UART bridge between two (one-to-one) or several (one to many) boards. The application can be used with both a TERM, or with software that is capable of opening a serial port and writing to or reading from it. The characters sent or received are not necessarily ASCII printable characters.

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 * driverRFinterface.h
cotigac 18:b02fc0e53df8 3 *
cotigac 18:b02fc0e53df8 4 * Created on: 12 March 2015
cotigac 18:b02fc0e53df8 5 * Author: mBed Team
cotigac 18:b02fc0e53df8 6 */
cotigac 18:b02fc0e53df8 7
cotigac 18:b02fc0e53df8 8 #ifndef DRIVERRFINTERFACE_H_
cotigac 18:b02fc0e53df8 9 #define DRIVERRFINTERFACE_H_
cotigac 18:b02fc0e53df8 10
cotigac 18:b02fc0e53df8 11 //#include "arm_hal_phy.h"
cotigac 18:b02fc0e53df8 12 #include "EmbeddedTypes.h"
cotigac 18:b02fc0e53df8 13
cotigac 18:b02fc0e53df8 14 #ifdef __cplusplus
cotigac 18:b02fc0e53df8 15 extern "C" {
cotigac 18:b02fc0e53df8 16 #endif
cotigac 18:b02fc0e53df8 17
cotigac 18:b02fc0e53df8 18 #define RF_BUFFER_SIZE 128
cotigac 18:b02fc0e53df8 19 #define RF_DEFAULT_CHANNEL 11
cotigac 18:b02fc0e53df8 20
cotigac 18:b02fc0e53df8 21 typedef union uuint16_tag
cotigac 18:b02fc0e53df8 22 {
cotigac 18:b02fc0e53df8 23 uint16_t u16;
cotigac 18:b02fc0e53df8 24 uint8_t u8[2];
cotigac 18:b02fc0e53df8 25 } uuint16_t;
cotigac 18:b02fc0e53df8 26
cotigac 18:b02fc0e53df8 27 typedef union uuint32_tag
cotigac 18:b02fc0e53df8 28 {
cotigac 18:b02fc0e53df8 29 uint32_t u32;
cotigac 18:b02fc0e53df8 30 uint16_t u16[2];
cotigac 18:b02fc0e53df8 31 uint8_t u8[4];
cotigac 18:b02fc0e53df8 32 } uuint32_t;
cotigac 18:b02fc0e53df8 33
cotigac 18:b02fc0e53df8 34 typedef union uuint64_tag
cotigac 18:b02fc0e53df8 35 {
cotigac 18:b02fc0e53df8 36 uint64_t u64;
cotigac 18:b02fc0e53df8 37 uint32_t u32[2];
cotigac 18:b02fc0e53df8 38 uint16_t u16[4];
cotigac 18:b02fc0e53df8 39 uint8_t u8[8];
cotigac 18:b02fc0e53df8 40 } uuint64_t;
cotigac 18:b02fc0e53df8 41
cotigac 18:b02fc0e53df8 42 extern uint64_t atouint64(uint8_t* pArray);
cotigac 18:b02fc0e53df8 43 extern uint16_t atouint16(uint8_t* pArray);
cotigac 18:b02fc0e53df8 44 extern uint64_t NWKU_Revert64(uint64_t value);
cotigac 18:b02fc0e53df8 45
cotigac 18:b02fc0e53df8 46 #if 0
cotigac 18:b02fc0e53df8 47 extern void rf_set_mac_address(const uint8_t *ptr);
cotigac 18:b02fc0e53df8 48 extern int8_t rf_device_register(void);
cotigac 18:b02fc0e53df8 49 extern void rf_channel_set(uint8_t ch);
cotigac 18:b02fc0e53df8 50 extern int8_t rf_tx(uint8_t *data_ptr, uint16_t data_length, uint8_t tx_handle);
cotigac 18:b02fc0e53df8 51 static int8_t rf_extension(phy_extension_type_e extension_type,uint8_t *data_ptr);
cotigac 18:b02fc0e53df8 52 static int8_t rf_address_write(phy_address_type_e address_type,uint8_t *address_ptr);
cotigac 18:b02fc0e53df8 53 static int8_t rf_interface_state_control(phy_interface_state_e new_state, uint8_t rf_channel);
cotigac 18:b02fc0e53df8 54 static void PD_PLME_MAC_SapHandler( void* pMsg, instanceId_t id );
cotigac 18:b02fc0e53df8 55 #endif
cotigac 18:b02fc0e53df8 56
cotigac 18:b02fc0e53df8 57 #ifdef __cplusplus
cotigac 18:b02fc0e53df8 58 }
cotigac 18:b02fc0e53df8 59 #endif
cotigac 18:b02fc0e53df8 60
cotigac 18:b02fc0e53df8 61 #endif /* DRIVERRFINTERFACE_H_ */