HelloWorld_IDS01A4 mbed application for Spirit1 P2P demo.

Dependencies:   mbed

Fork of HelloWorld_IDS01A5_Program by rosarium pila

mbed 2.0 (a.k.a classic) HelloWorld example for Spirit1 to transfer data from one node to another.
To send the predefined data packet from the sender to the receiver, user needs to press User Button on the board. The LED on the receiver expansion board will toggle on reception of data successfully.
Data packets sent and received can be seen on USB serial terminal.

EVALUATION BOARDS RF FREQUENCY DESCRIPTION :
X-NUCLEO-IDS01A4 868 MHz 868 MHz RF expansion board based on SPIRIT1

Committer:
rosarium
Date:
Thu May 25 16:38:55 2017 +0000
Revision:
0:2ddc0583bcec
First draft version of HelloWorld_IDS01A5

Who changed what in which revision?

UserRevisionLine numberNew contents of line
rosarium 0:2ddc0583bcec 1 /**
rosarium 0:2ddc0583bcec 2 ******************************************************************************
rosarium 0:2ddc0583bcec 3 * @file stm32l-spirit1-config.h
rosarium 0:2ddc0583bcec 4 * @author MCD Application Team
rosarium 0:2ddc0583bcec 5 * @version V3.4.0
rosarium 0:2ddc0583bcec 6 * @date 29-June-2012
rosarium 0:2ddc0583bcec 7 * @brief Evaluation board specific configuration file.
rosarium 0:2ddc0583bcec 8 ******************************************************************************
rosarium 0:2ddc0583bcec 9 * @attention
rosarium 0:2ddc0583bcec 10 *
rosarium 0:2ddc0583bcec 11 * <h2><center>&copy; COPYRIGHT 2012 STMicroelectronics</center></h2>
rosarium 0:2ddc0583bcec 12 *
rosarium 0:2ddc0583bcec 13 * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
rosarium 0:2ddc0583bcec 14 * You may not use this file except in compliance with the License.
rosarium 0:2ddc0583bcec 15 * You may obtain a copy of the License at:
rosarium 0:2ddc0583bcec 16 *
rosarium 0:2ddc0583bcec 17 * http://www.st.com/software_license_agreement_liberty_v2
rosarium 0:2ddc0583bcec 18 *
rosarium 0:2ddc0583bcec 19 * Unless required by applicable law or agreed to in writing, software
rosarium 0:2ddc0583bcec 20 * distributed under the License is distributed on an "AS IS" BASIS,
rosarium 0:2ddc0583bcec 21 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
rosarium 0:2ddc0583bcec 22 * See the License for the specific language governing permissions and
rosarium 0:2ddc0583bcec 23 * limitations under the License.
rosarium 0:2ddc0583bcec 24 *
rosarium 0:2ddc0583bcec 25 ******************************************************************************
rosarium 0:2ddc0583bcec 26 */
rosarium 0:2ddc0583bcec 27
rosarium 0:2ddc0583bcec 28 /* Define to prevent recursive inclusion -------------------------------------*/
rosarium 0:2ddc0583bcec 29 #ifndef __STM32L_SPIRIT1_CONFIG_H
rosarium 0:2ddc0583bcec 30 #define __STM32L_SPIRIT1_CONFIG_H
rosarium 0:2ddc0583bcec 31
rosarium 0:2ddc0583bcec 32 /* Includes ------------------------------------------------------------------*/
rosarium 0:2ddc0583bcec 33
rosarium 0:2ddc0583bcec 34 /* Exported types ------------------------------------------------------------*/
rosarium 0:2ddc0583bcec 35 /* Exported constants --------------------------------------------------------*/
rosarium 0:2ddc0583bcec 36
rosarium 0:2ddc0583bcec 37 /* Define the STM32F10x hardware depending on the used evaluation board */
rosarium 0:2ddc0583bcec 38 #ifdef USE_STM3210B_EVAL
rosarium 0:2ddc0583bcec 39 #define USB_DISCONNECT GPIOD
rosarium 0:2ddc0583bcec 40 #define USB_DISCONNECT_PIN GPIO_PIN_9
rosarium 0:2ddc0583bcec 41 #define RCC_APB2Periph_GPIO_DISCONNECT RCC_APB2Periph_GPIOD
rosarium 0:2ddc0583bcec 42 #define EVAL_COM1_IRQHandler USART1_IRQHandler
rosarium 0:2ddc0583bcec 43
rosarium 0:2ddc0583bcec 44 #elif defined (USE_STM3210E_EVAL)
rosarium 0:2ddc0583bcec 45 #define USB_DISCONNECT GPIOB
rosarium 0:2ddc0583bcec 46 #define USB_DISCONNECT_PIN GPIO_PIN_14
rosarium 0:2ddc0583bcec 47 #define RCC_APB2Periph_GPIO_DISCONNECT RCC_APB2Periph_GPIOB
rosarium 0:2ddc0583bcec 48 #define EVAL_COM1_IRQHandler USART1_IRQHandler
rosarium 0:2ddc0583bcec 49
rosarium 0:2ddc0583bcec 50 #elif defined (USE_STM3210C_EVAL)
rosarium 0:2ddc0583bcec 51 #define USB_DISCONNECT 0
rosarium 0:2ddc0583bcec 52 #define USB_DISCONNECT_PIN 0
rosarium 0:2ddc0583bcec 53 #define RCC_APB2Periph_GPIO_DISCONNECT 0
rosarium 0:2ddc0583bcec 54 #define EVAL_COM1_IRQHandler USART2_IRQHandler
rosarium 0:2ddc0583bcec 55
rosarium 0:2ddc0583bcec 56 #elif defined (USE_STM32L152_EVAL) || defined (USE_STM32L152D_EVAL)
rosarium 0:2ddc0583bcec 57 /*
rosarium 0:2ddc0583bcec 58 For STM32L15xx devices it is possible to use the internal USB pullup
rosarium 0:2ddc0583bcec 59 controlled by register SYSCFG_PMC (refer to RM0038 reference manual for
rosarium 0:2ddc0583bcec 60 more details).
rosarium 0:2ddc0583bcec 61 It is also possible to use external pullup (and disable the internal pullup)
rosarium 0:2ddc0583bcec 62 by setting the define USB_USE_EXTERNAL_PULLUP in file platform_config.h
rosarium 0:2ddc0583bcec 63 and configuring the right pin to be used for the external pull up configuration.
rosarium 0:2ddc0583bcec 64 To have more details on how to use an external pull up, please refer to
rosarium 0:2ddc0583bcec 65 STM3210E-EVAL evaluation board manuals.
rosarium 0:2ddc0583bcec 66 */
rosarium 0:2ddc0583bcec 67 /* Uncomment the following define to use an external pull up instead of the
rosarium 0:2ddc0583bcec 68 integrated STM32L15xx internal pull up. In this case make sure to set up
rosarium 0:2ddc0583bcec 69 correctly the external required hardware and the GPIO defines below.*/
rosarium 0:2ddc0583bcec 70 /* #define USB_USE_EXTERNAL_PULLUP */
rosarium 0:2ddc0583bcec 71
rosarium 0:2ddc0583bcec 72 #if !defined(USB_USE_EXTERNAL_PULLUP)
rosarium 0:2ddc0583bcec 73 #define STM32L15_USB_CONNECT SYSCFG_USBPuCmd(ENABLE)
rosarium 0:2ddc0583bcec 74 #define STM32L15_USB_DISCONNECT SYSCFG_USBPuCmd(DISABLE)
rosarium 0:2ddc0583bcec 75
rosarium 0:2ddc0583bcec 76 #elif defined(USB_USE_EXTERNAL_PULLUP)
rosarium 0:2ddc0583bcec 77 /* PA0 is chosen just as illustrating example, you should modify the defines
rosarium 0:2ddc0583bcec 78 below according to your hardware configuration. */
rosarium 0:2ddc0583bcec 79 #define USB_DISCONNECT GPIOA
rosarium 0:2ddc0583bcec 80 #define USB_DISCONNECT_PIN GPIO_PIN_0
rosarium 0:2ddc0583bcec 81 #define RCC_AHBPeriph_GPIO_DISCONNECT RCC_AHBPeriph_GPIOA
rosarium 0:2ddc0583bcec 82 #define STM32L15_USB_CONNECT GPIO_ResetBits(USB_DISCONNECT, USB_DISCONNECT_PIN)
rosarium 0:2ddc0583bcec 83 #define STM32L15_USB_DISCONNECT GPIO_SetBits(USB_DISCONNECT, USB_DISCONNECT_PIN)
rosarium 0:2ddc0583bcec 84 #endif /* USB_USE_EXTERNAL_PULLUP */
rosarium 0:2ddc0583bcec 85
rosarium 0:2ddc0583bcec 86 #ifdef USE_STM32L152_EVAL
rosarium 0:2ddc0583bcec 87 #define EVAL_COM1_IRQHandler USART2_IRQHandler
rosarium 0:2ddc0583bcec 88 #elif defined (USE_STM32L152D_EVAL)
rosarium 0:2ddc0583bcec 89 #define EVAL_COM1_IRQHandler USART1_IRQHandler
rosarium 0:2ddc0583bcec 90 #endif /*USE_STM32L152_EVAL*/
rosarium 0:2ddc0583bcec 91
rosarium 0:2ddc0583bcec 92 #endif /* USE_STM3210B_EVAL */
rosarium 0:2ddc0583bcec 93
rosarium 0:2ddc0583bcec 94 /* Exported macro ------------------------------------------------------------*/
rosarium 0:2ddc0583bcec 95 /* Exported functions ------------------------------------------------------- */
rosarium 0:2ddc0583bcec 96
rosarium 0:2ddc0583bcec 97 #endif /* __STM32L_SPIRIT1_CONFIG_H */
rosarium 0:2ddc0583bcec 98 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/