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

Revision:
4:d47832caea44
Parent:
3:a38ad504a18c
Child:
7:d70f8086a89b
--- a/RF_Drivers/low_level_RF.cpp	Thu Mar 05 16:37:54 2015 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,77 +0,0 @@
-/* this file needs customization 
-   according the target hardware
-*/
-
-
-#include "mbed.h"
-
-extern "C" void rf_if_interrupt_handler(void);
-
-#if defined(TARGET_K64F)
-SPI spi(PTD2, PTD3, PTD1);
-#elif defined(TARGET_NUCLEO_F401RE)
-SPI spi(SPI_MOSI, SPI_MISO, SPI_SCK);
-#else
-  "SPI not defined for this platform"
-#endif
-
-DigitalOut RF_CS(D10);
-DigitalOut RF_RST(D5);
-DigitalOut RF_SLP_TR(D7);
-InterruptIn RF_IRQ(D9);
-
-     
-extern "C" void RF_IRQ_Init(void) {
-    
-    RF_IRQ.rise(&rf_if_interrupt_handler);
-}
-
-extern "C" void RF_RST_Set(int state) {
-    RF_RST = state;
-}
-
-extern "C" void RF_SLP_TR_Set(int state) {
-    RF_SLP_TR = state;
-}
-
-extern "C" void RF_CS_while_active(void) {
-    
-    while(!RF_CS);
-}
-
-
-extern "C" int spi_read(char addr) {
-    
-  // Select the device by seting chip select low
-  RF_CS = 0;
-  // Write the reg. address
-  spi.write(addr);
-  // write a dummy value to read the reg. value
-  int val = spi.write(0x00);
-  // Deselect the device
-  RF_CS = 1;
-  return val;
-} 
-
-extern "C" void spi_write(char addr, char val) {
-    
-  // Select the device by seting chip select low
-  RF_CS = 0;
-  // Write the reg. address
-  spi.write(addr);
-  // write the value to the addresses register
-  spi.write(val);
-  // Deselect the device
-  RF_CS = 1;
-}
-
-extern "C" void RF_CS_Set(int state) {
-    RF_CS = state;
-}
-
-extern "C" int spi_exchange(char value) {
-    
-  // write the value
-  int val = spi.write(value);
-    return val;
-}