Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: fsl_phy_mcr20a fsl_smac mbed-rtos mbed
Fork of mcr20_wireless_uart by
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
Diff: RF_Drivers_Freescale/driverRFPhy.c
- Revision:
- 13:4fa8e504061f
- Parent:
- 12:4446d8228309
- Child:
- 14:a1b249761bcc
diff -r 4446d8228309 -r 4fa8e504061f RF_Drivers_Freescale/driverRFPhy.c
--- a/RF_Drivers_Freescale/driverRFPhy.c Thu Mar 05 15:47:28 2015 -0600
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,153 +0,0 @@
-/*!
-* Copyright (c) 2015, Freescale Semiconductor, Inc.
-* All rights reserved.
-*
-* \file MCR20Drv.c
-*
-* Redistribution and use in source and binary forms, with or without modification,
-* are permitted provided that the following conditions are met:
-*
-* o Redistributions of source code must retain the above copyright notice, this list
-* of conditions and the following disclaimer.
-*
-* o Redistributions in binary form must reproduce the above copyright notice, this
-* list of conditions and the following disclaimer in the documentation and/or
-* other materials provided with the distribution.
-*
-* o Neither the name of Freescale Semiconductor, Inc. nor the names of its
-* contributors may be used to endorse or promote products derived from this
-* software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
-* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-
-/*****************************************************************************
-* INCLUDED HEADERS *
-*---------------------------------------------------------------------------*
-* Add to this section all the headers that this module needs to include. *
-*---------------------------------------------------------------------------*
-*****************************************************************************/
-
-
-#include "arm_hal_phy.h"
-#include "arm_hal_interrupt.h"
-
-
-/*****************************************************************************
-* PRIVATE VARIABLES *
-*---------------------------------------------------------------------------*
-* Add to this section all the variables and constants that have local *
-* (file) scope. *
-* Each of this declarations shall be preceded by the 'static' keyword. *
-* These variables / constants cannot be accessed outside this module. *
-*---------------------------------------------------------------------------*
-*****************************************************************************/
-
-static uint8_t mac_eui64[8];
-static phy_device_driver_s device_driver;
-static int8_t rf_radio_driver_id = -1;
-static phy_device_channel_info_s channel_info;
-
-/*****************************************************************************
-* PUBLIC VARIABLES *
-*---------------------------------------------------------------------------*
-* Add to this section all the variables and constants that have global *
-* (project) scope. *
-* These variables / constants can be accessed outside this module. *
-* These variables / constants shall be preceded by the 'extern' keyword in *
-* the interface header. *
-*---------------------------------------------------------------------------*
-*****************************************************************************/
-
-/*****************************************************************************
-* PRIVATE FUNCTIONS PROTOTYPES *
-*---------------------------------------------------------------------------*
-* Add to this section all the functions prototypes that have local (file) *
-* scope. *
-* These functions cannot be accessed outside this module. *
-* These declarations shall be preceded by the 'static' keyword. *
-*---------------------------------------------------------------------------*
-*****************************************************************************/
-
-/*****************************************************************************
-* PRIVATE FUNCTIONS *
-*---------------------------------------------------------------------------*
-* Add to this section all the functions that have local (file) scope. *
-* These functions cannot be accessed outside this module. *
-* These definitions shall be preceded by the 'static' keyword. *
-*---------------------------------------------------------------------------*
-*****************************************************************************/
-
-
-/*****************************************************************************
-* PUBLIC FUNCTIONS *
-*---------------------------------------------------------------------------*
-* Add to this section all the functions that have global (project) scope. *
-* These functions can be accessed outside this module. *
-* These functions shall have their declarations (prototypes) within the *
-* interface header file and shall be preceded by the 'extern' keyword. *
-*---------------------------------------------------------------------------*
-*****************************************************************************/
-
-
-/*
- * \brief Function initialises and registers the RF driver.
- *
- * \param none
- *
- * \return rf_radio_driver_id Driver ID given by NET library
- */
-int8_t rf_device_register(void)
-{
- rf_init();
- /*Set pointer to MAC address*/
- device_driver.PHY_MAC = mac_eui64;
- device_driver.driver_description = "Freescale_MAC";
-#if PHY_LINK_15_4_2_4GHZ_TYPE
- /*Number of channels in PHY*/
- channel_info.channel_count = 16;
- /*Channel mask 26-11*/
- channel_info.channel_mask = 0x07FFF800;
- /*Type of RF PHY is SubGHz*/
- device_driver.link_type = PHY_LINK_15_4_2_4GHZ_TYPE;
- device_driver.link_channel_info = &channel_info;
-#else
- /*Number of channels in PHY*/
- channel_info.channel_count = 11;
- /*Channel mask 0-10*/
- channel_info.channel_mask = 0x000007ff;
- /*Type of RF PHY is SubGHz*/
- device_driver.link_type = PHY_LINK_15_4_SUBGHZ_TYPE;
- device_driver.link_channel_info = &channel_info;
-#endif
- /*Maximum size of payload is 127*/
- device_driver.phy_MTU = 127;
- /*No header in PHY*/
- device_driver.phy_header_length = 0;
- /*No tail in PHY*/
- device_driver.phy_tail_length = 0;
- /*Set address write function*/
- device_driver.phy_xx_address_write = &rf_address_write;
- /*Set RF extension function*/
- device_driver.phy_xx_extension = &rf_extension;
- /*Set RF state control function*/
- device_driver.phy_xx_state_control = &rf_interface_state_control;
- /*Set transmit function*/
- device_driver.phy_xx_tx = &rf_start_cca;
- printf("RF Device Registration...");
- /*Register device driver*/
- rf_radio_driver_id = arm_net_phy_register(&device_driver);
- printf("OK\r\n");
- return rf_radio_driver_id;
-}
-
