STM32WLxx_Nucleo BSP User Manual: STM32WLxx_Nucleo BSP Drivers

STM32WLxx_Nucleo BSP User Manual
  • Main Page
  • Modules
  • Files
  • Directories
STM32WLxx_Nucleo BSP Drivers

BSP Drivers User Manual

This document contains the User Manual (UM) of the STM32WLxx_Nucleo BSP peripheral Firmware drivers.

Document tabsheets description:

  • "Modules" : List the different modules.
  • "Files" : List all the files and globals.
  • "Directories" : Firmware Directory hierarchy.

Revision History:

Date | Revision | Author | Development Platform
11/04/2022 | V1.0 |  | STM32WLxx_Nucleo Board
Generated on Fri Nov 4 2022 08:58:15 for STM32WLxx_Nucleo BSP User Manual by doxygen 1.7.6.1


STM32WLxx_Nucleo BSP User Manual: LOW LEVEL Exported Variables

  • Files
  • Directories
Variables
LOW LEVEL Exported Variables
LOW LEVEL

Variables

EXTI_HandleTypeDef | hpb_exti [BUTTONn]
EXTI_HandleTypeDef | hpb_exti []

Variable Documentation

EXTI_HandleTypeDef hpb_exti[BUTTONn]

Definition at line 46 of file stm32wlxx_nucleo.c.

Referenced by BSP_PB_Init(), and BSP_PB_IRQHandler().

EXTI_HandleTypeDef hpb_exti[]

Definition at line 46 of file stm32wlxx_nucleo.c.

Referenced by BSP_PB_Init(), and BSP_PB_IRQHandler().


STM32WLxx_Nucleo BSP User Manual: LOW LEVEL Private Defines

LOW LEVEL Private Defines
LOW LEVEL


STM32WLxx_Nucleo BSP User Manual: LOW LEVEL Private Typedef

Typedefs
LOW LEVEL Private Typedef
LOW LEVEL

Typedefs

typedef void(* BSP_EXTI_LineCallback )(void)

Typedef Documentation

typedef void(* BSP_EXTI_LineCallback)(void)

Definition at line 81 of file stm32wlxx_nucleo.c.


STM32WLxx_Nucleo BSP User Manual: LOW LEVEL Private Variables

Variables
LOW LEVEL Private Variables
LOW LEVEL

Variables

static GPIO_TypeDef * | LED_PORT [LEDn] = {LED1_GPIO_PORT, LED2_GPIO_PORT, LED3_GPIO_PORT}
static const uint16_t | LED_PIN [LEDn] = {LED1_PIN, LED2_PIN, LED3_PIN}
static GPIO_TypeDef * | BUTTON_PORT [BUTTONn] = {BUTTON_SW1_GPIO_PORT, BUTTON_SW2_GPIO_PORT, BUTTON_SW3_GPIO_PORT}
static const uint16_t | BUTTON_PIN [BUTTONn] = {BUTTON_SW1_PIN, BUTTON_SW2_PIN, BUTTON_SW3_PIN}
static const IRQn_Type | BUTTON_IRQn [BUTTONn] = {BUTTON_SW1_EXTI_IRQn, BUTTON_SW2_EXTI_IRQn, BUTTON_SW3_EXTI_IRQn}

Variable Documentation

const IRQn_Type BUTTON_IRQn[BUTTONn] = {BUTTON_SW1_EXTI_IRQn, BUTTON_SW2_EXTI_IRQn, BUTTON_SW3_EXTI_IRQn} [static]

Definition at line 97 of file stm32wlxx_nucleo.c.

Referenced by BSP_PB_DeInit(), and BSP_PB_Init().

const uint16_t BUTTON_PIN[BUTTONn] = {BUTTON_SW1_PIN, BUTTON_SW2_PIN, BUTTON_SW3_PIN} [static]

Definition at line 95 of file stm32wlxx_nucleo.c.

Referenced by BSP_PB_DeInit(), BSP_PB_GetState(), and BSP_PB_Init().

GPIO_TypeDef* BUTTON_PORT[BUTTONn] = {BUTTON_SW1_GPIO_PORT, BUTTON_SW2_GPIO_PORT, BUTTON_SW3_GPIO_PORT} [static]

Definition at line 93 of file stm32wlxx_nucleo.c.

Referenced by BSP_PB_DeInit(), BSP_PB_GetState(), and BSP_PB_Init().

const uint16_t LED_PIN[LEDn] = {LED1_PIN, LED2_PIN, LED3_PIN} [static]

Definition at line 91 of file stm32wlxx_nucleo.c.

Referenced by BSP_LED_DeInit(), BSP_LED_GetState(), BSP_LED_Init(), BSP_LED_Off(), BSP_LED_On(), and BSP_LED_Toggle().

GPIO_TypeDef* LED_PORT[LEDn] = {LED1_GPIO_PORT, LED2_GPIO_PORT, LED3_GPIO_PORT} [static]

Definition at line 89 of file stm32wlxx_nucleo.c.

Referenced by BSP_LED_DeInit(), BSP_LED_GetState(), BSP_LED_Init(), BSP_LED_Off(), BSP_LED_On(), and BSP_LED_Toggle().


STM32WLxx_Nucleo BSP User Manual: LOW LEVEL Private Functions

Functions
LOW LEVEL Private Functions
LOW LEVEL

Functions

static void | BUTTON_SW1_EXTI_Callback (void)
Button SW1 EXTI line detection callback.
static void | BUTTON_SW2_EXTI_Callback (void)
Button SW2 EXTI line detection callback.
static void | BUTTON_SW3_EXTI_Callback (void)
Button SW3 EXTI line detection callback.

Function Documentation

static void BUTTON_SW1_EXTI_Callback ( void ) [static]

Button SW1 EXTI line detection callback.

Return values:
None

Definition at line 619 of file stm32wlxx_nucleo.c.

References BSP_PB_Callback(), and BUTTON_SW1.

Referenced by BSP_PB_Init().

static void BUTTON_SW2_EXTI_Callback ( void ) [static]

Button SW2 EXTI line detection callback.

Return values:
None

Definition at line 628 of file stm32wlxx_nucleo.c.

References BSP_PB_Callback(), and BUTTON_SW2.

Referenced by BSP_PB_Init().

static void BUTTON_SW3_EXTI_Callback ( void ) [static]

Button SW3 EXTI line detection callback.

Return values:
None

Definition at line 637 of file stm32wlxx_nucleo.c.

References BSP_PB_Callback(), and BUTTON_SW3.

Referenced by BSP_PB_Init().


STM32WLxx_Nucleo BSP User Manual: LOW LEVEL Exported Types

Enumerations
LOW LEVEL Exported Types
LOW LEVEL

Enumerations

enum Led_TypeDef {
LED1 = 0, LED2 = 1, LED3 = 2, LED_BLUE = LED1,
LED_GREEN = LED2, LED_RED = LED3
}
enum | Button_TypeDef { BUTTON_SW1 = 0, BUTTON_SW2 = 1, BUTTON_SW3 = 2 }
enum | ButtonMode_TypeDef { BUTTON_MODE_GPIO = 0, BUTTON_MODE_EXTI = 1 }
enum | Presence_TypeDef { ABSENT = 0, PRESENT = 1 }

Enumeration Type Documentation

enum Button_TypeDef
Enumerator:
BUTTON_SW1
BUTTON_SW2
BUTTON_SW3

Definition at line 65 of file stm32wlxx_nucleo.h.

enum ButtonMode_TypeDef
Enumerator:
BUTTON_MODE_GPIO
BUTTON_MODE_EXTI

Definition at line 72 of file stm32wlxx_nucleo.h.

enum Led_TypeDef
Enumerator:
LED1
LED2
LED3
LED_BLUE
LED_GREEN
LED_RED

Definition at line 54 of file stm32wlxx_nucleo.h.

enum Presence_TypeDef
Enumerator:
ABSENT
PRESENT

Definition at line 131 of file stm32wlxx_nucleo.h.


STM32WLxx_Nucleo BSP User Manual: LOW LEVEL LED Constants

Defines
LOW LEVEL LED Constants
LOW LEVEL Exported Constants

Define for STM32WLXX_NUCLEO board. More...

Defines

#define | LEDn 3
#define | LED1_PIN GPIO_PIN_15
#define | LED1_GPIO_PORT GPIOB
#define | LED1_GPIO_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE()
#define | LED1_GPIO_CLK_DISABLE() __HAL_RCC_GPIOB_CLK_DISABLE()
#define | LED2_PIN GPIO_PIN_9
#define | LED2_GPIO_PORT GPIOB
#define | LED2_GPIO_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE()
#define | LED2_GPIO_CLK_DISABLE() __HAL_RCC_GPIOB_CLK_DISABLE()
#define | LED3_PIN GPIO_PIN_11
#define | LED3_GPIO_PORT GPIOB
#define | LED3_GPIO_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE()
#define | LED3_GPIO_CLK_DISABLE() __HAL_RCC_GPIOB_CLK_DISABLE()
#define | LEDx_GPIO_CLK_ENABLE(__INDEX__) __HAL_RCC_GPIOB_CLK_ENABLE() /* All Led on same port */
#define | LEDx_GPIO_CLK_DISABLE(__INDEX__) __HAL_RCC_GPIOB_CLK_DISABLE() /* All Led on same port */

Detailed Description

Define for STM32WLXX_NUCLEO board.

Define Documentation

#define LED1_GPIO_CLK_DISABLE ( ) __HAL_RCC_GPIOB_CLK_DISABLE()

Definition at line 171 of file stm32wlxx_nucleo.h.

#define LED1_GPIO_CLK_ENABLE ( ) __HAL_RCC_GPIOB_CLK_ENABLE()

Definition at line 170 of file stm32wlxx_nucleo.h.

#define LED1_GPIO_PORT GPIOB

Definition at line 169 of file stm32wlxx_nucleo.h.

#define LED1_PIN GPIO_PIN_15

Definition at line 168 of file stm32wlxx_nucleo.h.

#define LED2_GPIO_CLK_DISABLE ( ) __HAL_RCC_GPIOB_CLK_DISABLE()

Definition at line 176 of file stm32wlxx_nucleo.h.

#define LED2_GPIO_CLK_ENABLE ( ) __HAL_RCC_GPIOB_CLK_ENABLE()

Definition at line 175 of file stm32wlxx_nucleo.h.

#define LED2_GPIO_PORT GPIOB

Definition at line 174 of file stm32wlxx_nucleo.h.

#define LED2_PIN GPIO_PIN_9

Definition at line 173 of file stm32wlxx_nucleo.h.

#define LED3_GPIO_CLK_DISABLE ( ) __HAL_RCC_GPIOB_CLK_DISABLE()

Definition at line 181 of file stm32wlxx_nucleo.h.

#define LED3_GPIO_CLK_ENABLE ( ) __HAL_RCC_GPIOB_CLK_ENABLE()

Definition at line 180 of file stm32wlxx_nucleo.h.

#define LED3_GPIO_PORT GPIOB

Definition at line 179 of file stm32wlxx_nucleo.h.

#define LED3_PIN GPIO_PIN_11

Definition at line 178 of file stm32wlxx_nucleo.h.

#define LEDn 3

Definition at line 166 of file stm32wlxx_nucleo.h.

#define LEDx_GPIO_CLK_DISABLE ( __INDEX__ ) __HAL_RCC_GPIOB_CLK_DISABLE() /* All Led on same port */

Definition at line 184 of file stm32wlxx_nucleo.h.

#define LEDx_GPIO_CLK_ENABLE ( __INDEX__ ) __HAL_RCC_GPIOB_CLK_ENABLE() /* All Led on same port */

Definition at line 183 of file stm32wlxx_nucleo.h.

Referenced by BSP_LED_Init().


STM32WLxx_Nucleo BSP User Manual: LOW LEVEL BUTTON Constants

Defines
LOW LEVEL BUTTON Constants
LOW LEVEL Exported Constants

Defines

#define | BUTTONn 3
#define | BUTTON_SW1_PIN GPIO_PIN_0
Key push-buttons.
#define | BUTTON_SW1_GPIO_PORT GPIOA
#define | BUTTON_SW1_GPIO_CLK_ENABLE() __HAL_RCC_GPIOA_CLK_ENABLE()
#define | BUTTON_SW1_GPIO_CLK_DISABLE() __HAL_RCC_GPIOA_CLK_DISABLE()
#define | BUTTON_SW1_EXTI_LINE EXTI_LINE_0
#define | BUTTON_SW1_EXTI_IRQn EXTI0_IRQn
#define | H_EXTI_0 hpb_exti[BUTTON_SW1]
#define | BUTTON_SW2_PIN GPIO_PIN_1
#define | BUTTON_SW2_GPIO_PORT GPIOA
#define | BUTTON_SW2_GPIO_CLK_ENABLE() __HAL_RCC_GPIOA_CLK_ENABLE()
#define | BUTTON_SW2_GPIO_CLK_DISABLE() __HAL_RCC_GPIOA_CLK_DISABLE()
#define | BUTTON_SW2_EXTI_LINE EXTI_LINE_1
#define | BUTTON_SW2_EXTI_IRQn EXTI1_IRQn
#define | H_EXTI_1 hpb_exti[BUTTON_SW2]
#define | BUTTON_SW3_PIN GPIO_PIN_6
#define | BUTTON_SW3_GPIO_PORT GPIOC
#define | BUTTON_SW3_GPIO_CLK_ENABLE() __HAL_RCC_GPIOC_CLK_ENABLE()
#define | BUTTON_SW3_GPIO_CLK_DISABLE() __HAL_RCC_GPIOC_CLK_DISABLE()
#define | BUTTON_SW3_EXTI_LINE EXTI_LINE_6
#define | BUTTON_SW3_EXTI_IRQn EXTI9_5_IRQn
#define | H_EXTI_6 hpb_exti[BUTTON_SW3]
#define | BUTTONx_GPIO_CLK_ENABLE(__INDEX__)
#define | BUTTONx_GPIO_CLK_DISABLE(__INDEX__)

Define Documentation

#define BUTTON_SW1_EXTI_IRQn EXTI0_IRQn

Definition at line 205 of file stm32wlxx_nucleo.h.

#define BUTTON_SW1_EXTI_LINE EXTI_LINE_0

Definition at line 201 of file stm32wlxx_nucleo.h.

Referenced by BSP_PB_Init().

#define BUTTON_SW1_GPIO_CLK_DISABLE ( ) __HAL_RCC_GPIOA_CLK_DISABLE()

Definition at line 200 of file stm32wlxx_nucleo.h.

#define BUTTON_SW1_GPIO_CLK_ENABLE ( ) __HAL_RCC_GPIOA_CLK_ENABLE()

Definition at line 199 of file stm32wlxx_nucleo.h.

#define BUTTON_SW1_GPIO_PORT GPIOA

Definition at line 198 of file stm32wlxx_nucleo.h.

#define BUTTON_SW1_PIN GPIO_PIN_0

Key push-buttons.

Definition at line 197 of file stm32wlxx_nucleo.h.

#define BUTTON_SW2_EXTI_IRQn EXTI1_IRQn

Definition at line 217 of file stm32wlxx_nucleo.h.

#define BUTTON_SW2_EXTI_LINE EXTI_LINE_1

Definition at line 213 of file stm32wlxx_nucleo.h.

Referenced by BSP_PB_Init().

#define BUTTON_SW2_GPIO_CLK_DISABLE ( ) __HAL_RCC_GPIOA_CLK_DISABLE()

Definition at line 212 of file stm32wlxx_nucleo.h.

#define BUTTON_SW2_GPIO_CLK_ENABLE ( ) __HAL_RCC_GPIOA_CLK_ENABLE()

Definition at line 211 of file stm32wlxx_nucleo.h.

#define BUTTON_SW2_GPIO_PORT GPIOA

Definition at line 210 of file stm32wlxx_nucleo.h.

#define BUTTON_SW2_PIN GPIO_PIN_1

Definition at line 209 of file stm32wlxx_nucleo.h.

#define BUTTON_SW3_EXTI_IRQn EXTI9_5_IRQn

Definition at line 229 of file stm32wlxx_nucleo.h.

#define BUTTON_SW3_EXTI_LINE EXTI_LINE_6

Definition at line 225 of file stm32wlxx_nucleo.h.

Referenced by BSP_PB_Init().

#define BUTTON_SW3_GPIO_CLK_DISABLE ( ) __HAL_RCC_GPIOC_CLK_DISABLE()

Definition at line 224 of file stm32wlxx_nucleo.h.

#define BUTTON_SW3_GPIO_CLK_ENABLE ( ) __HAL_RCC_GPIOC_CLK_ENABLE()

Definition at line 223 of file stm32wlxx_nucleo.h.

#define BUTTON_SW3_GPIO_PORT GPIOC

Definition at line 222 of file stm32wlxx_nucleo.h.

#define BUTTON_SW3_PIN GPIO_PIN_6

Definition at line 221 of file stm32wlxx_nucleo.h.

#define BUTTONn 3

Definition at line 192 of file stm32wlxx_nucleo.h.

Referenced by BSP_PB_Init().

#define BUTTONx_GPIO_CLK_DISABLE ( __INDEX__ )
Value:
do { if ((__INDEX__) == BUTTON_SW1) BUTTON_SW1_GPIO_CLK_DISABLE(); else \
                                              if ((__INDEX__) == BUTTON_SW2) BUTTON_SW2_GPIO_CLK_DISABLE(); else \
                                              if ((__INDEX__) == BUTTON_SW3) BUTTON_SW3_GPIO_CLK_DISABLE();} while(0)

Definition at line 237 of file stm32wlxx_nucleo.h.

#define BUTTONx_GPIO_CLK_ENABLE ( __INDEX__ )
Value:
do { if ((__INDEX__) == BUTTON_SW1) BUTTON_SW1_GPIO_CLK_ENABLE(); else \
                                              if ((__INDEX__) == BUTTON_SW2) BUTTON_SW2_GPIO_CLK_ENABLE(); else \
                                              if ((__INDEX__) == BUTTON_SW3) BUTTON_SW3_GPIO_CLK_ENABLE();} while(0)

Definition at line 233 of file stm32wlxx_nucleo.h.

Referenced by BSP_PB_Init().

#define H_EXTI_0 hpb_exti[BUTTON_SW1]

Definition at line 207 of file stm32wlxx_nucleo.h.

#define H_EXTI_1 hpb_exti[BUTTON_SW2]

Definition at line 219 of file stm32wlxx_nucleo.h.

#define H_EXTI_6 hpb_exti[BUTTON_SW3]

Definition at line 231 of file stm32wlxx_nucleo.h.


STM32WLxx_Nucleo BSP User Manual: LOW LEVEL Exported Constants

Modules | Defines
LOW LEVEL Exported Constants
LOW LEVEL

Modules

LOW LEVEL LED Constants

Define for STM32WLXX_NUCLEO board.

LOW LEVEL BUTTON Constants

Defines

#define | __STM32WLXX_NUCLEO_BSP_VERSION_MAIN (0x01U)
STM32WLXX NUCLEO BSP Driver version number.
#define | __STM32WLXX_NUCLEO_BSP_VERSION_SUB1 (0x03U)
#define | __STM32WLXX_NUCLEO_BSP_VERSION_SUB2 (0x00U)
#define | __STM32WLXX_NUCLEO_BSP_VERSION_RC (0x00U)
#define | __STM32WLXX_NUCLEO_BSP_VERSION

Define Documentation

#define __STM32WLXX_NUCLEO_BSP_VERSION
Value:
((__STM32WLXX_NUCLEO_BSP_VERSION_MAIN << 24)\
                                              |(__STM32WLXX_NUCLEO_BSP_VERSION_SUB1 << 16)\
                                              |(__STM32WLXX_NUCLEO_BSP_VERSION_SUB2 << 8 )\
                                              |(__STM32WLXX_NUCLEO_BSP_VERSION_RC))

Definition at line 151 of file stm32wlxx_nucleo.h.

Referenced by BSP_GetVersion().

#define __STM32WLXX_NUCLEO_BSP_VERSION_MAIN (0x01U)

STM32WLXX NUCLEO BSP Driver version number.

[31:24] main version

Definition at line 147 of file stm32wlxx_nucleo.h.

#define __STM32WLXX_NUCLEO_BSP_VERSION_RC (0x00U)

[7:0] release candidate

Definition at line 150 of file stm32wlxx_nucleo.h.

#define __STM32WLXX_NUCLEO_BSP_VERSION_SUB1 (0x03U)

[23:16] sub1 version

Definition at line 148 of file stm32wlxx_nucleo.h.

#define __STM32WLXX_NUCLEO_BSP_VERSION_SUB2 (0x00U)

[15:8] sub2 version

Definition at line 149 of file stm32wlxx_nucleo.h.


STM32WLxx_Nucleo BSP User Manual: LOW LEVEL LED Functions

Functions
LOW LEVEL LED Functions
LOW LEVEL Exported Functions

Functions

int32_t | BSP_LED_Init (Led_TypeDef Led)
Configures LED GPIO.
int32_t | BSP_LED_DeInit (Led_TypeDef Led)
DeInit LEDs.
int32_t | BSP_LED_On (Led_TypeDef Led)
Turns selected LED On.
int32_t | BSP_LED_Off (Led_TypeDef Led)
Turns selected LED Off.
int32_t | BSP_LED_Toggle (Led_TypeDef Led)
Toggles the selected LED.
int32_t | BSP_LED_GetState (Led_TypeDef Led)
Get the status of the selected LED.

Function Documentation

int32_t BSP_LED_DeInit ( Led_TypeDef Led )

DeInit LEDs.

Parameters:
Led,: LED to be de-init. This parameter can be one of the following values:
  • LED1
  • LED2
  • LED3
Note:
Led DeInit does not disable the GPIO clock nor disable the Mfx
Return values:
BSP status

Definition at line 184 of file stm32wlxx_nucleo.c.

References BSP_ERROR_NONE, LED_PIN, and LED_PORT.

int32_t BSP_LED_GetState ( Led_TypeDef Led )

Get the status of the selected LED.

Parameters:
Led Specifies the Led to get its state. This parameter can be one of following parameters:
  • LED1
  • LED2
  • LED3
Return values:
LED status

Definition at line 252 of file stm32wlxx_nucleo.c.

References LED_PIN, and LED_PORT.

int32_t BSP_LED_Init ( Led_TypeDef Led )

Configures LED GPIO.

Parameters:
Led,: LED to be configured. This parameter can be one of the following values:
  • LED1
  • LED2
  • LED3
Return values:
BSP status

Definition at line 155 of file stm32wlxx_nucleo.c.

References BSP_ERROR_NONE, LED_PIN, LED_PORT, and LEDx_GPIO_CLK_ENABLE.

int32_t BSP_LED_Off ( Led_TypeDef Led )

Turns selected LED Off.

Parameters:
Led,: Specifies the Led to be set off. This parameter can be one of the following values:
  • LED1
  • LED2
  • LED3
Return values:
BSP status

Definition at line 220 of file stm32wlxx_nucleo.c.

References BSP_ERROR_NONE, LED_PIN, and LED_PORT.

int32_t BSP_LED_On ( Led_TypeDef Led )

Turns selected LED On.

Parameters:
Led,: Specifies the Led to be set on. This parameter can be one of the following values:
  • LED1
  • LED2
  • LED3
Return values:
BSP status

Definition at line 204 of file stm32wlxx_nucleo.c.

References BSP_ERROR_NONE, LED_PIN, and LED_PORT.

int32_t BSP_LED_Toggle ( Led_TypeDef Led )

Toggles the selected LED.

Parameters:
Led,: Specifies the Led to be toggled. This parameter can be one of the following values:
  • LED1
  • LED2
  • LED3
Return values:
BSP status

Definition at line 236 of file stm32wlxx_nucleo.c.

References BSP_ERROR_NONE, LED_PIN, and LED_PORT.


STM32WLxx_Nucleo BSP User Manual: LOW LEVEL BUTTON Functions

Functions
LOW LEVEL BUTTON Functions
LOW LEVEL Exported Functions

Functions

int32_t | BSP_PB_Init (Button_TypeDef Button, ButtonMode_TypeDef ButtonMode)
Configures Button GPIO and EXTI Line.
int32_t | BSP_PB_DeInit (Button_TypeDef Button)
Push Button DeInit.
int32_t | BSP_PB_GetState (Button_TypeDef Button)
Returns the selected Button state.
void | BSP_PB_IRQHandler (Button_TypeDef Button)
This function handles Push-Button interrupt requests.
__weak void | BSP_PB_Callback (Button_TypeDef Button)
BSP Push Button callback.

Function Documentation

void BSP_PB_Callback ( Button_TypeDef Button )

BSP Push Button callback.

Parameters:
Button,: Specifies the Button to be checked. This parameter can be one of following parameters:
  • BUTTON_SW1
  • BUTTON_SW2
  • BUTTON_SW3
Return values:
None.

Definition at line 368 of file stm32wlxx_nucleo.c.

Referenced by BUTTON_SW1_EXTI_Callback(), BUTTON_SW2_EXTI_Callback(), and BUTTON_SW3_EXTI_Callback().

int32_t BSP_PB_DeInit ( Button_TypeDef Button )

Push Button DeInit.

Parameters:
Button,: Button to be configured This parameter can be one of following parameters:
  • BUTTON_SW1
  • BUTTON_SW2
  • BUTTON_SW3
Note:
PB DeInit does not disable the GPIO clock
Return values:
BSP status

Definition at line 327 of file stm32wlxx_nucleo.c.

References BSP_ERROR_NONE, BUTTON_IRQn, BUTTON_PIN, and BUTTON_PORT.

int32_t BSP_PB_GetState ( Button_TypeDef Button )

Returns the selected Button state.

Parameters:
Button,: Specifies the Button to be checked. This parameter can be one of following parameters:
  • BUTTON_SW1
  • BUTTON_SW2
  • BUTTON_SW3
Return values:
The Button GPIO pin value.

Definition at line 344 of file stm32wlxx_nucleo.c.

References BUTTON_PIN, and BUTTON_PORT.

int32_t BSP_PB_Init | ( | Button_TypeDef | Button,
 |  | ButtonMode_TypeDef | ButtonMode
 | ) |  |

Configures Button GPIO and EXTI Line.

Parameters:
Button,: Specifies the Button to be configured. This parameter can be one of following parameters:
  • BUTTON_SW1
  • BUTTON_SW2
  • BUTTON_SW3
ButtonMode,: Specifies Button mode. This parameter can be one of following parameters:
  • BUTTON_MODE_GPIO: Button will be used as simple IO
  • BUTTON_MODE_EXTI: Button will be connected to EXTI line with interrupt generation capability
Return values:
BSP status

Definition at line 279 of file stm32wlxx_nucleo.c.

References BSP_BUTTON_USER_IT_PRIORITY, BSP_ERROR_NONE, BUTTON_IRQn, BUTTON_MODE_GPIO, BUTTON_PIN, BUTTON_PORT, BUTTON_SW1_EXTI_Callback(), BUTTON_SW1_EXTI_LINE, BUTTON_SW2_EXTI_Callback(), BUTTON_SW2_EXTI_LINE, BUTTON_SW3_EXTI_Callback(), BUTTON_SW3_EXTI_LINE, BUTTONn, BUTTONx_GPIO_CLK_ENABLE, and hpb_exti.

void BSP_PB_IRQHandler ( Button_TypeDef Button )

This function handles Push-Button interrupt requests.

Parameters:
Button Specifies the pin connected EXTI line
Return values:
None

Definition at line 354 of file stm32wlxx_nucleo.c.

References hpb_exti.


STM32WLxx_Nucleo BSP User Manual: LOW LEVEL Exported Functions

Modules | Functions
LOW LEVEL Exported Functions
LOW LEVEL

Modules

LOW LEVEL LED Functions
LOW LEVEL BUTTON Functions

Functions

uint32_t BSP_GetVersion (void)
This method returns the STM32WLXX NUCLEO BSP Driver revision.

Function Documentation

uint32_t BSP_GetVersion ( void )

This method returns the STM32WLXX NUCLEO BSP Driver revision.

Return values:
version,: 0xXYZR (8bits for each decimal, R for RC)

Definition at line 137 of file stm32wlxx_nucleo.c.

References __STM32WLXX_NUCLEO_BSP_VERSION.


STM32WLxx_Nucleo BSP User Manual: Exported Constants

Defines
Exported Constants
CONFIG

Defines

#define | USE_BSP_COM_FEATURE 0U
#define | USE_COM_LOG 0U
#define | BSP_BUTTON_USER_IT_PRIORITY 15U

Define Documentation

#define BSP_BUTTON_USER_IT_PRIORITY 15U

Definition at line 52 of file stm32wlxx_nucleo_conf_template.h.

Referenced by BSP_PB_Init().

#define USE_BSP_COM_FEATURE 0U

Definition at line 46 of file stm32wlxx_nucleo_conf_template.h.

#define USE_COM_LOG 0U

Definition at line 49 of file stm32wlxx_nucleo_conf_template.h.


STM32WLxx_Nucleo BSP User Manual: RADIO LOW LEVEL Exported Types

Enumerations
RADIO LOW LEVEL Exported Types
RADIO LOW LEVEL

Enumerations

enum | BSP_RADIO_Switch_TypeDef { RADIO_SWITCH_OFF = 0, RADIO_SWITCH_RX = 1, RADIO_SWITCH_RFO_LP = 2, RADIO_SWITCH_RFO_HP = 3 }
enum | BSP_RADIO_RFOMaxPowerConfig_TypeDef { RADIO_RFO_LP_MAXPOWER = 0, RADIO_RFO_HP_MAXPOWER }

Enumeration Type Documentation

enum BSP_RADIO_RFOMaxPowerConfig_TypeDef
Enumerator:
RADIO_RFO_LP_MAXPOWER
RADIO_RFO_HP_MAXPOWER

Definition at line 56 of file stm32wlxx_nucleo_radio.h.

enum BSP_RADIO_Switch_TypeDef
Enumerator:
RADIO_SWITCH_OFF
RADIO_SWITCH_RX
RADIO_SWITCH_RFO_LP
RADIO_SWITCH_RFO_HP

Definition at line 48 of file stm32wlxx_nucleo_radio.h.


STM32WLxx_Nucleo BSP User Manual: RADIO LOW LEVEL RADIO CONFIG Constants

Defines
RADIO LOW LEVEL RADIO CONFIG Constants
RADIO LOW LEVEL Exported Constants

Defines

#define | RADIO_CONF_RFO_LP_HP 0U
#define | RADIO_CONF_RFO_LP 1U
#define | RADIO_CONF_RFO_HP 2U
#define | RADIO_CONF_TCXO_NOT_SUPPORTED 0U
#define | RADIO_CONF_TCXO_SUPPORTED 1U
#define | RADIO_CONF_DCDC_NOT_SUPPORTED 0U
#define | RADIO_CONF_DCDC_SUPPORTED 1U
#define | RADIO_CONF_RFO_HP_MAX_22_dBm ((int32_t) 22)
#define | RADIO_CONF_RFO_HP_MAX_20_dBm ((int32_t) 20)
#define | RADIO_CONF_RFO_HP_MAX_17_dBm ((int32_t) 17)
#define | RADIO_CONF_RFO_HP_MAX_14_dBm ((int32_t) 14)
#define | RADIO_CONF_RFO_LP_MAX_15_dBm ((int32_t) 15)
#define | RADIO_CONF_RFO_LP_MAX_14_dBm ((int32_t) 14)
#define | RADIO_CONF_RFO_LP_MAX_10_dBm ((int32_t) 10)

Define Documentation

#define RADIO_CONF_DCDC_NOT_SUPPORTED 0U

Definition at line 80 of file stm32wlxx_nucleo_radio.h.

#define RADIO_CONF_DCDC_SUPPORTED 1U

Definition at line 81 of file stm32wlxx_nucleo_radio.h.

Referenced by BSP_RADIO_IsDCDC().

#define RADIO_CONF_RFO_HP 2U

Definition at line 75 of file stm32wlxx_nucleo_radio.h.

#define RADIO_CONF_RFO_HP_MAX_14_dBm ((int32_t) 14)

Definition at line 86 of file stm32wlxx_nucleo_radio.h.

#define RADIO_CONF_RFO_HP_MAX_17_dBm ((int32_t) 17)

Definition at line 85 of file stm32wlxx_nucleo_radio.h.

#define RADIO_CONF_RFO_HP_MAX_20_dBm ((int32_t) 20)

Definition at line 84 of file stm32wlxx_nucleo_radio.h.

#define RADIO_CONF_RFO_HP_MAX_22_dBm ((int32_t) 22)

Definition at line 83 of file stm32wlxx_nucleo_radio.h.

Referenced by BSP_RADIO_GetRFOMaxPowerConfig().

#define RADIO_CONF_RFO_LP 1U

Definition at line 74 of file stm32wlxx_nucleo_radio.h.

#define RADIO_CONF_RFO_LP_HP 0U

Definition at line 73 of file stm32wlxx_nucleo_radio.h.

Referenced by BSP_RADIO_GetTxConfig().

#define RADIO_CONF_RFO_LP_MAX_10_dBm ((int32_t) 10)

Definition at line 89 of file stm32wlxx_nucleo_radio.h.

#define RADIO_CONF_RFO_LP_MAX_14_dBm ((int32_t) 14)

Definition at line 88 of file stm32wlxx_nucleo_radio.h.

#define RADIO_CONF_RFO_LP_MAX_15_dBm ((int32_t) 15)

Definition at line 87 of file stm32wlxx_nucleo_radio.h.

Referenced by BSP_RADIO_GetRFOMaxPowerConfig().

#define RADIO_CONF_TCXO_NOT_SUPPORTED 0U

Definition at line 77 of file stm32wlxx_nucleo_radio.h.

#define RADIO_CONF_TCXO_SUPPORTED 1U

Definition at line 78 of file stm32wlxx_nucleo_radio.h.

Referenced by BSP_RADIO_IsTCXO().


STM32WLxx_Nucleo BSP User Manual: RADIO LOW LEVEL RF SWITCH Constants

Defines
RADIO LOW LEVEL RF SWITCH Constants
RADIO LOW LEVEL Exported Constants

Defines

#define | RF_SW_CTRL3_PIN GPIO_PIN_3
#define | RF_SW_CTRL3_GPIO_PORT GPIOC
#define | RF_SW_CTRL3_GPIO_CLK_ENABLE() __HAL_RCC_GPIOC_CLK_ENABLE()
#define | RF_SW_CTRL3_GPIO_CLK_DISABLE() __HAL_RCC_GPIOC_CLK_DISABLE()
#define | RF_SW_CTRL1_PIN GPIO_PIN_4
#define | RF_SW_CTRL1_GPIO_PORT GPIOC
#define | RF_SW_CTRL1_GPIO_CLK_ENABLE() __HAL_RCC_GPIOC_CLK_ENABLE()
#define | RF_SW_RX_GPIO_CLK_DISABLE() __HAL_RCC_GPIOC_CLK_DISABLE()
#define | RF_SW_CTRL2_PIN GPIO_PIN_5
#define | RF_SW_CTRL2_GPIO_PORT GPIOC
#define | RF_SW_CTRL2_GPIO_CLK_ENABLE() __HAL_RCC_GPIOC_CLK_ENABLE()
#define | RF_SW_CTRL2_GPIO_CLK_DISABLE() __HAL_RCC_GPIOC_CLK_DISABLE()
#define | RF_TCXO_VCC_PIN GPIO_PIN_0
#define | RF_TCXO_VCC_GPIO_PORT GPIOB
#define | RF_TCXO_VCC_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE()
#define | RF_TCXO_VCC_CLK_DISABLE() __HAL_RCC_GPIOB_CLK_DISABLE()

Define Documentation

#define RF_SW_CTRL1_GPIO_CLK_ENABLE ( ) __HAL_RCC_GPIOC_CLK_ENABLE()

Definition at line 106 of file stm32wlxx_nucleo_radio.h.

#define RF_SW_CTRL1_GPIO_PORT GPIOC

Definition at line 105 of file stm32wlxx_nucleo_radio.h.

Referenced by BSP_RADIO_ConfigRFSwitch(), BSP_RADIO_DeInit(), and BSP_RADIO_Init().

#define RF_SW_CTRL1_PIN GPIO_PIN_4

Definition at line 104 of file stm32wlxx_nucleo_radio.h.

Referenced by BSP_RADIO_ConfigRFSwitch(), BSP_RADIO_DeInit(), and BSP_RADIO_Init().

#define RF_SW_CTRL2_GPIO_CLK_DISABLE ( ) __HAL_RCC_GPIOC_CLK_DISABLE()

Definition at line 112 of file stm32wlxx_nucleo_radio.h.

#define RF_SW_CTRL2_GPIO_CLK_ENABLE ( ) __HAL_RCC_GPIOC_CLK_ENABLE()

Definition at line 111 of file stm32wlxx_nucleo_radio.h.

#define RF_SW_CTRL2_GPIO_PORT GPIOC

Definition at line 110 of file stm32wlxx_nucleo_radio.h.

Referenced by BSP_RADIO_ConfigRFSwitch(), BSP_RADIO_DeInit(), and BSP_RADIO_Init().

#define RF_SW_CTRL2_PIN GPIO_PIN_5

Definition at line 109 of file stm32wlxx_nucleo_radio.h.

Referenced by BSP_RADIO_ConfigRFSwitch(), BSP_RADIO_DeInit(), and BSP_RADIO_Init().

#define RF_SW_CTRL3_GPIO_CLK_DISABLE ( ) __HAL_RCC_GPIOC_CLK_DISABLE()

Definition at line 102 of file stm32wlxx_nucleo_radio.h.

#define RF_SW_CTRL3_GPIO_CLK_ENABLE ( ) __HAL_RCC_GPIOC_CLK_ENABLE()

Definition at line 101 of file stm32wlxx_nucleo_radio.h.

Referenced by BSP_RADIO_DeInit(), and BSP_RADIO_Init().

#define RF_SW_CTRL3_GPIO_PORT GPIOC

Definition at line 100 of file stm32wlxx_nucleo_radio.h.

Referenced by BSP_RADIO_ConfigRFSwitch(), BSP_RADIO_DeInit(), and BSP_RADIO_Init().

#define RF_SW_CTRL3_PIN GPIO_PIN_3

Definition at line 99 of file stm32wlxx_nucleo_radio.h.

Referenced by BSP_RADIO_ConfigRFSwitch(), BSP_RADIO_DeInit(), and BSP_RADIO_Init().

#define RF_SW_RX_GPIO_CLK_DISABLE ( ) __HAL_RCC_GPIOC_CLK_DISABLE()

Definition at line 107 of file stm32wlxx_nucleo_radio.h.

#define RF_TCXO_VCC_CLK_DISABLE ( ) __HAL_RCC_GPIOB_CLK_DISABLE()

Definition at line 117 of file stm32wlxx_nucleo_radio.h.

#define RF_TCXO_VCC_CLK_ENABLE ( ) __HAL_RCC_GPIOB_CLK_ENABLE()

Definition at line 116 of file stm32wlxx_nucleo_radio.h.

#define RF_TCXO_VCC_GPIO_PORT GPIOB

Definition at line 115 of file stm32wlxx_nucleo_radio.h.

#define RF_TCXO_VCC_PIN GPIO_PIN_0

Definition at line 114 of file stm32wlxx_nucleo_radio.h.


STM32WLxx_Nucleo BSP User Manual: RADIO LOW LEVEL Exported Functions

Functions
RADIO LOW LEVEL Exported Functions
RADIO LOW LEVEL

Functions

int32_t | BSP_RADIO_Init (void)
Init Radio Switch.
int32_t | BSP_RADIO_DeInit (void)
DeInit Radio Switch.
int32_t | BSP_RADIO_ConfigRFSwitch (BSP_RADIO_Switch_TypeDef Config)
Configure Radio Switch.
int32_t | BSP_RADIO_GetTxConfig (void)
Return Board Configuration.
int32_t | BSP_RADIO_IsTCXO (void)
Get If TCXO is to be present on board.
int32_t | BSP_RADIO_IsDCDC (void)
Get If DCDC is to be present on board.
int32_t | BSP_RADIO_GetRFOMaxPowerConfig (BSP_RADIO_RFOMaxPowerConfig_TypeDef Config)
Return RF Output Max Power Configuration.

Function Documentation

int32_t BSP_RADIO_ConfigRFSwitch ( BSP_RADIO_Switch_TypeDef Config )

Configure Radio Switch.

Parameters:
Config,: Specifies the Radio RF switch path to be set. This parameter can be one of following parameters:
  • RADIO_SWITCH_OFF
  • RADIO_SWITCH_RX
  • RADIO_SWITCH_RFO_LP
  • RADIO_SWITCH_RFO_HP
Return values:
BSP status

Definition at line 105 of file stm32wlxx_nucleo_radio.c.

References BSP_ERROR_NONE, RADIO_SWITCH_OFF, RADIO_SWITCH_RFO_HP, RADIO_SWITCH_RFO_LP, RADIO_SWITCH_RX, RF_SW_CTRL1_GPIO_PORT, RF_SW_CTRL1_PIN, RF_SW_CTRL2_GPIO_PORT, RF_SW_CTRL2_PIN, RF_SW_CTRL3_GPIO_PORT, and RF_SW_CTRL3_PIN.

int32_t BSP_RADIO_DeInit ( void )

DeInit Radio Switch.

Return values:
BSP status

Definition at line 78 of file stm32wlxx_nucleo_radio.c.

References BSP_ERROR_NONE, RF_SW_CTRL1_GPIO_PORT, RF_SW_CTRL1_PIN, RF_SW_CTRL2_GPIO_PORT, RF_SW_CTRL2_PIN, RF_SW_CTRL3_GPIO_CLK_ENABLE, RF_SW_CTRL3_GPIO_PORT, and RF_SW_CTRL3_PIN.

int32_t BSP_RADIO_GetRFOMaxPowerConfig ( BSP_RADIO_RFOMaxPowerConfig_TypeDef Config )

Return RF Output Max Power Configuration.

Return values:
RADIO_CONF_RFO_LP_MAX_15_dBm for LP mode RADIO_CONF_RFO_HP_MAX_22_dBm for HP mode

Definition at line 190 of file stm32wlxx_nucleo_radio.c.

References RADIO_CONF_RFO_HP_MAX_22_dBm, RADIO_CONF_RFO_LP_MAX_15_dBm, and RADIO_RFO_LP_MAXPOWER.

int32_t BSP_RADIO_GetTxConfig ( void )

Return Board Configuration.

Return values:
RADIO_CONF_RFO_LP_HP RADIO_CONF_RFO_LP RADIO_CONF_RFO_HP

Definition at line 155 of file stm32wlxx_nucleo_radio.c.

References RADIO_CONF_RFO_LP_HP.

int32_t BSP_RADIO_Init ( void )

Init Radio Switch.

Return values:
BSP status

Definition at line 46 of file stm32wlxx_nucleo_radio.c.

References BSP_ERROR_NONE, RF_SW_CTRL1_GPIO_PORT, RF_SW_CTRL1_PIN, RF_SW_CTRL2_GPIO_PORT, RF_SW_CTRL2_PIN, RF_SW_CTRL3_GPIO_CLK_ENABLE, RF_SW_CTRL3_GPIO_PORT, and RF_SW_CTRL3_PIN.

int32_t BSP_RADIO_IsDCDC ( void )

Get If DCDC is to be present on board.

Note:
never remove called by MW,
Return values:
RADIO_CONF_DCDC_NOT_SUPPORTED RADIO_CONF_DCDC_SUPPORTED

Definition at line 179 of file stm32wlxx_nucleo_radio.c.

References RADIO_CONF_DCDC_SUPPORTED.

int32_t BSP_RADIO_IsTCXO ( void )

Get If TCXO is to be present on board.

Note:
never remove called by MW,
Return values:
RADIO_CONF_TCXO_NOT_SUPPORTED RADIO_CONF_TCXO_SUPPORTED

Definition at line 167 of file stm32wlxx_nucleo_radio.c.

References RADIO_CONF_TCXO_SUPPORTED.


STM32WLxx_Nucleo BSP User Manual: stm32wlxx_nucleo_errno.h File Reference

  • File List
  • Globals
  • Firmware
  • Drivers
  • BSP
  • STM32WLxx_Nucleo
Defines
stm32wlxx_nucleo_errno.h File Reference

Error Code. More...

Go to the source code of this file.

Defines

#define | BSP_ERROR_NONE 0
#define | BSP_ERROR_NO_INIT -1
#define | BSP_ERROR_WRONG_PARAM -2
#define | BSP_ERROR_BUSY -3
#define | BSP_ERROR_PERIPH_FAILURE -4
#define | BSP_ERROR_COMPONENT_FAILURE -5
#define | BSP_ERROR_UNKNOWN_FAILURE -6
#define | BSP_ERROR_UNKNOWN_COMPONENT -7
#define | BSP_ERROR_BUS_FAILURE -8
#define | BSP_ERROR_CLOCK_FAILURE -9
#define | BSP_ERROR_MSP_FAILURE -10
#define | BSP_ERROR_FEATURE_NOT_SUPPORTED -11

Detailed Description

Error Code.

Author:
MCD Application Team
Attention:

Copyright (c) 2020-2021 STMicroelectronics. All rights reserved.

This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.

Definition in file stm32wlxx_nucleo_errno.h.

Define Documentation

#define BSP_ERROR_BUS_FAILURE -8

Definition at line 36 of file stm32wlxx_nucleo_errno.h.

#define BSP_ERROR_BUSY -3

Definition at line 31 of file stm32wlxx_nucleo_errno.h.

#define BSP_ERROR_CLOCK_FAILURE -9

Definition at line 37 of file stm32wlxx_nucleo_errno.h.

#define BSP_ERROR_COMPONENT_FAILURE -5

Definition at line 33 of file stm32wlxx_nucleo_errno.h.

#define BSP_ERROR_FEATURE_NOT_SUPPORTED -11

Definition at line 39 of file stm32wlxx_nucleo_errno.h.

#define BSP_ERROR_MSP_FAILURE -10

Definition at line 38 of file stm32wlxx_nucleo_errno.h.

#define BSP_ERROR_NO_INIT -1

Definition at line 29 of file stm32wlxx_nucleo_errno.h.

#define BSP_ERROR_NONE 0

Definition at line 28 of file stm32wlxx_nucleo_errno.h.

Referenced by BSP_LED_DeInit(), BSP_LED_Init(), BSP_LED_Off(), BSP_LED_On(), BSP_LED_Toggle(), BSP_PB_DeInit(), BSP_PB_Init(), BSP_RADIO_ConfigRFSwitch(), BSP_RADIO_DeInit(), and BSP_RADIO_Init().

#define BSP_ERROR_PERIPH_FAILURE -4

Definition at line 32 of file stm32wlxx_nucleo_errno.h.

#define BSP_ERROR_UNKNOWN_COMPONENT -7

Definition at line 35 of file stm32wlxx_nucleo_errno.h.

#define BSP_ERROR_UNKNOWN_FAILURE -6

Definition at line 34 of file stm32wlxx_nucleo_errno.h.

#define BSP_ERROR_WRONG_PARAM -2

Definition at line 30 of file stm32wlxx_nucleo_errno.h.


STM32WLxx_Nucleo BSP User Manual: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • h
  • l
  • p
  • r
  • u
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- _ -

  • __STM32WLXX_NUCLEO_BSP_VERSION : stm32wlxx_nucleo.h
  • __STM32WLXX_NUCLEO_BSP_VERSION_MAIN : stm32wlxx_nucleo.h
  • __STM32WLXX_NUCLEO_BSP_VERSION_RC : stm32wlxx_nucleo.h
  • __STM32WLXX_NUCLEO_BSP_VERSION_SUB1 : stm32wlxx_nucleo.h
  • __STM32WLXX_NUCLEO_BSP_VERSION_SUB2 : stm32wlxx_nucleo.h

- a -

  • ABSENT : stm32wlxx_nucleo.h

- b -

  • BSP_BUTTON_USER_IT_PRIORITY : stm32wlxx_nucleo_conf_template.h
  • BSP_ERROR_BUS_FAILURE : stm32wlxx_nucleo_errno.h
  • BSP_ERROR_BUSY : stm32wlxx_nucleo_errno.h
  • BSP_ERROR_CLOCK_FAILURE : stm32wlxx_nucleo_errno.h
  • BSP_ERROR_COMPONENT_FAILURE : stm32wlxx_nucleo_errno.h
  • BSP_ERROR_FEATURE_NOT_SUPPORTED : stm32wlxx_nucleo_errno.h
  • BSP_ERROR_MSP_FAILURE : stm32wlxx_nucleo_errno.h
  • BSP_ERROR_NO_INIT : stm32wlxx_nucleo_errno.h
  • BSP_ERROR_NONE : stm32wlxx_nucleo_errno.h
  • BSP_ERROR_PERIPH_FAILURE : stm32wlxx_nucleo_errno.h
  • BSP_ERROR_UNKNOWN_COMPONENT : stm32wlxx_nucleo_errno.h
  • BSP_ERROR_UNKNOWN_FAILURE : stm32wlxx_nucleo_errno.h
  • BSP_ERROR_WRONG_PARAM : stm32wlxx_nucleo_errno.h
  • BSP_EXTI_LineCallback : stm32wlxx_nucleo.c
  • BSP_GetVersion() : stm32wlxx_nucleo.c
  • BSP_LED_DeInit() : stm32wlxx_nucleo.c
  • BSP_LED_GetState() : stm32wlxx_nucleo.c
  • BSP_LED_Init() : stm32wlxx_nucleo.c
  • BSP_LED_Off() : stm32wlxx_nucleo.c
  • BSP_LED_On() : stm32wlxx_nucleo.c
  • BSP_LED_Toggle() : stm32wlxx_nucleo.c
  • BSP_PB_Callback() : stm32wlxx_nucleo.c
  • BSP_PB_DeInit() : stm32wlxx_nucleo.c
  • BSP_PB_GetState() : stm32wlxx_nucleo.c
  • BSP_PB_Init() : stm32wlxx_nucleo.c
  • BSP_PB_IRQHandler() : stm32wlxx_nucleo.c
  • BSP_RADIO_ConfigRFSwitch() : stm32wlxx_nucleo_radio.c
  • BSP_RADIO_DeInit() : stm32wlxx_nucleo_radio.c
  • BSP_RADIO_GetRFOMaxPowerConfig() : stm32wlxx_nucleo_radio.c
  • BSP_RADIO_GetTxConfig() : stm32wlxx_nucleo_radio.c
  • BSP_RADIO_Init() : stm32wlxx_nucleo_radio.c
  • BSP_RADIO_IsDCDC() : stm32wlxx_nucleo_radio.c
  • BSP_RADIO_IsTCXO() : stm32wlxx_nucleo_radio.c
  • BSP_RADIO_RFOMaxPowerConfig_TypeDef : stm32wlxx_nucleo_radio.h
  • BSP_RADIO_Switch_TypeDef : stm32wlxx_nucleo_radio.h
  • BUTTON_IRQn : stm32wlxx_nucleo.c
  • BUTTON_MODE_EXTI : stm32wlxx_nucleo.h
  • BUTTON_MODE_GPIO : stm32wlxx_nucleo.h
  • BUTTON_PIN : stm32wlxx_nucleo.c
  • BUTTON_PORT : stm32wlxx_nucleo.c
  • BUTTON_SW1 : stm32wlxx_nucleo.h
  • BUTTON_SW1_EXTI_Callback() : stm32wlxx_nucleo.c
  • BUTTON_SW1_EXTI_IRQn : stm32wlxx_nucleo.h
  • BUTTON_SW1_EXTI_LINE : stm32wlxx_nucleo.h
  • BUTTON_SW1_GPIO_CLK_DISABLE : stm32wlxx_nucleo.h
  • BUTTON_SW1_GPIO_CLK_ENABLE : stm32wlxx_nucleo.h
  • BUTTON_SW1_GPIO_PORT : stm32wlxx_nucleo.h
  • BUTTON_SW1_PIN : stm32wlxx_nucleo.h
  • BUTTON_SW2 : stm32wlxx_nucleo.h
  • BUTTON_SW2_EXTI_Callback() : stm32wlxx_nucleo.c
  • BUTTON_SW2_EXTI_IRQn : stm32wlxx_nucleo.h
  • BUTTON_SW2_EXTI_LINE : stm32wlxx_nucleo.h
  • BUTTON_SW2_GPIO_CLK_DISABLE : stm32wlxx_nucleo.h
  • BUTTON_SW2_GPIO_CLK_ENABLE : stm32wlxx_nucleo.h
  • BUTTON_SW2_GPIO_PORT : stm32wlxx_nucleo.h
  • BUTTON_SW2_PIN : stm32wlxx_nucleo.h
  • BUTTON_SW3 : stm32wlxx_nucleo.h
  • BUTTON_SW3_EXTI_Callback() : stm32wlxx_nucleo.c
  • BUTTON_SW3_EXTI_IRQn : stm32wlxx_nucleo.h
  • BUTTON_SW3_EXTI_LINE : stm32wlxx_nucleo.h
  • BUTTON_SW3_GPIO_CLK_DISABLE : stm32wlxx_nucleo.h
  • BUTTON_SW3_GPIO_CLK_ENABLE : stm32wlxx_nucleo.h
  • BUTTON_SW3_GPIO_PORT : stm32wlxx_nucleo.h
  • BUTTON_SW3_PIN : stm32wlxx_nucleo.h
  • Button_TypeDef : stm32wlxx_nucleo.h
  • ButtonMode_TypeDef : stm32wlxx_nucleo.h
  • BUTTONn : stm32wlxx_nucleo.h
  • BUTTONx_GPIO_CLK_DISABLE : stm32wlxx_nucleo.h
  • BUTTONx_GPIO_CLK_ENABLE : stm32wlxx_nucleo.h

- h -

  • H_EXTI_0 : stm32wlxx_nucleo.h
  • H_EXTI_1 : stm32wlxx_nucleo.h
  • H_EXTI_6 : stm32wlxx_nucleo.h
  • hpb_exti : stm32wlxx_nucleo.c , stm32wlxx_nucleo.h

- l -

  • LED1 : stm32wlxx_nucleo.h
  • LED1_GPIO_CLK_DISABLE : stm32wlxx_nucleo.h
  • LED1_GPIO_CLK_ENABLE : stm32wlxx_nucleo.h
  • LED1_GPIO_PORT : stm32wlxx_nucleo.h
  • LED1_PIN : stm32wlxx_nucleo.h
  • LED2 : stm32wlxx_nucleo.h
  • LED2_GPIO_CLK_DISABLE : stm32wlxx_nucleo.h
  • LED2_GPIO_CLK_ENABLE : stm32wlxx_nucleo.h
  • LED2_GPIO_PORT : stm32wlxx_nucleo.h
  • LED2_PIN : stm32wlxx_nucleo.h
  • LED3 : stm32wlxx_nucleo.h
  • LED3_GPIO_CLK_DISABLE : stm32wlxx_nucleo.h
  • LED3_GPIO_CLK_ENABLE : stm32wlxx_nucleo.h
  • LED3_GPIO_PORT : stm32wlxx_nucleo.h
  • LED3_PIN : stm32wlxx_nucleo.h
  • LED_BLUE : stm32wlxx_nucleo.h
  • LED_GREEN : stm32wlxx_nucleo.h
  • LED_PIN : stm32wlxx_nucleo.c
  • LED_PORT : stm32wlxx_nucleo.c
  • LED_RED : stm32wlxx_nucleo.h
  • Led_TypeDef : stm32wlxx_nucleo.h
  • LEDn : stm32wlxx_nucleo.h
  • LEDx_GPIO_CLK_DISABLE : stm32wlxx_nucleo.h
  • LEDx_GPIO_CLK_ENABLE : stm32wlxx_nucleo.h

- p -

  • Presence_TypeDef : stm32wlxx_nucleo.h
  • PRESENT : stm32wlxx_nucleo.h

- r -

  • RADIO_CONF_DCDC_NOT_SUPPORTED : stm32wlxx_nucleo_radio.h
  • RADIO_CONF_DCDC_SUPPORTED : stm32wlxx_nucleo_radio.h
  • RADIO_CONF_RFO_HP : stm32wlxx_nucleo_radio.h
  • RADIO_CONF_RFO_HP_MAX_14_dBm : stm32wlxx_nucleo_radio.h
  • RADIO_CONF_RFO_HP_MAX_17_dBm : stm32wlxx_nucleo_radio.h
  • RADIO_CONF_RFO_HP_MAX_20_dBm : stm32wlxx_nucleo_radio.h
  • RADIO_CONF_RFO_HP_MAX_22_dBm : stm32wlxx_nucleo_radio.h
  • RADIO_CONF_RFO_LP : stm32wlxx_nucleo_radio.h
  • RADIO_CONF_RFO_LP_HP : stm32wlxx_nucleo_radio.h
  • RADIO_CONF_RFO_LP_MAX_10_dBm : stm32wlxx_nucleo_radio.h
  • RADIO_CONF_RFO_LP_MAX_14_dBm : stm32wlxx_nucleo_radio.h
  • RADIO_CONF_RFO_LP_MAX_15_dBm : stm32wlxx_nucleo_radio.h
  • RADIO_CONF_TCXO_NOT_SUPPORTED : stm32wlxx_nucleo_radio.h
  • RADIO_CONF_TCXO_SUPPORTED : stm32wlxx_nucleo_radio.h
  • RADIO_RFO_HP_MAXPOWER : stm32wlxx_nucleo_radio.h
  • RADIO_RFO_LP_MAXPOWER : stm32wlxx_nucleo_radio.h
  • RADIO_SWITCH_OFF : stm32wlxx_nucleo_radio.h
  • RADIO_SWITCH_RFO_HP : stm32wlxx_nucleo_radio.h
  • RADIO_SWITCH_RFO_LP : stm32wlxx_nucleo_radio.h
  • RADIO_SWITCH_RX : stm32wlxx_nucleo_radio.h
  • RF_SW_CTRL1_GPIO_CLK_ENABLE : stm32wlxx_nucleo_radio.h
  • RF_SW_CTRL1_GPIO_PORT : stm32wlxx_nucleo_radio.h
  • RF_SW_CTRL1_PIN : stm32wlxx_nucleo_radio.h
  • RF_SW_CTRL2_GPIO_CLK_DISABLE : stm32wlxx_nucleo_radio.h
  • RF_SW_CTRL2_GPIO_CLK_ENABLE : stm32wlxx_nucleo_radio.h
  • RF_SW_CTRL2_GPIO_PORT : stm32wlxx_nucleo_radio.h
  • RF_SW_CTRL2_PIN : stm32wlxx_nucleo_radio.h
  • RF_SW_CTRL3_GPIO_CLK_DISABLE : stm32wlxx_nucleo_radio.h
  • RF_SW_CTRL3_GPIO_CLK_ENABLE : stm32wlxx_nucleo_radio.h
  • RF_SW_CTRL3_GPIO_PORT : stm32wlxx_nucleo_radio.h
  • RF_SW_CTRL3_PIN : stm32wlxx_nucleo_radio.h
  • RF_SW_RX_GPIO_CLK_DISABLE : stm32wlxx_nucleo_radio.h
  • RF_TCXO_VCC_CLK_DISABLE : stm32wlxx_nucleo_radio.h
  • RF_TCXO_VCC_CLK_ENABLE : stm32wlxx_nucleo_radio.h
  • RF_TCXO_VCC_GPIO_PORT : stm32wlxx_nucleo_radio.h
  • RF_TCXO_VCC_PIN : stm32wlxx_nucleo_radio.h

- u -

  • USE_BSP_COM_FEATURE : stm32wlxx_nucleo_conf_template.h
  • USE_COM_LOG : stm32wlxx_nucleo_conf_template.h


STM32WLxx_Nucleo BSP User Manual: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • BSP_GetVersion() : stm32wlxx_nucleo.c
  • BSP_LED_DeInit() : stm32wlxx_nucleo.c
  • BSP_LED_GetState() : stm32wlxx_nucleo.c
  • BSP_LED_Init() : stm32wlxx_nucleo.c
  • BSP_LED_Off() : stm32wlxx_nucleo.c
  • BSP_LED_On() : stm32wlxx_nucleo.c
  • BSP_LED_Toggle() : stm32wlxx_nucleo.c
  • BSP_PB_Callback() : stm32wlxx_nucleo.c
  • BSP_PB_DeInit() : stm32wlxx_nucleo.c
  • BSP_PB_GetState() : stm32wlxx_nucleo.c
  • BSP_PB_Init() : stm32wlxx_nucleo.c
  • BSP_PB_IRQHandler() : stm32wlxx_nucleo.c
  • BSP_RADIO_ConfigRFSwitch() : stm32wlxx_nucleo_radio.c
  • BSP_RADIO_DeInit() : stm32wlxx_nucleo_radio.c
  • BSP_RADIO_GetRFOMaxPowerConfig() : stm32wlxx_nucleo_radio.c
  • BSP_RADIO_GetTxConfig() : stm32wlxx_nucleo_radio.c
  • BSP_RADIO_Init() : stm32wlxx_nucleo_radio.c
  • BSP_RADIO_IsDCDC() : stm32wlxx_nucleo_radio.c
  • BSP_RADIO_IsTCXO() : stm32wlxx_nucleo_radio.c
  • BUTTON_SW1_EXTI_Callback() : stm32wlxx_nucleo.c
  • BUTTON_SW2_EXTI_Callback() : stm32wlxx_nucleo.c
  • BUTTON_SW3_EXTI_Callback() : stm32wlxx_nucleo.c


STM32WLxx_Nucleo BSP User Manual: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • BUTTON_IRQn : stm32wlxx_nucleo.c
  • BUTTON_PIN : stm32wlxx_nucleo.c
  • BUTTON_PORT : stm32wlxx_nucleo.c
  • hpb_exti : stm32wlxx_nucleo.c , stm32wlxx_nucleo.h
  • LED_PIN : stm32wlxx_nucleo.c
  • LED_PORT : stm32wlxx_nucleo.c


STM32WLxx_Nucleo BSP User Manual: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • BSP_EXTI_LineCallback : stm32wlxx_nucleo.c


STM32WLxx_Nucleo BSP User Manual: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • BSP_RADIO_RFOMaxPowerConfig_TypeDef : stm32wlxx_nucleo_radio.h
  • BSP_RADIO_Switch_TypeDef : stm32wlxx_nucleo_radio.h
  • Button_TypeDef : stm32wlxx_nucleo.h
  • ButtonMode_TypeDef : stm32wlxx_nucleo.h
  • Led_TypeDef : stm32wlxx_nucleo.h
  • Presence_TypeDef : stm32wlxx_nucleo.h


STM32WLxx_Nucleo BSP User Manual: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • ABSENT : stm32wlxx_nucleo.h
  • BUTTON_MODE_EXTI : stm32wlxx_nucleo.h
  • BUTTON_MODE_GPIO : stm32wlxx_nucleo.h
  • BUTTON_SW1 : stm32wlxx_nucleo.h
  • BUTTON_SW2 : stm32wlxx_nucleo.h
  • BUTTON_SW3 : stm32wlxx_nucleo.h
  • LED1 : stm32wlxx_nucleo.h
  • LED2 : stm32wlxx_nucleo.h
  • LED3 : stm32wlxx_nucleo.h
  • LED_BLUE : stm32wlxx_nucleo.h
  • LED_GREEN : stm32wlxx_nucleo.h
  • LED_RED : stm32wlxx_nucleo.h
  • PRESENT : stm32wlxx_nucleo.h
  • RADIO_RFO_HP_MAXPOWER : stm32wlxx_nucleo_radio.h
  • RADIO_RFO_LP_MAXPOWER : stm32wlxx_nucleo_radio.h
  • RADIO_SWITCH_OFF : stm32wlxx_nucleo_radio.h
  • RADIO_SWITCH_RFO_HP : stm32wlxx_nucleo_radio.h
  • RADIO_SWITCH_RFO_LP : stm32wlxx_nucleo_radio.h
  • RADIO_SWITCH_RX : stm32wlxx_nucleo_radio.h


STM32WLxx_Nucleo BSP User Manual: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • b
  • h
  • l
  • r
  • u

- _ -

  • __STM32WLXX_NUCLEO_BSP_VERSION : stm32wlxx_nucleo.h
  • __STM32WLXX_NUCLEO_BSP_VERSION_MAIN : stm32wlxx_nucleo.h
  • __STM32WLXX_NUCLEO_BSP_VERSION_RC : stm32wlxx_nucleo.h
  • __STM32WLXX_NUCLEO_BSP_VERSION_SUB1 : stm32wlxx_nucleo.h
  • __STM32WLXX_NUCLEO_BSP_VERSION_SUB2 : stm32wlxx_nucleo.h

- b -

  • BSP_BUTTON_USER_IT_PRIORITY : stm32wlxx_nucleo_conf_template.h
  • BSP_ERROR_BUS_FAILURE : stm32wlxx_nucleo_errno.h
  • BSP_ERROR_BUSY : stm32wlxx_nucleo_errno.h
  • BSP_ERROR_CLOCK_FAILURE : stm32wlxx_nucleo_errno.h
  • BSP_ERROR_COMPONENT_FAILURE : stm32wlxx_nucleo_errno.h
  • BSP_ERROR_FEATURE_NOT_SUPPORTED : stm32wlxx_nucleo_errno.h
  • BSP_ERROR_MSP_FAILURE : stm32wlxx_nucleo_errno.h
  • BSP_ERROR_NO_INIT : stm32wlxx_nucleo_errno.h
  • BSP_ERROR_NONE : stm32wlxx_nucleo_errno.h
  • BSP_ERROR_PERIPH_FAILURE : stm32wlxx_nucleo_errno.h
  • BSP_ERROR_UNKNOWN_COMPONENT : stm32wlxx_nucleo_errno.h
  • BSP_ERROR_UNKNOWN_FAILURE : stm32wlxx_nucleo_errno.h
  • BSP_ERROR_WRONG_PARAM : stm32wlxx_nucleo_errno.h
  • BUTTON_SW1_EXTI_IRQn : stm32wlxx_nucleo.h
  • BUTTON_SW1_EXTI_LINE : stm32wlxx_nucleo.h
  • BUTTON_SW1_GPIO_CLK_DISABLE : stm32wlxx_nucleo.h
  • BUTTON_SW1_GPIO_CLK_ENABLE : stm32wlxx_nucleo.h
  • BUTTON_SW1_GPIO_PORT : stm32wlxx_nucleo.h
  • BUTTON_SW1_PIN : stm32wlxx_nucleo.h
  • BUTTON_SW2_EXTI_IRQn : stm32wlxx_nucleo.h
  • BUTTON_SW2_EXTI_LINE : stm32wlxx_nucleo.h
  • BUTTON_SW2_GPIO_CLK_DISABLE : stm32wlxx_nucleo.h
  • BUTTON_SW2_GPIO_CLK_ENABLE : stm32wlxx_nucleo.h
  • BUTTON_SW2_GPIO_PORT : stm32wlxx_nucleo.h
  • BUTTON_SW2_PIN : stm32wlxx_nucleo.h
  • BUTTON_SW3_EXTI_IRQn : stm32wlxx_nucleo.h
  • BUTTON_SW3_EXTI_LINE : stm32wlxx_nucleo.h
  • BUTTON_SW3_GPIO_CLK_DISABLE : stm32wlxx_nucleo.h
  • BUTTON_SW3_GPIO_CLK_ENABLE : stm32wlxx_nucleo.h
  • BUTTON_SW3_GPIO_PORT : stm32wlxx_nucleo.h
  • BUTTON_SW3_PIN : stm32wlxx_nucleo.h
  • BUTTONn : stm32wlxx_nucleo.h
  • BUTTONx_GPIO_CLK_DISABLE : stm32wlxx_nucleo.h
  • BUTTONx_GPIO_CLK_ENABLE : stm32wlxx_nucleo.h

- h -

  • H_EXTI_0 : stm32wlxx_nucleo.h
  • H_EXTI_1 : stm32wlxx_nucleo.h
  • H_EXTI_6 : stm32wlxx_nucleo.h

- l -

  • LED1_GPIO_CLK_DISABLE : stm32wlxx_nucleo.h
  • LED1_GPIO_CLK_ENABLE : stm32wlxx_nucleo.h
  • LED1_GPIO_PORT : stm32wlxx_nucleo.h
  • LED1_PIN : stm32wlxx_nucleo.h
  • LED2_GPIO_CLK_DISABLE : stm32wlxx_nucleo.h
  • LED2_GPIO_CLK_ENABLE : stm32wlxx_nucleo.h
  • LED2_GPIO_PORT : stm32wlxx_nucleo.h
  • LED2_PIN : stm32wlxx_nucleo.h
  • LED3_GPIO_CLK_DISABLE : stm32wlxx_nucleo.h
  • LED3_GPIO_CLK_ENABLE : stm32wlxx_nucleo.h
  • LED3_GPIO_PORT : stm32wlxx_nucleo.h
  • LED3_PIN : stm32wlxx_nucleo.h
  • LEDn : stm32wlxx_nucleo.h
  • LEDx_GPIO_CLK_DISABLE : stm32wlxx_nucleo.h
  • LEDx_GPIO_CLK_ENABLE : stm32wlxx_nucleo.h

- r -

  • RADIO_CONF_DCDC_NOT_SUPPORTED : stm32wlxx_nucleo_radio.h
  • RADIO_CONF_DCDC_SUPPORTED : stm32wlxx_nucleo_radio.h
  • RADIO_CONF_RFO_HP : stm32wlxx_nucleo_radio.h
  • RADIO_CONF_RFO_HP_MAX_14_dBm : stm32wlxx_nucleo_radio.h
  • RADIO_CONF_RFO_HP_MAX_17_dBm : stm32wlxx_nucleo_radio.h
  • RADIO_CONF_RFO_HP_MAX_20_dBm : stm32wlxx_nucleo_radio.h
  • RADIO_CONF_RFO_HP_MAX_22_dBm : stm32wlxx_nucleo_radio.h
  • RADIO_CONF_RFO_LP : stm32wlxx_nucleo_radio.h
  • RADIO_CONF_RFO_LP_HP : stm32wlxx_nucleo_radio.h
  • RADIO_CONF_RFO_LP_MAX_10_dBm : stm32wlxx_nucleo_radio.h
  • RADIO_CONF_RFO_LP_MAX_14_dBm : stm32wlxx_nucleo_radio.h
  • RADIO_CONF_RFO_LP_MAX_15_dBm : stm32wlxx_nucleo_radio.h
  • RADIO_CONF_TCXO_NOT_SUPPORTED : stm32wlxx_nucleo_radio.h
  • RADIO_CONF_TCXO_SUPPORTED : stm32wlxx_nucleo_radio.h
  • RF_SW_CTRL1_GPIO_CLK_ENABLE : stm32wlxx_nucleo_radio.h
  • RF_SW_CTRL1_GPIO_PORT : stm32wlxx_nucleo_radio.h
  • RF_SW_CTRL1_PIN : stm32wlxx_nucleo_radio.h
  • RF_SW_CTRL2_GPIO_CLK_DISABLE : stm32wlxx_nucleo_radio.h
  • RF_SW_CTRL2_GPIO_CLK_ENABLE : stm32wlxx_nucleo_radio.h
  • RF_SW_CTRL2_GPIO_PORT : stm32wlxx_nucleo_radio.h
  • RF_SW_CTRL2_PIN : stm32wlxx_nucleo_radio.h
  • RF_SW_CTRL3_GPIO_CLK_DISABLE : stm32wlxx_nucleo_radio.h
  • RF_SW_CTRL3_GPIO_CLK_ENABLE : stm32wlxx_nucleo_radio.h
  • RF_SW_CTRL3_GPIO_PORT : stm32wlxx_nucleo_radio.h
  • RF_SW_CTRL3_PIN : stm32wlxx_nucleo_radio.h
  • RF_SW_RX_GPIO_CLK_DISABLE : stm32wlxx_nucleo_radio.h
  • RF_TCXO_VCC_CLK_DISABLE : stm32wlxx_nucleo_radio.h
  • RF_TCXO_VCC_CLK_ENABLE : stm32wlxx_nucleo_radio.h
  • RF_TCXO_VCC_GPIO_PORT : stm32wlxx_nucleo_radio.h
  • RF_TCXO_VCC_PIN : stm32wlxx_nucleo_radio.h

- u -

  • USE_BSP_COM_FEATURE : stm32wlxx_nucleo_conf_template.h
  • USE_COM_LOG : stm32wlxx_nucleo_conf_template.h


STM32WLxx_Nucleo BSP User Manual: stm32wlxx_nucleo.c File Reference

  • File List
  • Globals
  • Firmware
  • Drivers
  • BSP
  • STM32WLxx_Nucleo
Typedefs | Functions | Variables
stm32wlxx_nucleo.c File Reference

This file provides set of firmware functions to manage: More...

#include "stm32wlxx_nucleo.h"

Go to the source code of this file.

Typedefs

typedef void(* | BSP_EXTI_LineCallback )(void)

Functions

static void | BUTTON_SW1_EXTI_Callback (void)
Button SW1 EXTI line detection callback.
static void | BUTTON_SW2_EXTI_Callback (void)
Button SW2 EXTI line detection callback.
static void | BUTTON_SW3_EXTI_Callback (void)
Button SW3 EXTI line detection callback.
uint32_t | BSP_GetVersion (void)
This method returns the STM32WLXX NUCLEO BSP Driver revision.
int32_t | BSP_LED_Init (Led_TypeDef Led)
Configures LED GPIO.
int32_t | BSP_LED_DeInit (Led_TypeDef Led)
DeInit LEDs.
int32_t | BSP_LED_On (Led_TypeDef Led)
Turns selected LED On.
int32_t | BSP_LED_Off (Led_TypeDef Led)
Turns selected LED Off.
int32_t | BSP_LED_Toggle (Led_TypeDef Led)
Toggles the selected LED.
int32_t | BSP_LED_GetState (Led_TypeDef Led)
Get the status of the selected LED.
int32_t | BSP_PB_Init (Button_TypeDef Button, ButtonMode_TypeDef ButtonMode)
Configures Button GPIO and EXTI Line.
int32_t | BSP_PB_DeInit (Button_TypeDef Button)
Push Button DeInit.
int32_t | BSP_PB_GetState (Button_TypeDef Button)
Returns the selected Button state.
void | BSP_PB_IRQHandler (Button_TypeDef Button)
This function handles Push-Button interrupt requests.
__weak void | BSP_PB_Callback (Button_TypeDef Button)
BSP Push Button callback.

Variables

EXTI_HandleTypeDef | hpb_exti [BUTTONn]
static GPIO_TypeDef * | LED_PORT [LEDn] = {LED1_GPIO_PORT, LED2_GPIO_PORT, LED3_GPIO_PORT}
static const uint16_t | LED_PIN [LEDn] = {LED1_PIN, LED2_PIN, LED3_PIN}
static GPIO_TypeDef * | BUTTON_PORT [BUTTONn] = {BUTTON_SW1_GPIO_PORT, BUTTON_SW2_GPIO_PORT, BUTTON_SW3_GPIO_PORT}
static const uint16_t | BUTTON_PIN [BUTTONn] = {BUTTON_SW1_PIN, BUTTON_SW2_PIN, BUTTON_SW3_PIN}
static const IRQn_Type | BUTTON_IRQn [BUTTONn] = {BUTTON_SW1_EXTI_IRQn, BUTTON_SW2_EXTI_IRQn, BUTTON_SW3_EXTI_IRQn}

Detailed Description

This file provides set of firmware functions to manage:

Author:
MCD Application Team
  • LEDs and push-buttons available on STM32WLXX-Nucleo Kit from STMicroelectronics
Attention:

Copyright (c) 2020-2021 STMicroelectronics. All rights reserved.

This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.

Definition in file stm32wlxx_nucleo.c.


STM32WLxx_Nucleo BSP User Manual: stm32wlxx_nucleo.h File Reference

  • File List
  • Globals
  • Firmware
  • Drivers
  • BSP
  • STM32WLxx_Nucleo
Defines | Enumerations | Functions | Variables
stm32wlxx_nucleo.h File Reference

Header for stm32wlxx_nucleo.c. More...

#include "stm32wlxx_nucleo_errno.h"
#include "stm32wlxx_nucleo_conf.h"

Go to the source code of this file.

Defines

#define | __STM32WLXX_NUCLEO_BSP_VERSION_MAIN (0x01U)
STM32WLXX NUCLEO BSP Driver version number.
#define | __STM32WLXX_NUCLEO_BSP_VERSION_SUB1 (0x03U)
#define | __STM32WLXX_NUCLEO_BSP_VERSION_SUB2 (0x00U)
#define | __STM32WLXX_NUCLEO_BSP_VERSION_RC (0x00U)
#define | __STM32WLXX_NUCLEO_BSP_VERSION
#define | LEDn 3
#define | LED1_PIN GPIO_PIN_15
#define | LED1_GPIO_PORT GPIOB
#define | LED1_GPIO_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE()
#define | LED1_GPIO_CLK_DISABLE() __HAL_RCC_GPIOB_CLK_DISABLE()
#define | LED2_PIN GPIO_PIN_9
#define | LED2_GPIO_PORT GPIOB
#define | LED2_GPIO_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE()
#define | LED2_GPIO_CLK_DISABLE() __HAL_RCC_GPIOB_CLK_DISABLE()
#define | LED3_PIN GPIO_PIN_11
#define | LED3_GPIO_PORT GPIOB
#define | LED3_GPIO_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE()
#define | LED3_GPIO_CLK_DISABLE() __HAL_RCC_GPIOB_CLK_DISABLE()
#define | LEDx_GPIO_CLK_ENABLE(__INDEX__) __HAL_RCC_GPIOB_CLK_ENABLE() /* All Led on same port */
#define | LEDx_GPIO_CLK_DISABLE(__INDEX__) __HAL_RCC_GPIOB_CLK_DISABLE() /* All Led on same port */
#define | BUTTONn 3
#define | BUTTON_SW1_PIN GPIO_PIN_0
Key push-buttons.
#define | BUTTON_SW1_GPIO_PORT GPIOA
#define | BUTTON_SW1_GPIO_CLK_ENABLE() __HAL_RCC_GPIOA_CLK_ENABLE()
#define | BUTTON_SW1_GPIO_CLK_DISABLE() __HAL_RCC_GPIOA_CLK_DISABLE()
#define | BUTTON_SW1_EXTI_LINE EXTI_LINE_0
#define | BUTTON_SW1_EXTI_IRQn EXTI0_IRQn
#define | H_EXTI_0 hpb_exti[BUTTON_SW1]
#define | BUTTON_SW2_PIN GPIO_PIN_1
#define | BUTTON_SW2_GPIO_PORT GPIOA
#define | BUTTON_SW2_GPIO_CLK_ENABLE() __HAL_RCC_GPIOA_CLK_ENABLE()
#define | BUTTON_SW2_GPIO_CLK_DISABLE() __HAL_RCC_GPIOA_CLK_DISABLE()
#define | BUTTON_SW2_EXTI_LINE EXTI_LINE_1
#define | BUTTON_SW2_EXTI_IRQn EXTI1_IRQn
#define | H_EXTI_1 hpb_exti[BUTTON_SW2]
#define | BUTTON_SW3_PIN GPIO_PIN_6
#define | BUTTON_SW3_GPIO_PORT GPIOC
#define | BUTTON_SW3_GPIO_CLK_ENABLE() __HAL_RCC_GPIOC_CLK_ENABLE()
#define | BUTTON_SW3_GPIO_CLK_DISABLE() __HAL_RCC_GPIOC_CLK_DISABLE()
#define | BUTTON_SW3_EXTI_LINE EXTI_LINE_6
#define | BUTTON_SW3_EXTI_IRQn EXTI9_5_IRQn
#define | H_EXTI_6 hpb_exti[BUTTON_SW3]
#define | BUTTONx_GPIO_CLK_ENABLE(__INDEX__)
#define | BUTTONx_GPIO_CLK_DISABLE(__INDEX__)

Enumerations

enum Led_TypeDef {
LED1 = 0, LED2 = 1, LED3 = 2, LED_BLUE = LED1,
LED_GREEN = LED2, LED_RED = LED3
}
enum | Button_TypeDef { BUTTON_SW1 = 0, BUTTON_SW2 = 1, BUTTON_SW3 = 2 }
enum | ButtonMode_TypeDef { BUTTON_MODE_GPIO = 0, BUTTON_MODE_EXTI = 1 }
enum | Presence_TypeDef { ABSENT = 0, PRESENT = 1 }

Functions

uint32_t | BSP_GetVersion (void)
This method returns the STM32WLXX NUCLEO BSP Driver revision.
int32_t | BSP_LED_Init (Led_TypeDef Led)
Configures LED GPIO.
int32_t | BSP_LED_DeInit (Led_TypeDef Led)
DeInit LEDs.
int32_t | BSP_LED_On (Led_TypeDef Led)
Turns selected LED On.
int32_t | BSP_LED_Off (Led_TypeDef Led)
Turns selected LED Off.
int32_t | BSP_LED_Toggle (Led_TypeDef Led)
Toggles the selected LED.
int32_t | BSP_LED_GetState (Led_TypeDef Led)
Get the status of the selected LED.
int32_t | BSP_PB_Init (Button_TypeDef Button, ButtonMode_TypeDef ButtonMode)
Configures Button GPIO and EXTI Line.
int32_t | BSP_PB_DeInit (Button_TypeDef Button)
Push Button DeInit.
int32_t | BSP_PB_GetState (Button_TypeDef Button)
Returns the selected Button state.
__weak void | BSP_PB_Callback (Button_TypeDef Button)
BSP Push Button callback.
void | BSP_PB_IRQHandler (Button_TypeDef Button)
This function handles Push-Button interrupt requests.

Variables

EXTI_HandleTypeDef | hpb_exti []

Detailed Description

Header for stm32wlxx_nucleo.c.

Author:
MCD Application Team
Attention:

Copyright (c) 2020-2021 STMicroelectronics. All rights reserved.

This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.

Definition in file stm32wlxx_nucleo.h.


STM32WLxx_Nucleo BSP User Manual: stm32wlxx_nucleo_conf_template.h File Reference

  • File List
  • Globals
  • Firmware
  • Drivers
  • BSP
  • STM32WLxx_Nucleo
Defines
stm32wlxx_nucleo_conf_template.h File Reference
#include "stm32wlxx_hal.h"

Go to the source code of this file.

Defines

#define | USE_BSP_COM_FEATURE 0U
#define | USE_COM_LOG 0U
#define | BSP_BUTTON_USER_IT_PRIORITY 15U


STM32WLxx_Nucleo BSP User Manual: stm32wlxx_nucleo_radio.c File Reference

  • File List
  • Globals
  • Firmware
  • Drivers
  • BSP
  • STM32WLxx_Nucleo
Functions
stm32wlxx_nucleo_radio.c File Reference

This file provides set of firmware functions to manage: More...

#include "stm32wlxx_nucleo_radio.h"

Go to the source code of this file.

Functions

int32_t | BSP_RADIO_Init (void)
Init Radio Switch.
int32_t | BSP_RADIO_DeInit (void)
DeInit Radio Switch.
int32_t | BSP_RADIO_ConfigRFSwitch (BSP_RADIO_Switch_TypeDef Config)
Configure Radio Switch.
int32_t | BSP_RADIO_GetTxConfig (void)
Return Board Configuration.
int32_t | BSP_RADIO_IsTCXO (void)
Get If TCXO is to be present on board.
int32_t | BSP_RADIO_IsDCDC (void)
Get If DCDC is to be present on board.
int32_t | BSP_RADIO_GetRFOMaxPowerConfig (BSP_RADIO_RFOMaxPowerConfig_TypeDef Config)
Return RF Output Max Power Configuration.

Detailed Description

This file provides set of firmware functions to manage:

Author:
MCD Application Team
  • RF circuitry available on STM32WLXX-Nucleo Kit from STMicroelectronics
Attention:

Copyright (c) 2020-2021 STMicroelectronics. All rights reserved.

This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.

Definition in file stm32wlxx_nucleo_radio.c.


STM32WLxx_Nucleo BSP User Manual: stm32wlxx_nucleo_radio.h File Reference

  • File List
  • Globals
  • Firmware
  • Drivers
  • BSP
  • STM32WLxx_Nucleo
Defines | Enumerations | Functions
stm32wlxx_nucleo_radio.h File Reference

Header for stm32wlxx_nucleo_radio.c. More...

#include "stm32wlxx_nucleo_errno.h"
#include "stm32wlxx_nucleo_conf.h"

Go to the source code of this file.

Defines

#define | RADIO_CONF_RFO_LP_HP 0U
#define | RADIO_CONF_RFO_LP 1U
#define | RADIO_CONF_RFO_HP 2U
#define | RADIO_CONF_TCXO_NOT_SUPPORTED 0U
#define | RADIO_CONF_TCXO_SUPPORTED 1U
#define | RADIO_CONF_DCDC_NOT_SUPPORTED 0U
#define | RADIO_CONF_DCDC_SUPPORTED 1U
#define | RADIO_CONF_RFO_HP_MAX_22_dBm ((int32_t) 22)
#define | RADIO_CONF_RFO_HP_MAX_20_dBm ((int32_t) 20)
#define | RADIO_CONF_RFO_HP_MAX_17_dBm ((int32_t) 17)
#define | RADIO_CONF_RFO_HP_MAX_14_dBm ((int32_t) 14)
#define | RADIO_CONF_RFO_LP_MAX_15_dBm ((int32_t) 15)
#define | RADIO_CONF_RFO_LP_MAX_14_dBm ((int32_t) 14)
#define | RADIO_CONF_RFO_LP_MAX_10_dBm ((int32_t) 10)
#define | RF_SW_CTRL3_PIN GPIO_PIN_3
#define | RF_SW_CTRL3_GPIO_PORT GPIOC
#define | RF_SW_CTRL3_GPIO_CLK_ENABLE() __HAL_RCC_GPIOC_CLK_ENABLE()
#define | RF_SW_CTRL3_GPIO_CLK_DISABLE() __HAL_RCC_GPIOC_CLK_DISABLE()
#define | RF_SW_CTRL1_PIN GPIO_PIN_4
#define | RF_SW_CTRL1_GPIO_PORT GPIOC
#define | RF_SW_CTRL1_GPIO_CLK_ENABLE() __HAL_RCC_GPIOC_CLK_ENABLE()
#define | RF_SW_RX_GPIO_CLK_DISABLE() __HAL_RCC_GPIOC_CLK_DISABLE()
#define | RF_SW_CTRL2_PIN GPIO_PIN_5
#define | RF_SW_CTRL2_GPIO_PORT GPIOC
#define | RF_SW_CTRL2_GPIO_CLK_ENABLE() __HAL_RCC_GPIOC_CLK_ENABLE()
#define | RF_SW_CTRL2_GPIO_CLK_DISABLE() __HAL_RCC_GPIOC_CLK_DISABLE()
#define | RF_TCXO_VCC_PIN GPIO_PIN_0
#define | RF_TCXO_VCC_GPIO_PORT GPIOB
#define | RF_TCXO_VCC_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE()
#define | RF_TCXO_VCC_CLK_DISABLE() __HAL_RCC_GPIOB_CLK_DISABLE()

Enumerations

enum | BSP_RADIO_Switch_TypeDef { RADIO_SWITCH_OFF = 0, RADIO_SWITCH_RX = 1, RADIO_SWITCH_RFO_LP = 2, RADIO_SWITCH_RFO_HP = 3 }
enum | BSP_RADIO_RFOMaxPowerConfig_TypeDef { RADIO_RFO_LP_MAXPOWER = 0, RADIO_RFO_HP_MAXPOWER }

Functions

int32_t | BSP_RADIO_Init (void)
Init Radio Switch.
int32_t | BSP_RADIO_DeInit (void)
DeInit Radio Switch.
int32_t | BSP_RADIO_ConfigRFSwitch (BSP_RADIO_Switch_TypeDef Config)
Configure Radio Switch.
int32_t | BSP_RADIO_GetTxConfig (void)
Return Board Configuration.
int32_t | BSP_RADIO_IsTCXO (void)
Get If TCXO is to be present on board.
int32_t | BSP_RADIO_IsDCDC (void)
Get If DCDC is to be present on board.
int32_t | BSP_RADIO_GetRFOMaxPowerConfig (BSP_RADIO_RFOMaxPowerConfig_TypeDef Config)
Return RF Output Max Power Configuration.

Detailed Description

Header for stm32wlxx_nucleo_radio.c.

Author:
MCD Application Team
Attention:

Copyright (c) 2020-2021 STMicroelectronics. All rights reserved.

This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.

Definition in file stm32wlxx_nucleo_radio.h.


STM32WLxx_Nucleo BSP User Manual: C:/git/wl_master/Firmware/Drivers/BSP/STM32WLxx_Nucleo/ Directory Reference

  • Firmware
  • Drivers
  • BSP
  • STM32WLxx_Nucleo
STM32WLxx_Nucleo Directory Reference

Files

file | stm32wlxx_nucleo.c [code]

This file provides set of firmware functions to manage:

file | stm32wlxx_nucleo.h [code]

Header for stm32wlxx_nucleo.c.

file | stm32wlxx_nucleo_conf_template.h [code]
file | stm32wlxx_nucleo_errno.h [code]

Error Code.

file | stm32wlxx_nucleo_radio.c [code]

This file provides set of firmware functions to manage:

file | stm32wlxx_nucleo_radio.h [code]

Header for stm32wlxx_nucleo_radio.c.


STM32WLxx_Nucleo BSP User Manual: C:/git/wl_master/Firmware/Drivers/BSP/ Directory Reference

  • Firmware
  • Drivers
  • BSP
BSP Directory Reference

Directories

directory STM32WLxx_Nucleo


STM32WLxx_Nucleo BSP User Manual: C:/git/wl_master/Firmware/ Directory Reference

  • Firmware
Firmware Directory Reference

Directories

directory Drivers


STM32WLxx_Nucleo BSP User Manual: C:/git/wl_master/Firmware/Drivers/ Directory Reference

  • Firmware
  • Drivers
Drivers Directory Reference

Directories

directory BSP


STM32WLxx_Nucleo BSP User Manual: Directories

Directories
This directory hierarchy is sorted roughly, but not completely, alphabetically:
  • Firmware
    • Drivers
      • BSP
        • STM32WLxx_Nucleo


STM32WLxx_Nucleo BSP User Manual: File List

  • File List
  • Globals
File List
Here is a list of all files with brief descriptions:
stm32wlxx_nucleo.c [code] | This file provides set of firmware functions to manage:
stm32wlxx_nucleo.h [code] | Header for stm32wlxx_nucleo.c
stm32wlxx_nucleo_conf_template.h [code] |
stm32wlxx_nucleo_errno.h [code] | Error Code
stm32wlxx_nucleo_radio.c [code] | This file provides set of firmware functions to manage:
stm32wlxx_nucleo_radio.h [code] | Header for stm32wlxx_nucleo_radio.c


STM32WLxx_Nucleo BSP User Manual: BSP

Modules
BSP

Modules

STM32WLXX-NUCLEO


STM32WLxx_Nucleo BSP User Manual: STM32WLXX-NUCLEO

Modules
STM32WLXX-NUCLEO
BSP

Modules

LOW LEVEL

This file provides set of firmware functions to manage LEDs and push-buttons on STM32WLXX-Nucleo Kit from STMicroelectronics.

CONFIG
RADIO LOW LEVEL

This file provides set of firmware functions to Radio switch available on STM32WLXX-Nucleo Kit from STMicroelectronics.


STM32WLxx_Nucleo BSP User Manual: CONFIG

Modules
CONFIG
STM32WLXX-NUCLEO

Modules

Exported Constants


STM32WLxx_Nucleo BSP User Manual: LOW LEVEL

Modules
LOW LEVEL
STM32WLXX-NUCLEO

This file provides set of firmware functions to manage LEDs and push-buttons on STM32WLXX-Nucleo Kit from STMicroelectronics. More...

Modules

LOW LEVEL Exported Variables
LOW LEVEL Private Defines
LOW LEVEL Private Typedef
LOW LEVEL Private Variables
LOW LEVEL Private Functions
LOW LEVEL Exported Types
LOW LEVEL Exported Constants
LOW LEVEL Exported Functions

Detailed Description

This file provides set of firmware functions to manage LEDs and push-buttons on STM32WLXX-Nucleo Kit from STMicroelectronics.


STM32WLxx_Nucleo BSP User Manual: RADIO LOW LEVEL

Modules
RADIO LOW LEVEL
STM32WLXX-NUCLEO

This file provides set of firmware functions to Radio switch available on STM32WLXX-Nucleo Kit from STMicroelectronics. More...

Modules

RADIO LOW LEVEL Exported Types
RADIO LOW LEVEL Exported Constants
RADIO LOW LEVEL Exported Functions

Detailed Description

This file provides set of firmware functions to Radio switch available on STM32WLXX-Nucleo Kit from STMicroelectronics.


STM32WLxx_Nucleo BSP User Manual: RADIO LOW LEVEL Exported Constants

Modules
RADIO LOW LEVEL Exported Constants
RADIO LOW LEVEL

Modules

RADIO LOW LEVEL RADIO CONFIG Constants
RADIO LOW LEVEL RF SWITCH Constants


STM32WLxx_Nucleo BSP User Manual: Modules

Modules
Here is a list of all modules:
  • BSP
    • STM32WLXX-NUCLEO
      • LOW LEVEL
        • LOW LEVEL Exported Variables
        • LOW LEVEL Private Defines
        • LOW LEVEL Private Typedef
        • LOW LEVEL Private Variables
        • LOW LEVEL Private Functions
        • LOW LEVEL Exported Types
        • LOW LEVEL Exported Constants
          • LOW LEVEL LED Constants
          • LOW LEVEL BUTTON Constants
        • LOW LEVEL Exported Functions
          • LOW LEVEL LED Functions
          • LOW LEVEL BUTTON Functions
      • CONFIG
        • Exported Constants
      • RADIO LOW LEVEL
        • RADIO LOW LEVEL Exported Types
        • RADIO LOW LEVEL Exported Constants
          • RADIO LOW LEVEL RADIO CONFIG Constants
          • RADIO LOW LEVEL RF SWITCH Constants
        • RADIO LOW LEVEL Exported Functions


STM32WLxx_Nucleo BSP User Manual: stm32wlxx_nucleo.c Source File

  • File List
  • Globals
  • Firmware
  • Drivers
  • BSP
  • STM32WLxx_Nucleo
stm32wlxx_nucleo.c
Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   * @file    stm32wlxx_nucleo.c
00004   * @author  MCD Application Team
00005   * @brief   This file provides set of firmware functions to manage:
00006   *          - LEDs and push-buttons available on STM32WLXX-Nucleo
00007   *            Kit from STMicroelectronics
00008   ******************************************************************************
00009   * @attention
00010   *
00011   * Copyright (c) 2020-2021 STMicroelectronics.
00012   * All rights reserved.
00013   *
00014   * This software is licensed under terms that can be found in the LICENSE file
00015   * in the root directory of this software component.
00016   * If no LICENSE file comes with this software, it is provided AS-IS.
00017   *
00018   ******************************************************************************
00019   */
00020
00021 /* Includes ------------------------------------------------------------------*/
00022 #include "stm32wlxx_nucleo.h"
00023
00024 #if defined(__ICCARM__)
00025 #include <LowLevelIOInterface.h>
00026 #endif /* __ICCARM__ */
00027
00028 /** @addtogroup BSP
00029   * @{
00030   */
00031
00032 /** @addtogroup STM32WLXX_NUCLEO
00033   * @{
00034   */
00035
00036 /** @addtogroup STM32WLXX_NUCLEO_LOW_LEVEL
00037   * @brief This file provides set of firmware functions to manage LEDs and push-buttons
00038   *        on STM32WLXX-Nucleo Kit from STMicroelectronics.
00039   * @{
00040   */
00041
00042
00043 /** @defgroup STM32WLXX_NUCLEO_LOW_LEVEL_Exported_Variables LOW LEVEL Exported Variables
00044   * @{
00045   */
00046 EXTI_HandleTypeDef hpb_exti[BUTTONn];
00047 #if (USE_BSP_COM_FEATURE > 0)
00048 UART_HandleTypeDef hcom_uart[COMn];
00049 #endif /* (USE_BSP_COM_FEATURE > 0) */
00050 /**
00051   * @}
00052   */
00053
00054 /** @defgroup STM32WLXX_NUCLEO_LOW_LEVEL_Private_Defines LOW LEVEL Private Defines
00055   * @{
00056   */
00057 #if (USE_COM_LOG == 1)
00058 /**
00059   * @brief  Redirect console output to COM
00060   */
00061 #if defined(__ICCARM__)
00062 /* New definition from EWARM V9, compatible with EWARM8 */
00063 int iar_fputc(int ch);
00064 #define PUTCHAR_PROTOTYPE int iar_fputc(int ch)
00065 #elif defined (__CC_ARM) || defined(__ARMCC_VERSION)
00066 /* ARM Compiler 5/6 */
00067 #define PUTCHAR_PROTOTYPE int fputc(int ch, FILE *f)
00068 #elif defined(__GNUC__)
00069 #define PUTCHAR_PROTOTYPE int __io_putchar(int ch)
00070 #endif /* __ICCARM__ */
00071
00072 #endif /* USE_COM_LOG */
00073
00074 /**
00075   * @}
00076   */
00077
00078 /** @defgroup STM32WLXX_NUCLEO_LOW_LEVEL_Private_TypesDefinitions LOW LEVEL Private Typedef
00079   * @{
00080   */
00081 typedef void (* BSP_EXTI_LineCallback) (void);
00082 /**
00083   * @}
00084   */
00085
00086 /** @defgroup STM32WLXX_NUCLEO_LOW_LEVEL_Private_Variables LOW LEVEL Private Variables
00087   * @{
00088   */
00089 static GPIO_TypeDef*  LED_PORT[LEDn] = {LED1_GPIO_PORT, LED2_GPIO_PORT, LED3_GPIO_PORT};
00090
00091 static const uint16_t LED_PIN[LEDn] = {LED1_PIN, LED2_PIN, LED3_PIN};
00092
00093 static GPIO_TypeDef* BUTTON_PORT[BUTTONn] = {BUTTON_SW1_GPIO_PORT, BUTTON_SW2_GPIO_PORT, BUTTON_SW3_GPIO_PORT};
00094
00095 static const uint16_t BUTTON_PIN[BUTTONn] = {BUTTON_SW1_PIN, BUTTON_SW2_PIN, BUTTON_SW3_PIN};
00096
00097 static const IRQn_Type BUTTON_IRQn[BUTTONn] = {BUTTON_SW1_EXTI_IRQn, BUTTON_SW2_EXTI_IRQn, BUTTON_SW3_EXTI_IRQn};
00098
00099 #if (USE_BSP_COM_FEATURE > 0)
00100 static USART_TypeDef*  COM_USART[COMn] = {COM1_UART};
00101
00102 #if (USE_COM_LOG > 0)
00103 static COM_TypeDef COM_ActiveLogPort = COM1;
00104 #endif
00105
00106 #if (USE_HAL_UART_REGISTER_CALLBACKS == 1)
00107 static uint32_t IsComMspCbValid[COMn] = {0};
00108 #endif
00109 #endif /* (USE_BSP_COM_FEATURE > 0) */
00110 /**
00111   * @}
00112   */
00113
00114 /** @defgroup STM32WLXX_NUCLEO_LOW_LEVEL_Private_Functions LOW LEVEL Private Functions
00115   * @{
00116   */
00117 static void BUTTON_SW1_EXTI_Callback(void);
00118 static void BUTTON_SW2_EXTI_Callback(void);
00119 static void BUTTON_SW3_EXTI_Callback(void);
00120 #if (USE_BSP_COM_FEATURE > 0)
00121 static void COM1_MspInit(UART_HandleTypeDef *huart);
00122 static void COM1_MspDeInit(UART_HandleTypeDef *huart);
00123 #endif /* (USE_BSP_COM_FEATURE > 0) */
00124 /**
00125   * @}
00126   */
00127
00128
00129 /** @addtogroup STM32WLXX_NUCLEO_LOW_LEVEL_Exported_Functions
00130   * @{
00131   */
00132
00133 /**
00134   * @brief  This method returns the STM32WLXX NUCLEO BSP Driver revision
00135   * @retval version: 0xXYZR (8bits for each decimal, R for RC)
00136   */
00137 uint32_t BSP_GetVersion(void)
00138 {
00139   return (int32_t)__STM32WLXX_NUCLEO_BSP_VERSION;
00140 }
00141
00142 /** @addtogroup STM32WLXX_NUCLEO_LOW_LEVEL_LED_Functions
00143   * @{
00144   */
00145
00146 /**
00147   * @brief  Configures LED GPIO.
00148   * @param  Led: LED to be configured.
00149   *         This parameter can be one of the following values:
00150   *            @arg LED1
00151   *            @arg LED2
00152   *            @arg LED3
00153   * @retval BSP status
00154   */
00155 int32_t BSP_LED_Init(Led_TypeDef Led)
00156 {
00157   GPIO_InitTypeDef  gpio_init_structure = {0};
00158
00159   /* Enable the GPIO_LED Clock */
00160   LEDx_GPIO_CLK_ENABLE(Led);
00161
00162   /* Configure the GPIO_LED pin */
00163   gpio_init_structure.Pin = LED_PIN[Led];
00164   gpio_init_structure.Mode = GPIO_MODE_OUTPUT_PP;
00165   gpio_init_structure.Pull = GPIO_NOPULL;
00166   gpio_init_structure.Speed = GPIO_SPEED_FREQ_HIGH;
00167
00168   HAL_GPIO_Init(LED_PORT[Led], &gpio_init_structure);
00169   HAL_GPIO_WritePin(LED_PORT[Led], LED_PIN[Led], GPIO_PIN_RESET);
00170
00171   return BSP_ERROR_NONE;
00172 }
00173
00174 /**
00175   * @brief  DeInit LEDs.
00176   * @param  Led: LED to be de-init.
00177   *         This parameter can be one of the following values:
00178   *            @arg LED1
00179   *            @arg LED2
00180   *            @arg LED3
00181   * @note Led DeInit does not disable the GPIO clock nor disable the Mfx
00182   * @retval BSP status
00183   */
00184 int32_t BSP_LED_DeInit(Led_TypeDef Led)
00185 {
00186   /* Turn off LED */
00187   HAL_GPIO_WritePin(LED_PORT[Led], LED_PIN[Led], GPIO_PIN_RESET);
00188
00189   /* DeInit the GPIO_LED pin */
00190   HAL_GPIO_DeInit(LED_PORT[Led], LED_PIN[Led]);
00191
00192   return BSP_ERROR_NONE;
00193 }
00194
00195 /**
00196   * @brief  Turns selected LED On.
00197   * @param  Led: Specifies the Led to be set on.
00198   *         This parameter can be one of the following values:
00199   *            @arg LED1
00200   *            @arg LED2
00201   *            @arg LED3
00202   * @retval BSP status
00203   */
00204 int32_t BSP_LED_On(Led_TypeDef Led)
00205 {
00206   HAL_GPIO_WritePin(LED_PORT[Led], LED_PIN[Led], GPIO_PIN_SET);
00207
00208   return BSP_ERROR_NONE;
00209 }
00210
00211 /**
00212   * @brief  Turns selected LED Off.
00213   * @param  Led: Specifies the Led to be set off.
00214   *         This parameter can be one of the following values:
00215   *            @arg LED1
00216   *            @arg LED2
00217   *            @arg LED3
00218   * @retval BSP status
00219   */
00220 int32_t BSP_LED_Off(Led_TypeDef Led)
00221 {
00222   HAL_GPIO_WritePin(LED_PORT[Led], LED_PIN[Led], GPIO_PIN_RESET);
00223
00224   return BSP_ERROR_NONE;
00225 }
00226
00227 /**
00228   * @brief  Toggles the selected LED.
00229   * @param  Led: Specifies the Led to be toggled.
00230   *         This parameter can be one of the following values:
00231   *            @arg LED1
00232   *            @arg LED2
00233   *            @arg LED3
00234   * @retval BSP status
00235   */
00236 int32_t BSP_LED_Toggle(Led_TypeDef Led)
00237 {
00238   HAL_GPIO_TogglePin(LED_PORT[Led], LED_PIN[Led]);
00239
00240   return BSP_ERROR_NONE;
00241 }
00242
00243 /**
00244   * @brief  Get the status of the selected LED.
00245   * @param  Led Specifies the Led to get its state.
00246   *         This parameter can be one of following parameters:
00247   *            @arg LED1
00248   *            @arg LED2
00249   *            @arg LED3
00250   * @retval LED status
00251   */
00252 int32_t BSP_LED_GetState(Led_TypeDef Led)
00253 {
00254   return (int32_t)HAL_GPIO_ReadPin(LED_PORT[Led], LED_PIN[Led]);
00255 }
00256
00257 /**
00258   * @}
00259   */
00260
00261 /** @addtogroup STM32WLXX_NUCLEO_LOW_LEVEL_BUTTON_Functions
00262   * @{
00263   */
00264
00265 /**
00266   * @brief  Configures Button GPIO and EXTI Line.
00267   * @param  Button: Specifies the Button to be configured.
00268   *         This parameter can be one of following parameters:
00269   *           @arg BUTTON_SW1
00270   *           @arg BUTTON_SW2
00271   *           @arg BUTTON_SW3
00272   * @param  ButtonMode: Specifies Button mode.
00273   *   This parameter can be one of following parameters:
00274   *     @arg BUTTON_MODE_GPIO: Button will be used as simple IO
00275   *     @arg BUTTON_MODE_EXTI: Button will be connected to EXTI line with interrupt
00276   *                            generation capability
00277   * @retval BSP status
00278   */
00279 int32_t BSP_PB_Init(Button_TypeDef Button, ButtonMode_TypeDef ButtonMode)
00280 {
00281   GPIO_InitTypeDef gpio_init_structure = {0};
00282   static BSP_EXTI_LineCallback button_callback[BUTTONn] = {BUTTON_SW1_EXTI_Callback, BUTTON_SW2_EXTI_Callback, BUTTON_SW3_EXTI_Callback};
00283   static uint32_t button_interrupt_priority[BUTTONn] = {BSP_BUTTON_USER_IT_PRIORITY, BSP_BUTTON_USER_IT_PRIORITY, BSP_BUTTON_USER_IT_PRIORITY};
00284   static const uint32_t button_exti_line[BUTTONn] = {BUTTON_SW1_EXTI_LINE, BUTTON_SW2_EXTI_LINE, BUTTON_SW3_EXTI_LINE};
00285
00286   /* Enable the BUTTON Clock */
00287   BUTTONx_GPIO_CLK_ENABLE(Button);
00288
00289   gpio_init_structure.Pin = BUTTON_PIN[Button];
00290   gpio_init_structure.Pull = GPIO_PULLUP;
00291   gpio_init_structure.Speed = GPIO_SPEED_FREQ_HIGH;
00292
00293   if(ButtonMode == BUTTON_MODE_GPIO)
00294   {
00295     /* Configure Button pin as input */
00296     gpio_init_structure.Mode = GPIO_MODE_INPUT;
00297     HAL_GPIO_Init(BUTTON_PORT[Button], &gpio_init_structure);
00298   }
00299   else /* (ButtonMode == BUTTON_MODE_EXTI) */
00300   {
00301     /* Configure Button pin as input with External interrupt */
00302     gpio_init_structure.Mode = GPIO_MODE_IT_FALLING;
00303
00304     HAL_GPIO_Init(BUTTON_PORT[Button], &gpio_init_structure);
00305
00306     (void)HAL_EXTI_GetHandle(&hpb_exti[Button], button_exti_line[Button]);
00307     (void)HAL_EXTI_RegisterCallback(&hpb_exti[Button],  HAL_EXTI_COMMON_CB_ID, button_callback[Button]);
00308
00309     /* Enable and set Button EXTI Interrupt to the lowest priority */
00310     HAL_NVIC_SetPriority((BUTTON_IRQn[Button]), button_interrupt_priority[Button], 0x00);
00311     HAL_NVIC_EnableIRQ((BUTTON_IRQn[Button]));
00312   }
00313
00314   return BSP_ERROR_NONE;
00315 }
00316
00317 /**
00318   * @brief  Push Button DeInit.
00319   * @param  Button: Button to be configured
00320   *         This parameter can be one of following parameters:
00321   *           @arg BUTTON_SW1
00322   *           @arg BUTTON_SW2
00323   *           @arg BUTTON_SW3
00324   * @note PB DeInit does not disable the GPIO clock
00325   * @retval BSP status
00326   */
00327 int32_t BSP_PB_DeInit(Button_TypeDef Button)
00328 {
00329   HAL_NVIC_DisableIRQ((BUTTON_IRQn[Button]));
00330   HAL_GPIO_DeInit(BUTTON_PORT[Button], BUTTON_PIN[Button]);
00331
00332   return BSP_ERROR_NONE;
00333 }
00334
00335 /**
00336   * @brief  Returns the selected Button state.
00337   * @param  Button: Specifies the Button to be checked.
00338   *         This parameter can be one of following parameters:
00339   *           @arg BUTTON_SW1
00340   *           @arg BUTTON_SW2
00341   *           @arg BUTTON_SW3
00342   * @retval The Button GPIO pin value.
00343   */
00344 int32_t BSP_PB_GetState(Button_TypeDef Button)
00345 {
00346   return (int32_t)HAL_GPIO_ReadPin(BUTTON_PORT[Button], BUTTON_PIN[Button]);
00347 }
00348
00349 /**
00350   * @brief  This function handles Push-Button interrupt requests.
00351   * @param  Button Specifies the pin connected EXTI line
00352   * @retval None
00353   */
00354 void BSP_PB_IRQHandler(Button_TypeDef Button)
00355 {
00356   HAL_EXTI_IRQHandler(&hpb_exti[Button]);
00357 }
00358
00359 /**
00360   * @brief  BSP Push Button callback
00361   * @param  Button: Specifies the Button to be checked.
00362   *         This parameter can be one of following parameters:
00363   *           @arg BUTTON_SW1
00364   *           @arg BUTTON_SW2
00365   *           @arg BUTTON_SW3
00366   * @retval None.
00367   */
00368 __weak void BSP_PB_Callback(Button_TypeDef Button)
00369 {
00370   /* Prevent unused argument(s) compilation warning */
00371   UNUSED(Button);
00372
00373   /* This function should be implemented by the user application.
00374      It is called into this driver when an event on Button is triggered. */
00375 }
00376
00377 /**
00378   * @}
00379   */
00380
00381 #if (USE_BSP_COM_FEATURE > 0)
00382 /** @addtogroup STM32WLXX_NUCLEO_LOW_LEVEL_COM_Functions
00383   * @{
00384   */
00385 /**
00386   * @brief  Configures COM port.
00387   * @param  COM COM port to be configured.
00388   *         This parameter can be COM1
00389   * @param  COM_Init Pointer to a UART_HandleTypeDef structure that contains the
00390   *                  configuration information for the specified USART peripheral.
00391   * @retval BSP error code
00392   */
00393 int32_t BSP_COM_Init(COM_TypeDef COM, COM_InitTypeDef *COM_Init)
00394 {
00395   int32_t ret = BSP_ERROR_NONE;
00396
00397   if(COM > COMn)
00398   {
00399     ret = BSP_ERROR_WRONG_PARAM;
00400   }
00401   else
00402   {
00403 #if (USE_HAL_UART_REGISTER_CALLBACKS == 0)
00404     /* Init the UART Msp */
00405     COM1_MspInit(&hcom_uart[COM]);
00406 #else
00407     if(IsComMspCbValid == 0U)
00408     {
00409       if(BSP_COM_RegisterDefaultMspCallbacks(COM) != BSP_ERROR_NONE)
00410       {
00411         return BSP_ERROR_MSP_FAILURE;
00412       }
00413     }
00414 #endif
00415
00416     if(MX_LPUART1_Init(&hcom_uart[COM], COM_Init) != HAL_OK)
00417     {
00418       return BSP_ERROR_PERIPH_FAILURE;
00419     }
00420   }
00421
00422   return ret;
00423 }
00424
00425 /**
00426   * @brief  DeInit COM port.
00427   * @param  COM COM port to be configured.
00428   *          This parameter can be COM1
00429   * @retval BSP status
00430   */
00431 int32_t BSP_COM_DeInit(COM_TypeDef COM)
00432 {
00433   int32_t ret = BSP_ERROR_NONE;
00434
00435   if(COM >= COMn)
00436   {
00437     ret = BSP_ERROR_WRONG_PARAM;
00438   }
00439   else
00440   {
00441     /* USART configuration */
00442     hcom_uart[COM].Instance = COM_USART[COM];
00443
00444 #if (USE_HAL_UART_REGISTER_CALLBACKS == 0)
00445     COM1_MspDeInit(&hcom_uart[COM]);
00446 #endif /* (USE_HAL_UART_REGISTER_CALLBACKS == 0) */
00447
00448     if(HAL_UART_DeInit(&hcom_uart[COM]) != HAL_OK)
00449     {
00450       return BSP_ERROR_PERIPH_FAILURE;
00451     }
00452   }
00453
00454   return ret;
00455 }
00456
00457 /**
00458   * @brief  Configures COM port.
00459   * @param  huart USART handle
00460   * @param  COM_Init Pointer to a UART_HandleTypeDef structure that contains the
00461   *                  configuration information for the specified USART peripheral.
00462   * @retval HAL error code
00463   */
00464 __weak HAL_StatusTypeDef MX_LPUART1_Init(UART_HandleTypeDef *huart, MX_UART_InitTypeDef *COM_Init)
00465 {
00466   /* USART configuration */
00467  huart->Instance          = COM_USART[COM1];
00468  huart->Init.BaudRate     = COM_Init->BaudRate;
00469  huart->Init.Mode         = UART_MODE_TX_RX;
00470  huart->Init.Parity       = (uint32_t)COM_Init->Parity;
00471  huart->Init.WordLength   = COM_Init->WordLength;
00472  huart->Init.StopBits     = (uint32_t)COM_Init->StopBits;
00473  huart->Init.HwFlowCtl    = (uint32_t)COM_Init->HwFlowCtl;
00474  huart->Init.OverSampling = UART_OVERSAMPLING_8;
00475
00476  return HAL_UART_Init(huart);
00477 }
00478
00479 #if (USE_HAL_UART_REGISTER_CALLBACKS == 1)
00480 /**
00481   * @brief Register Default COM Msp Callbacks
00482   * @param  COM COM port to be configured.
00483   *          This parameter can be COM1
00484   * @retval BSP status
00485   */
00486 int32_t BSP_COM_RegisterDefaultMspCallbacks(COM_TypeDef COM)
00487 {
00488   int32_t ret = BSP_ERROR_NONE;
00489
00490   if(COM >= COMn)
00491   {
00492     ret = BSP_ERROR_WRONG_PARAM;
00493   }
00494   else
00495   {
00496     __HAL_UART_RESET_HANDLE_STATE(&hcom_uart[COM]);
00497
00498     /* Register default MspInit/MspDeInit Callback */
00499     if(HAL_UART_RegisterCallback(&hcom_uart[COM], HAL_UART_MSPINIT_CB_ID, COM1_MspInit) != HAL_OK)
00500     {
00501       ret = BSP_ERROR_PERIPH_FAILURE;
00502     }
00503     else if(HAL_UART_RegisterCallback(&hcom_uart[COM], HAL_UART_MSPDEINIT_CB_ID, COM1_MspDeInit) != HAL_OK)
00504     {
00505       ret = BSP_ERROR_PERIPH_FAILURE;
00506     }
00507     else
00508     {
00509       IsComMspCbValid[COM] = 1U;
00510     }
00511   }
00512
00513   /* BSP status */
00514   return ret;
00515 }
00516
00517 /**
00518   * @brief Register COM Msp Callback registering
00519   * @param  COM COM port to be configured.
00520   *          This parameter can be COM1
00521   * @param Callbacks     pointer to COM1 MspInit/MspDeInit callback functions
00522   * @retval BSP status
00523   */
00524 int32_t BSP_COM_RegisterMspCallbacks(COM_TypeDef COM , BSP_COM_Cb_t *Callback)
00525 {
00526   int32_t ret = BSP_ERROR_NONE;
00527
00528   if(COM >= COMn)
00529   {
00530     ret = BSP_ERROR_WRONG_PARAM;
00531   }
00532   else
00533   {
00534     __HAL_UART_RESET_HANDLE_STATE(&hcom_uart[COM]);
00535
00536     /* Register MspInit/MspDeInit Callbacks */
00537     if(HAL_UART_RegisterCallback(&hcom_uart[COM], HAL_UART_MSPINIT_CB_ID, Callback->pMspInitCb) != HAL_OK)
00538     {
00539       ret = BSP_ERROR_PERIPH_FAILURE;
00540     }
00541     else if(HAL_UART_RegisterCallback(&hcom_uart[COM], HAL_UART_MSPDEINIT_CB_ID, Callback->pMspDeInitCb) != HAL_OK)
00542     {
00543       ret = BSP_ERROR_PERIPH_FAILURE;
00544     }
00545     else
00546     {
00547       IsComMspCbValid[COM] = 1U;
00548     }
00549   }
00550   /* BSP status */
00551   return ret;
00552 }
00553 #endif /* USE_HAL_UART_REGISTER_CALLBACKS */
00554
00555 #if (USE_COM_LOG > 0)
00556 /**
00557   * @brief  Select the active COM port.
00558   * @param  COM COM port to be activated.
00559   *          This parameter can be COM1
00560   * @retval BSP status
00561   */
00562 int32_t BSP_COM_SelectLogPort(COM_TypeDef COM)
00563 {
00564   if(COM_ActiveLogPort != COM)
00565   {
00566     COM_ActiveLogPort = COM;
00567   }
00568   return BSP_ERROR_NONE;
00569 }
00570
00571 #if defined(__ICCARM__)
00572 /**
00573   * @brief  Retargets the C library __write function to the IAR function iar_fputc.
00574   * @param  file: file descriptor.
00575   * @param  ptr: pointer to the buffer where the data is stored.
00576   * @param  len: length of the data to write in bytes.
00577   * @retval length of the written data in bytes.
00578   */
00579 size_t __write(int file, unsigned char const *ptr, size_t len)
00580 {
00581   size_t idx;
00582   unsigned char const *pdata = ptr;
00583
00584   for (idx = 0; idx < len; idx++)
00585   {
00586     iar_fputc((int)*pdata);
00587     pdata++;
00588   }
00589   return len;
00590 }
00591 #endif /* __ICCARM__ */
00592
00593 /**
00594   * @brief  Redirect console output to COM
00595   */
00596 PUTCHAR_PROTOTYPE
00597 {
00598   (void) HAL_UART_Transmit(&hcom_uart [COM_ActiveLogPort], (uint8_t *) &ch, 1, COM_POLL_TIMEOUT);
00599   return ch;
00600 }
00601 #endif /* USE_COM_LOG */
00602 /**
00603   * @}
00604   */
00605 #endif /* (USE_BSP_COM_FEATURE > 0) */
00606
00607 /**
00608   * @}
00609   */
00610
00611 /** @addtogroup STM32WLXX_NUCLEO_LOW_LEVEL_Private_Functions
00612   * @{
00613   */
00614
00615 /**
00616   * @brief  Button SW1 EXTI line detection callback.
00617   * @retval None
00618   */
00619 static void BUTTON_SW1_EXTI_Callback(void)
00620 {
00621   BSP_PB_Callback(BUTTON_SW1);
00622 }
00623
00624 /**
00625   * @brief  Button SW2 EXTI line detection callback.
00626   * @retval None
00627   */
00628 static void BUTTON_SW2_EXTI_Callback(void)
00629 {
00630   BSP_PB_Callback(BUTTON_SW2);
00631 }
00632
00633 /**
00634   * @brief  Button SW3 EXTI line detection callback.
00635   * @retval None
00636   */
00637 static void BUTTON_SW3_EXTI_Callback(void)
00638 {
00639   BSP_PB_Callback(BUTTON_SW3);
00640 }
00641
00642 #if (USE_BSP_COM_FEATURE > 0)
00643 /**
00644   * @brief  Initializes COM1 MSP.
00645   * @param  huart UART handle
00646   * @retval BSP status
00647   */
00648 static void COM1_MspInit(UART_HandleTypeDef *huart)
00649 {
00650   GPIO_InitTypeDef gpio_init_structure;
00651
00652   /* Prevent unused argument(s) compilation warning */
00653   UNUSED(huart);
00654
00655   /* Enable GPIO clock */
00656   COM1_TX_GPIO_CLK_ENABLE();
00657   COM1_RX_GPIO_CLK_ENABLE();
00658
00659   /* Enable USART clock */
00660   COM1_CLK_ENABLE();
00661
00662   /* Configure USART Tx as alternate function */
00663   gpio_init_structure.Pin       = COM1_TX_PIN;
00664   gpio_init_structure.Mode      = GPIO_MODE_AF_PP;
00665   gpio_init_structure.Speed     = GPIO_SPEED_FREQ_HIGH;
00666   gpio_init_structure.Pull      = GPIO_PULLUP;
00667   gpio_init_structure.Alternate = COM1_TX_AF;
00668   HAL_GPIO_Init(COM1_TX_GPIO_PORT, &gpio_init_structure);
00669
00670   /* Configure USART Rx as alternate function */
00671   gpio_init_structure.Pin = COM1_RX_PIN;
00672   gpio_init_structure.Mode = GPIO_MODE_AF_PP;
00673   gpio_init_structure.Alternate = COM1_RX_AF;
00674   HAL_GPIO_Init(COM1_RX_GPIO_PORT, &gpio_init_structure);
00675 }
00676
00677 /**
00678   * @brief  DeInitialize COM1 MSP part
00679   * @param  huart UART handle
00680   * @retval BSP status
00681   */
00682 static void COM1_MspDeInit(UART_HandleTypeDef *huart)
00683 {
00684   GPIO_InitTypeDef gpio_init_structure;
00685
00686   /* Prevent unused argument(s) compilation warning */
00687   UNUSED(huart);
00688
00689   /* COM GPIO pin configuration */
00690   gpio_init_structure.Pin  = COM1_TX_PIN;
00691   HAL_GPIO_DeInit(COM1_TX_GPIO_PORT, gpio_init_structure.Pin);
00692
00693   gpio_init_structure.Pin  = COM1_RX_PIN;
00694   HAL_GPIO_DeInit(COM1_RX_GPIO_PORT, gpio_init_structure.Pin);
00695
00696   /* Disable USART clock */
00697   COM1_CLK_DISABLE();
00698 }
00699 #endif /* (USE_BSP_COM_FEATURE > 0) */
00700
00701 /**
00702   * @}
00703   */
00704
00705 /**
00706   * @}
00707   */
00708
00709 /**
00710   * @}
00711   */
00712
00713 /**
00714   * @}
00715   */


STM32WLxx_Nucleo BSP User Manual: stm32wlxx_nucleo.h Source File

  • File List
  • Globals
  • Firmware
  • Drivers
  • BSP
  • STM32WLxx_Nucleo
stm32wlxx_nucleo.h
Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   * @file    stm32wlxx_nucleo.h
00004   * @author  MCD Application Team
00005   * @brief   Header for stm32wlxx_nucleo.c
00006   ******************************************************************************
00007   * @attention
00008   *
00009   * Copyright (c) 2020-2021 STMicroelectronics.
00010   * All rights reserved.
00011   *
00012   * This software is licensed under terms that can be found in the LICENSE file
00013   * in the root directory of this software component.
00014   * If no LICENSE file comes with this software, it is provided AS-IS.
00015   *
00016   ******************************************************************************
00017   */
00018
00019 /* Define to prevent recursive inclusion -------------------------------------*/
00020 #ifndef STM32WLXX_NUCLEO_H
00021 #define STM32WLXX_NUCLEO_H
00022
00023 #ifdef __cplusplus
00024  extern "C" {
00025 #endif
00026
00027 /* Includes ------------------------------------------------------------------*/
00028 #include "stm32wlxx_nucleo_errno.h"
00029 #include "stm32wlxx_nucleo_conf.h"
00030
00031 #if (USE_BSP_COM_FEATURE > 0)
00032   #if (USE_COM_LOG > 0)
00033     #ifndef __GNUC__
00034       #include "stdio.h"
00035     #endif
00036   #endif
00037 #endif
00038
00039 /** @addtogroup BSP
00040   * @{
00041   */
00042
00043 /** @defgroup STM32WLXX_NUCLEO STM32WLXX-NUCLEO
00044   * @{
00045   */
00046
00047 /** @defgroup STM32WLXX_NUCLEO_LOW_LEVEL LOW LEVEL
00048   * @{
00049   */
00050
00051 /** @defgroup STM32WLXX_NUCLEO_LOW_LEVEL_Exported_Types LOW LEVEL Exported Types
00052   * @{
00053   */
00054 typedef enum
00055 {
00056   LED1 = 0,
00057   LED2 = 1,
00058   LED3 = 2,
00059   /* Color led aliases */
00060   LED_BLUE   = LED1,
00061   LED_GREEN  = LED2,
00062   LED_RED    = LED3
00063 }Led_TypeDef;
00064
00065 typedef enum
00066 {
00067   BUTTON_SW1 = 0,
00068   BUTTON_SW2 = 1,
00069   BUTTON_SW3 = 2,
00070 }Button_TypeDef;
00071
00072 typedef enum
00073 {
00074   BUTTON_MODE_GPIO = 0,
00075   BUTTON_MODE_EXTI = 1
00076 }ButtonMode_TypeDef;
00077
00078 #if (USE_BSP_COM_FEATURE > 0)
00079 typedef enum
00080 {
00081   COM1 = 0U,
00082   COMn
00083 }COM_TypeDef;
00084
00085 typedef enum
00086 {
00087   COM_STOPBITS_1     =   UART_STOPBITS_1,
00088   COM_STOPBITS_2     =   UART_STOPBITS_2,
00089 }COM_StopBitsTypeDef;
00090
00091 typedef enum
00092 {
00093   COM_PARITY_NONE     =  UART_PARITY_NONE,
00094   COM_PARITY_EVEN     =  UART_PARITY_EVEN,
00095   COM_PARITY_ODD      =  UART_PARITY_ODD,
00096 }COM_ParityTypeDef;
00097
00098 typedef enum
00099 {
00100   COM_HWCONTROL_NONE    =  UART_HWCONTROL_NONE,
00101   COM_HWCONTROL_RTS     =  UART_HWCONTROL_RTS,
00102   COM_HWCONTROL_CTS     =  UART_HWCONTROL_CTS,
00103   COM_HWCONTROL_RTS_CTS =  UART_HWCONTROL_RTS_CTS,
00104 }COM_HwFlowCtlTypeDef;
00105
00106 typedef enum
00107 {
00108   COM_WORDLENGTH_7B = UART_WORDLENGTH_7B,
00109   COM_WORDLENGTH_8B = UART_WORDLENGTH_8B,
00110   COM_WORDLENGTH_9B = UART_WORDLENGTH_9B,
00111 }COM_WordLengthTypeDef;
00112
00113 typedef struct
00114 {
00115   uint32_t              BaudRate;
00116   COM_WordLengthTypeDef WordLength;
00117   COM_StopBitsTypeDef   StopBits;
00118   COM_ParityTypeDef     Parity;
00119   COM_HwFlowCtlTypeDef  HwFlowCtl;
00120 }COM_InitTypeDef;
00121
00122 #if (USE_HAL_UART_REGISTER_CALLBACKS == 1)
00123 typedef struct
00124 {
00125   pUART_CallbackTypeDef  pMspInitCb;
00126   pUART_CallbackTypeDef  pMspDeInitCb;
00127 }BSP_COM_Cb_t;
00128 #endif /* (USE_HAL_UART_REGISTER_CALLBACKS == 1) */
00129 #endif /* (USE_BSP_COM_FEATURE > 0) */
00130
00131 typedef enum
00132 {
00133   ABSENT  = 0,
00134   PRESENT = 1,
00135 }Presence_TypeDef;
00136 /**
00137   * @}
00138   */
00139
00140 /** @defgroup STM32WLXX_NUCLEO_LOW_LEVEL_Exported_Constants LOW LEVEL Exported Constants
00141   * @{
00142   */
00143
00144 /**
00145   * @brief STM32WLXX NUCLEO BSP Driver version number
00146   */
00147 #define __STM32WLXX_NUCLEO_BSP_VERSION_MAIN   (0x01U) /*!< [31:24] main version */
00148 #define __STM32WLXX_NUCLEO_BSP_VERSION_SUB1   (0x03U) /*!< [23:16] sub1 version */
00149 #define __STM32WLXX_NUCLEO_BSP_VERSION_SUB2   (0x00U) /*!< [15:8]  sub2 version */
00150 #define __STM32WLXX_NUCLEO_BSP_VERSION_RC     (0x00U) /*!< [7:0]  release candidate */
00151 #define __STM32WLXX_NUCLEO_BSP_VERSION        ((__STM32WLXX_NUCLEO_BSP_VERSION_MAIN << 24)\
00152                                               |(__STM32WLXX_NUCLEO_BSP_VERSION_SUB1 << 16)\
00153                                               |(__STM32WLXX_NUCLEO_BSP_VERSION_SUB2 << 8 )\
00154                                               |(__STM32WLXX_NUCLEO_BSP_VERSION_RC))
00155
00156 /**
00157   * @brief Define for STM32WLXX_NUCLEO board
00158   */
00159 #if !defined (USE_STM32WLXX_NUCLEO)
00160  #define USE_STM32WLXX_NUCLEO
00161 #endif
00162
00163 /** @defgroup STM32WLXX_NUCLEO_LOW_LEVEL_LED LOW LEVEL LED Constants
00164   * @{
00165   */
00166 #define LEDn                                    3
00167
00168 #define LED1_PIN                                GPIO_PIN_15
00169 #define LED1_GPIO_PORT                          GPIOB
00170 #define LED1_GPIO_CLK_ENABLE()                  __HAL_RCC_GPIOB_CLK_ENABLE()
00171 #define LED1_GPIO_CLK_DISABLE()                 __HAL_RCC_GPIOB_CLK_DISABLE()
00172
00173 #define LED2_PIN                                GPIO_PIN_9
00174 #define LED2_GPIO_PORT                          GPIOB
00175 #define LED2_GPIO_CLK_ENABLE()                  __HAL_RCC_GPIOB_CLK_ENABLE()
00176 #define LED2_GPIO_CLK_DISABLE()                 __HAL_RCC_GPIOB_CLK_DISABLE()
00177
00178 #define LED3_PIN                                GPIO_PIN_11
00179 #define LED3_GPIO_PORT                          GPIOB
00180 #define LED3_GPIO_CLK_ENABLE()                  __HAL_RCC_GPIOB_CLK_ENABLE()
00181 #define LED3_GPIO_CLK_DISABLE()                 __HAL_RCC_GPIOB_CLK_DISABLE()
00182
00183 #define LEDx_GPIO_CLK_ENABLE(__INDEX__)         __HAL_RCC_GPIOB_CLK_ENABLE() /* All Led on same port */
00184 #define LEDx_GPIO_CLK_DISABLE(__INDEX__)        __HAL_RCC_GPIOB_CLK_DISABLE() /* All Led on same port */
00185 /**
00186   * @}
00187   */
00188
00189 /** @defgroup STM32WLXX_NUCLEO_LOW_LEVEL_BUTTON LOW LEVEL BUTTON Constants
00190   * @{
00191   */
00192 #define BUTTONn                                 3
00193
00194 /**
00195  * @brief Key push-buttons
00196  */
00197 #define BUTTON_SW1_PIN                          GPIO_PIN_0
00198 #define BUTTON_SW1_GPIO_PORT                    GPIOA
00199 #define BUTTON_SW1_GPIO_CLK_ENABLE()            __HAL_RCC_GPIOA_CLK_ENABLE()
00200 #define BUTTON_SW1_GPIO_CLK_DISABLE()           __HAL_RCC_GPIOA_CLK_DISABLE()
00201 #define BUTTON_SW1_EXTI_LINE                    EXTI_LINE_0
00202 #ifdef CORE_CM0PLUS
00203 #define BUTTON_SW1_EXTI_IRQn                    EXTI1_0_IRQn
00204 #else
00205 #define BUTTON_SW1_EXTI_IRQn                    EXTI0_IRQn
00206 #endif
00207 #define H_EXTI_0                                hpb_exti[BUTTON_SW1]
00208
00209 #define BUTTON_SW2_PIN                          GPIO_PIN_1
00210 #define BUTTON_SW2_GPIO_PORT                    GPIOA
00211 #define BUTTON_SW2_GPIO_CLK_ENABLE()            __HAL_RCC_GPIOA_CLK_ENABLE()
00212 #define BUTTON_SW2_GPIO_CLK_DISABLE()           __HAL_RCC_GPIOA_CLK_DISABLE()
00213 #define BUTTON_SW2_EXTI_LINE                    EXTI_LINE_1
00214 #ifdef CORE_CM0PLUS
00215 #define BUTTON_SW2_EXTI_IRQn                    EXTI1_0_IRQn
00216 #else
00217 #define BUTTON_SW2_EXTI_IRQn                    EXTI1_IRQn
00218 #endif
00219 #define H_EXTI_1                                hpb_exti[BUTTON_SW2]
00220
00221 #define BUTTON_SW3_PIN                          GPIO_PIN_6
00222 #define BUTTON_SW3_GPIO_PORT                    GPIOC
00223 #define BUTTON_SW3_GPIO_CLK_ENABLE()            __HAL_RCC_GPIOC_CLK_ENABLE()
00224 #define BUTTON_SW3_GPIO_CLK_DISABLE()           __HAL_RCC_GPIOC_CLK_DISABLE()
00225 #define BUTTON_SW3_EXTI_LINE                    EXTI_LINE_6
00226 #ifdef CORE_CM0PLUS
00227 #define BUTTON_SW3_EXTI_IRQn                    EXTI15_4_IRQn
00228 #else
00229 #define BUTTON_SW3_EXTI_IRQn                    EXTI9_5_IRQn
00230 #endif
00231 #define H_EXTI_6                                hpb_exti[BUTTON_SW3]
00232
00233 #define BUTTONx_GPIO_CLK_ENABLE(__INDEX__)    do { if ((__INDEX__) == BUTTON_SW1) BUTTON_SW1_GPIO_CLK_ENABLE(); else \
00234                                               if ((__INDEX__) == BUTTON_SW2) BUTTON_SW2_GPIO_CLK_ENABLE(); else \
00235                                               if ((__INDEX__) == BUTTON_SW3) BUTTON_SW3_GPIO_CLK_ENABLE();} while(0)
00236
00237 #define BUTTONx_GPIO_CLK_DISABLE(__INDEX__)    do { if ((__INDEX__) == BUTTON_SW1) BUTTON_SW1_GPIO_CLK_DISABLE(); else \
00238                                               if ((__INDEX__) == BUTTON_SW2) BUTTON_SW2_GPIO_CLK_DISABLE(); else \
00239                                               if ((__INDEX__) == BUTTON_SW3) BUTTON_SW3_GPIO_CLK_DISABLE();} while(0)
00240
00241 /**
00242   * @}
00243   */
00244
00245 #if (USE_BSP_COM_FEATURE > 0)
00246 /** @defgroup STM32WLXX_NUCLEO_LOW_LEVEL_COM LOW LEVEL COM Port Constants
00247   * @{
00248   */
00249 #define COM1_UART                             LPUART1
00250 #define COM1_CLK_ENABLE()                     __HAL_RCC_LPUART1_CLK_ENABLE()
00251 #define COM1_CLK_DISABLE()                    __HAL_RCC_LPUART1_CLK_DISABLE()
00252
00253 #define COM1_TX_PIN                           GPIO_PIN_2
00254 #define COM1_TX_GPIO_PORT                     GPIOA
00255 #define COM1_TX_GPIO_CLK_ENABLE()             __HAL_RCC_GPIOA_CLK_ENABLE()
00256 #define COM1_TX_GPIO_CLK_DISABLE()            __HAL_RCC_GPIOA_CLK_DISABLE()
00257 #define COM1_TX_AF                            GPIO_AF8_LPUART1
00258
00259 #define COM1_RX_PIN                           GPIO_PIN_3
00260 #define COM1_RX_GPIO_PORT                     GPIOA
00261 #define COM1_RX_GPIO_CLK_ENABLE()             __HAL_RCC_GPIOA_CLK_ENABLE()
00262 #define COM1_RX_GPIO_CLK_DISABLE()            __HAL_RCC_GPIOA_CLK_DISABLE()
00263 #define COM1_RX_AF                            GPIO_AF8_LPUART1
00264 #define COM_POLL_TIMEOUT                      1000
00265
00266 #define MX_UART_InitTypeDef COM_InitTypeDef
00267 /**
00268   * @}
00269   */
00270 #endif /* (USE_BSP_COM_FEATURE > 0)*/
00271
00272 /**
00273   * @}
00274   */
00275
00276 /** @addtogroup STM32WLXX_NUCLEO_LOW_LEVEL_Exported_Variables
00277   * @{
00278   */
00279 extern EXTI_HandleTypeDef hpb_exti[];
00280 #if (USE_BSP_COM_FEATURE > 0)
00281 extern UART_HandleTypeDef hcom_uart[];
00282 #endif /* (USE_BSP_COM_FEATURE > 0) */
00283 /**
00284   * @}
00285   */
00286
00287 /** @defgroup STM32WLXX_NUCLEO_LOW_LEVEL_Exported_Functions LOW LEVEL Exported Functions
00288   * @{
00289   */
00290 uint32_t         BSP_GetVersion(void);
00291
00292 /** @defgroup STM32WLXX_NUCLEO_LOW_LEVEL_LED_Functions LOW LEVEL LED Functions
00293   * @{
00294   */
00295 int32_t          BSP_LED_Init(Led_TypeDef Led);
00296 int32_t          BSP_LED_DeInit(Led_TypeDef Led);
00297 int32_t          BSP_LED_On(Led_TypeDef Led);
00298 int32_t          BSP_LED_Off(Led_TypeDef Led);
00299 int32_t          BSP_LED_Toggle(Led_TypeDef Led);
00300 int32_t          BSP_LED_GetState(Led_TypeDef Led);
00301 /**
00302   * @}
00303   */
00304
00305 /** @defgroup STM32WLXX_NUCLEO_LOW_LEVEL_BUTTON_Functions  LOW LEVEL BUTTON Functions
00306   * @{
00307   */
00308 int32_t          BSP_PB_Init(Button_TypeDef Button, ButtonMode_TypeDef ButtonMode);
00309 int32_t          BSP_PB_DeInit(Button_TypeDef Button);
00310 int32_t          BSP_PB_GetState(Button_TypeDef Button);
00311 void             BSP_PB_Callback(Button_TypeDef Button);
00312 void             BSP_PB_IRQHandler(Button_TypeDef Button);
00313 /**
00314   * @}
00315   */
00316
00317 #if (USE_BSP_COM_FEATURE > 0)
00318 /** @defgroup STM32WLXX_NUCLEO_LOW_LEVEL_COM_Functions LOW LEVEL COM Port Functions
00319   * @{
00320   */
00321 int32_t  BSP_COM_Init(COM_TypeDef COM, COM_InitTypeDef *COM_Init);
00322 int32_t  BSP_COM_DeInit(COM_TypeDef COM);
00323 #if (USE_COM_LOG > 0)
00324 int32_t  BSP_COM_SelectLogPort (COM_TypeDef COM);
00325 #endif
00326 #if (USE_HAL_UART_REGISTER_CALLBACKS == 1)
00327 int32_t  BSP_COM_RegisterDefaultMspCallbacks(COM_TypeDef COM);
00328 int32_t  BSP_COM_RegisterMspCallbacks(COM_TypeDef COM , BSP_COM_Cb_t *Callback);
00329 #endif /* USE_HAL_UART_REGISTER_CALLBACKS */
00330 HAL_StatusTypeDef MX_LPUART1_Init(UART_HandleTypeDef *huart, MX_UART_InitTypeDef *COM_Init);
00331 /**
00332   * @}
00333   */
00334 #endif /* (USE_BSP_COM_FEATURE > 0) */
00335
00336 /**
00337   * @}
00338   */
00339
00340 /**
00341   * @}
00342   */
00343
00344 /**
00345   * @}
00346   */
00347
00348 /**
00349   * @}
00350   */
00351
00352 #ifdef __cplusplus
00353 }
00354 #endif
00355
00356 #endif /* STM32WLXX_NUCLEO_H */


STM32WLxx_Nucleo BSP User Manual: stm32wlxx_nucleo_conf_template.h Source File

  • File List
  • Globals
  • Firmware
  • Drivers
  • BSP
  • STM32WLxx_Nucleo
stm32wlxx_nucleo_conf_template.h
Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   * @file    stm32wlxx_nucleo_conf.h
00004   * @author  MCD Application Team
00005   * @brief   STM32WLxx_Nucleo board configuration file.
00006   ******************************************************************************
00007   * @attention
00008   *
00009   * Copyright (c) 2020-2021 STMicroelectronics.
00010   * All rights reserved.
00011   *
00012   * This software is licensed under terms that can be found in the LICENSE file
00013   * in the root directory of this software component.
00014   * If no LICENSE file comes with this software, it is provided AS-IS.
00015   *
00016   ******************************************************************************
00017   */
00018
00019 /* Define to prevent recursive inclusion -------------------------------------*/
00020 #ifndef STM32WLXX_NUCLEO_CONF_H
00021 #define STM32WLXX_NUCLEO_CONF_H
00022
00023 #ifdef __cplusplus
00024  extern "C" {
00025 #endif
00026
00027 /* Includes ------------------------------------------------------------------*/
00028 #include "stm32wlxx_hal.h"
00029
00030 /** @addtogroup BSP
00031   * @{
00032   */
00033
00034 /** @addtogroup STM32WLXX_NUCLEO
00035   * @{
00036   */
00037
00038 /** @defgroup STM32WLXX_NUCLEO_CONFIG CONFIG
00039   * @{
00040   */
00041
00042 /** @defgroup STM32WLXX_NUCLEO_CONFIG_Exported_Constants Exported Constants
00043   * @{
00044   */
00045 /* COM usage define */
00046 #define USE_BSP_COM_FEATURE                 0U
00047
00048 /* COM log define */
00049 #define USE_COM_LOG                         0U
00050
00051 /* IRQ priorities */
00052 #define BSP_BUTTON_USER_IT_PRIORITY         15U
00053
00054 /**
00055   * @}
00056   */
00057
00058 /**
00059   * @}
00060   */
00061
00062 /**
00063   * @}
00064   */
00065
00066 /**
00067   * @}
00068   */
00069
00070 #ifdef __cplusplus
00071 }
00072 #endif
00073
00074 #endif /* STM32WLXX_NUCLEO_CONF_H */


STM32WLxx_Nucleo BSP User Manual: stm32wlxx_nucleo_errno.h Source File

  • File List
  • Globals
  • Firmware
  • Drivers
  • BSP
  • STM32WLxx_Nucleo
stm32wlxx_nucleo_errno.h
Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   * @file    stm32wlxx_nucleo_errno.h
00004   * @author  MCD Application Team
00005   * @brief   Error Code.
00006   ******************************************************************************
00007   * @attention
00008   *
00009   * Copyright (c) 2020-2021 STMicroelectronics.
00010   * All rights reserved.
00011   *
00012   * This software is licensed under terms that can be found in the LICENSE file
00013   * in the root directory of this software component.
00014   * If no LICENSE file comes with this software, it is provided AS-IS.
00015   *
00016   ******************************************************************************
00017   */
00018
00019 /* Define to prevent recursive inclusion -------------------------------------*/
00020 #ifndef STM32WLXX_NUCLEO_ERRNO_H
00021 #define STM32WLXX_NUCLEO_ERRNO_H
00022
00023 #ifdef __cplusplus
00024  extern "C" {
00025 #endif
00026
00027 /* Common Error codes */
00028 #define BSP_ERROR_NONE                         0
00029 #define BSP_ERROR_NO_INIT                     -1
00030 #define BSP_ERROR_WRONG_PARAM                 -2
00031 #define BSP_ERROR_BUSY                        -3
00032 #define BSP_ERROR_PERIPH_FAILURE              -4
00033 #define BSP_ERROR_COMPONENT_FAILURE           -5
00034 #define BSP_ERROR_UNKNOWN_FAILURE             -6
00035 #define BSP_ERROR_UNKNOWN_COMPONENT           -7
00036 #define BSP_ERROR_BUS_FAILURE                 -8
00037 #define BSP_ERROR_CLOCK_FAILURE               -9
00038 #define BSP_ERROR_MSP_FAILURE                 -10
00039 #define BSP_ERROR_FEATURE_NOT_SUPPORTED       -11
00040
00041 #ifdef __cplusplus
00042 }
00043 #endif
00044
00045 #endif /* STM32WLXX_NUCLEO_ERRNO_H */


STM32WLxx_Nucleo BSP User Manual: stm32wlxx_nucleo_radio.c Source File

  • File List
  • Globals
  • Firmware
  • Drivers
  • BSP
  • STM32WLxx_Nucleo
stm32wlxx_nucleo_radio.c
Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   * @file    stm32wlxx_nucleo_radio.c
00004   * @author  MCD Application Team
00005   * @brief   This file provides set of firmware functions to manage:
00006   *          - RF circuitry available on STM32WLXX-Nucleo
00007   *            Kit from STMicroelectronics
00008   ******************************************************************************
00009   * @attention
00010   *
00011   * Copyright (c) 2020-2021 STMicroelectronics.
00012   * All rights reserved.
00013   *
00014   * This software is licensed under terms that can be found in the LICENSE file
00015   * in the root directory of this software component.
00016   * If no LICENSE file comes with this software, it is provided AS-IS.
00017   *
00018   ******************************************************************************
00019   */
00020
00021 /* Includes ------------------------------------------------------------------*/
00022 #include "stm32wlxx_nucleo_radio.h"
00023
00024 /** @addtogroup BSP
00025   * @{
00026   */
00027
00028 /** @addtogroup STM32WLXX_NUCLEO
00029   * @{
00030   */
00031
00032 /** @addtogroup STM32WLXX_NUCLEO_RADIO_LOW_LEVEL
00033   * @brief This file provides set of firmware functions to Radio switch
00034   *        available on STM32WLXX-Nucleo Kit from STMicroelectronics.
00035   * @{
00036   */
00037
00038 /** @addtogroup STM32WLXX_NUCLEO_RADIO_LOW_LEVEL_Exported_Functions
00039   * @{
00040   */
00041
00042 /**
00043   * @brief  Init Radio Switch
00044   * @retval BSP status
00045   */
00046 int32_t BSP_RADIO_Init(void)
00047 {
00048   GPIO_InitTypeDef  gpio_init_structure = {0};
00049
00050   /* Enable the Radio Switch Clock */
00051   RF_SW_CTRL3_GPIO_CLK_ENABLE();
00052
00053   /* Configure the Radio Switch pin */
00054   gpio_init_structure.Pin   = RF_SW_CTRL1_PIN;
00055   gpio_init_structure.Mode  = GPIO_MODE_OUTPUT_PP;
00056   gpio_init_structure.Pull  = GPIO_NOPULL;
00057   gpio_init_structure.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
00058
00059   HAL_GPIO_Init(RF_SW_CTRL1_GPIO_PORT, &gpio_init_structure);
00060
00061   gpio_init_structure.Pin = RF_SW_CTRL2_PIN;
00062   HAL_GPIO_Init(RF_SW_CTRL2_GPIO_PORT, &gpio_init_structure);
00063
00064   gpio_init_structure.Pin = RF_SW_CTRL3_PIN;
00065   HAL_GPIO_Init(RF_SW_CTRL3_GPIO_PORT, &gpio_init_structure);
00066
00067   HAL_GPIO_WritePin(RF_SW_CTRL2_GPIO_PORT, RF_SW_CTRL2_PIN, GPIO_PIN_RESET);
00068   HAL_GPIO_WritePin(RF_SW_CTRL1_GPIO_PORT, RF_SW_CTRL1_PIN, GPIO_PIN_RESET);
00069   HAL_GPIO_WritePin(RF_SW_CTRL3_GPIO_PORT, RF_SW_CTRL3_PIN, GPIO_PIN_RESET);
00070
00071   return BSP_ERROR_NONE;
00072 }
00073
00074 /**
00075   * @brief  DeInit Radio Switch
00076   * @retval BSP status
00077   */
00078 int32_t BSP_RADIO_DeInit(void)
00079 {
00080   RF_SW_CTRL3_GPIO_CLK_ENABLE();
00081
00082   /* Turn off switch */
00083   HAL_GPIO_WritePin(RF_SW_CTRL1_GPIO_PORT, RF_SW_CTRL1_PIN, GPIO_PIN_RESET);
00084   HAL_GPIO_WritePin(RF_SW_CTRL2_GPIO_PORT, RF_SW_CTRL2_PIN, GPIO_PIN_RESET);
00085   HAL_GPIO_WritePin(RF_SW_CTRL3_GPIO_PORT, RF_SW_CTRL3_PIN, GPIO_PIN_RESET);
00086
00087   /* DeInit the Radio Switch pin */
00088   HAL_GPIO_DeInit(RF_SW_CTRL1_GPIO_PORT, RF_SW_CTRL1_PIN);
00089   HAL_GPIO_DeInit(RF_SW_CTRL2_GPIO_PORT, RF_SW_CTRL2_PIN);
00090   HAL_GPIO_DeInit(RF_SW_CTRL3_GPIO_PORT, RF_SW_CTRL3_PIN);
00091
00092   return BSP_ERROR_NONE;
00093 }
00094
00095 /**
00096   * @brief  Configure Radio Switch.
00097   * @param  Config: Specifies the Radio RF switch path to be set.
00098   *         This parameter can be one of following parameters:
00099   *           @arg RADIO_SWITCH_OFF
00100   *           @arg RADIO_SWITCH_RX
00101   *           @arg RADIO_SWITCH_RFO_LP
00102   *           @arg RADIO_SWITCH_RFO_HP
00103   * @retval BSP status
00104   */
00105 int32_t BSP_RADIO_ConfigRFSwitch(BSP_RADIO_Switch_TypeDef Config)
00106 {
00107   switch (Config)
00108   {
00109     case RADIO_SWITCH_OFF:
00110     {
00111       /* Turn off switch */
00112       HAL_GPIO_WritePin(RF_SW_CTRL3_GPIO_PORT, RF_SW_CTRL3_PIN, GPIO_PIN_RESET);
00113       HAL_GPIO_WritePin(RF_SW_CTRL1_GPIO_PORT, RF_SW_CTRL1_PIN, GPIO_PIN_RESET);
00114       HAL_GPIO_WritePin(RF_SW_CTRL2_GPIO_PORT, RF_SW_CTRL2_PIN, GPIO_PIN_RESET);
00115       break;
00116     }
00117     case RADIO_SWITCH_RX:
00118     {
00119       /*Turns On in Rx Mode the RF Switch */
00120       HAL_GPIO_WritePin(RF_SW_CTRL3_GPIO_PORT, RF_SW_CTRL3_PIN, GPIO_PIN_SET);
00121       HAL_GPIO_WritePin(RF_SW_CTRL1_GPIO_PORT, RF_SW_CTRL1_PIN, GPIO_PIN_SET);
00122       HAL_GPIO_WritePin(RF_SW_CTRL2_GPIO_PORT, RF_SW_CTRL2_PIN, GPIO_PIN_RESET);
00123       break;
00124     }
00125     case RADIO_SWITCH_RFO_LP:
00126     {
00127       /*Turns On in Tx Low Power the RF Switch */
00128       HAL_GPIO_WritePin(RF_SW_CTRL3_GPIO_PORT, RF_SW_CTRL3_PIN, GPIO_PIN_SET);
00129       HAL_GPIO_WritePin(RF_SW_CTRL1_GPIO_PORT, RF_SW_CTRL1_PIN, GPIO_PIN_SET);
00130       HAL_GPIO_WritePin(RF_SW_CTRL2_GPIO_PORT, RF_SW_CTRL2_PIN, GPIO_PIN_SET);
00131       break;
00132     }
00133     case RADIO_SWITCH_RFO_HP:
00134     {
00135       /*Turns On in Tx High Power the RF Switch */
00136       HAL_GPIO_WritePin(RF_SW_CTRL3_GPIO_PORT, RF_SW_CTRL3_PIN, GPIO_PIN_SET);
00137       HAL_GPIO_WritePin(RF_SW_CTRL1_GPIO_PORT, RF_SW_CTRL1_PIN, GPIO_PIN_RESET);
00138       HAL_GPIO_WritePin(RF_SW_CTRL2_GPIO_PORT, RF_SW_CTRL2_PIN, GPIO_PIN_SET);
00139       break;
00140     }
00141     default:
00142       break;
00143   }
00144
00145   return BSP_ERROR_NONE;
00146 }
00147
00148 /**
00149   * @brief  Return Board Configuration
00150   * @retval
00151   *  RADIO_CONF_RFO_LP_HP
00152   *  RADIO_CONF_RFO_LP
00153   *  RADIO_CONF_RFO_HP
00154   */
00155 int32_t BSP_RADIO_GetTxConfig(void)
00156 {
00157   return RADIO_CONF_RFO_LP_HP;
00158 }
00159
00160 /**
00161   * @brief  Get If TCXO is to be present on board
00162   * @note   never remove called by MW,
00163   * @retval
00164   *  RADIO_CONF_TCXO_NOT_SUPPORTED
00165   *  RADIO_CONF_TCXO_SUPPORTED
00166   */
00167 int32_t BSP_RADIO_IsTCXO(void)
00168 {
00169   return RADIO_CONF_TCXO_SUPPORTED;
00170 }
00171
00172 /**
00173   * @brief  Get If DCDC is to be present on board
00174   * @note   never remove called by MW,
00175   * @retval
00176   *  RADIO_CONF_DCDC_NOT_SUPPORTED
00177   *  RADIO_CONF_DCDC_SUPPORTED
00178   */
00179 int32_t BSP_RADIO_IsDCDC(void)
00180 {
00181   return RADIO_CONF_DCDC_SUPPORTED;
00182 }
00183
00184 /**
00185   * @brief  Return RF Output Max Power Configuration
00186   * @retval
00187   *    RADIO_CONF_RFO_LP_MAX_15_dBm for LP mode
00188   *    RADIO_CONF_RFO_HP_MAX_22_dBm for HP mode
00189   */
00190 int32_t BSP_RADIO_GetRFOMaxPowerConfig(BSP_RADIO_RFOMaxPowerConfig_TypeDef Config)
00191 {
00192   int32_t ret;
00193
00194   if(Config == RADIO_RFO_LP_MAXPOWER)
00195   {
00196     ret = RADIO_CONF_RFO_LP_MAX_15_dBm;
00197   }
00198   else
00199   {
00200     ret = RADIO_CONF_RFO_HP_MAX_22_dBm;
00201   }
00202
00203   return ret;
00204 }
00205
00206 /**
00207   * @}
00208   */
00209
00210 /**
00211   * @}
00212   */
00213
00214 /**
00215   * @}
00216   */
00217
00218 /**
00219   * @}
00220   */


STM32WLxx_Nucleo BSP User Manual: stm32wlxx_nucleo_radio.h Source File

  • File List
  • Globals
  • Firmware
  • Drivers
  • BSP
  • STM32WLxx_Nucleo
stm32wlxx_nucleo_radio.h
Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   * @file    stm32wlxx_nucleo_radio.h
00004   * @author  MCD Application Team
00005   * @brief   Header for stm32wlxx_nucleo_radio.c
00006   ******************************************************************************
00007   * @attention
00008   *
00009   * Copyright (c) 2020-2021 STMicroelectronics.
00010   * All rights reserved.
00011   *
00012   * This software is licensed under terms that can be found in the LICENSE file
00013   * in the root directory of this software component.
00014   * If no LICENSE file comes with this software, it is provided AS-IS.
00015   *
00016   ******************************************************************************
00017   */
00018
00019 /* Define to prevent recursive inclusion -------------------------------------*/
00020 #ifndef STM32WLXX_NUCLEO_RADIO_H
00021 #define STM32WLXX_NUCLEO_RADIO_H
00022
00023 #ifdef __cplusplus
00024  extern "C" {
00025 #endif
00026
00027 /* Includes ------------------------------------------------------------------*/
00028 #include "stm32wlxx_nucleo_errno.h"
00029 #include "stm32wlxx_nucleo_conf.h"
00030
00031
00032 /** @addtogroup BSP
00033   * @{
00034   */
00035
00036 /** @addtogroup STM32WLXX_NUCLEO STM32WLXX-NUCLEO
00037   * @{
00038   */
00039
00040 /** @defgroup STM32WLXX_NUCLEO_RADIO_LOW_LEVEL RADIO LOW LEVEL
00041   * @{
00042   */
00043
00044 /** @defgroup STM32WLXX_NUCLEO_RADIO_LOW_LEVEL_Exported_Types RADIO LOW LEVEL Exported Types
00045   * @{
00046   */
00047
00048 typedef enum
00049 {
00050   RADIO_SWITCH_OFF    = 0,
00051   RADIO_SWITCH_RX     = 1,
00052   RADIO_SWITCH_RFO_LP = 2,
00053   RADIO_SWITCH_RFO_HP = 3,
00054 }BSP_RADIO_Switch_TypeDef;
00055
00056 typedef enum
00057 {
00058   RADIO_RFO_LP_MAXPOWER = 0,
00059   RADIO_RFO_HP_MAXPOWER,
00060 } BSP_RADIO_RFOMaxPowerConfig_TypeDef;
00061
00062 /**
00063   * @}
00064   */
00065
00066 /** @defgroup STM32WLXX_NUCLEO_RADIO_LOW_LEVEL_Exported_Constants RADIO LOW LEVEL Exported Constants
00067   * @{
00068   */
00069
00070 /** @defgroup STM32WLXX_NUCLEO_RADIO_LOW_LEVEL_RADIOCONFIG RADIO LOW LEVEL RADIO CONFIG Constants
00071   * @{
00072   */
00073 #define RADIO_CONF_RFO_LP_HP                     0U
00074 #define RADIO_CONF_RFO_LP                        1U
00075 #define RADIO_CONF_RFO_HP                        2U
00076
00077 #define RADIO_CONF_TCXO_NOT_SUPPORTED            0U
00078 #define RADIO_CONF_TCXO_SUPPORTED                1U
00079
00080 #define RADIO_CONF_DCDC_NOT_SUPPORTED            0U
00081 #define RADIO_CONF_DCDC_SUPPORTED                1U
00082
00083 #define RADIO_CONF_RFO_HP_MAX_22_dBm  ((int32_t) 22)
00084 #define RADIO_CONF_RFO_HP_MAX_20_dBm  ((int32_t) 20)
00085 #define RADIO_CONF_RFO_HP_MAX_17_dBm  ((int32_t) 17)
00086 #define RADIO_CONF_RFO_HP_MAX_14_dBm  ((int32_t) 14)
00087 #define RADIO_CONF_RFO_LP_MAX_15_dBm  ((int32_t) 15)
00088 #define RADIO_CONF_RFO_LP_MAX_14_dBm  ((int32_t) 14)
00089 #define RADIO_CONF_RFO_LP_MAX_10_dBm  ((int32_t) 10)
00090
00091 /**
00092   * @}
00093   */
00094
00095 /** @defgroup STM32WLXX_NUCLEO_RADIO_LOW_LEVEL_RFSWITCH RADIO LOW LEVEL RF SWITCH Constants
00096   * @{
00097   */
00098
00099 #define RF_SW_CTRL3_PIN                          GPIO_PIN_3
00100 #define RF_SW_CTRL3_GPIO_PORT                    GPIOC
00101 #define RF_SW_CTRL3_GPIO_CLK_ENABLE()            __HAL_RCC_GPIOC_CLK_ENABLE()
00102 #define RF_SW_CTRL3_GPIO_CLK_DISABLE()           __HAL_RCC_GPIOC_CLK_DISABLE()
00103
00104 #define RF_SW_CTRL1_PIN                          GPIO_PIN_4
00105 #define RF_SW_CTRL1_GPIO_PORT                    GPIOC
00106 #define RF_SW_CTRL1_GPIO_CLK_ENABLE()            __HAL_RCC_GPIOC_CLK_ENABLE()
00107 #define RF_SW_RX_GPIO_CLK_DISABLE()              __HAL_RCC_GPIOC_CLK_DISABLE()
00108
00109 #define RF_SW_CTRL2_PIN                          GPIO_PIN_5
00110 #define RF_SW_CTRL2_GPIO_PORT                    GPIOC
00111 #define RF_SW_CTRL2_GPIO_CLK_ENABLE()            __HAL_RCC_GPIOC_CLK_ENABLE()
00112 #define RF_SW_CTRL2_GPIO_CLK_DISABLE()           __HAL_RCC_GPIOC_CLK_DISABLE()
00113
00114 #define RF_TCXO_VCC_PIN                          GPIO_PIN_0
00115 #define RF_TCXO_VCC_GPIO_PORT                    GPIOB
00116 #define RF_TCXO_VCC_CLK_ENABLE()                 __HAL_RCC_GPIOB_CLK_ENABLE()
00117 #define RF_TCXO_VCC_CLK_DISABLE()                __HAL_RCC_GPIOB_CLK_DISABLE()
00118 /**
00119  * @}
00120  */
00121
00122 /**
00123   * @}
00124   */
00125
00126 /** @defgroup STM32WLXX_NUCLEO_RADIO_LOW_LEVEL_Exported_Functions RADIO LOW LEVEL Exported Functions
00127   * @{
00128   */
00129 int32_t BSP_RADIO_Init(void);
00130 int32_t BSP_RADIO_DeInit(void);
00131 int32_t BSP_RADIO_ConfigRFSwitch(BSP_RADIO_Switch_TypeDef Config);
00132 int32_t BSP_RADIO_GetTxConfig(void);
00133 int32_t BSP_RADIO_IsTCXO(void);
00134 int32_t BSP_RADIO_IsDCDC(void);
00135 int32_t BSP_RADIO_GetRFOMaxPowerConfig(BSP_RADIO_RFOMaxPowerConfig_TypeDef Config);
00136
00137 /**
00138   * @}
00139   */
00140
00141 /**
00142   * @}
00143   */
00144
00145 /**
00146   * @}
00147   */
00148
00149 /**
00150   * @}
00151   */
00152
00153 #ifdef __cplusplus
00154 }
00155 #endif
00156
00157 #endif /* STM32WLXX_NUCLEO_RADIO_H */


STM32WLxx_Nucleo BSP User Manual: userManualMainpage.txt File Reference

  • File List
  • Globals
userManualMainpage.txt File Reference