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
01/28/2022 | V1.0 |  | STM32WLxx_Nucleo Board
Generated on Fri Jan 28 2022 08:39:21 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 42 of file stm32wlxx_nucleo.c.

Referenced by BSP_PB_Init(), and BSP_PB_IRQHandler().

EXTI_HandleTypeDef hpb_exti[]

Definition at line 42 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 60 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 76 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 74 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 72 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 70 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 68 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 580 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 589 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 598 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 (0x02U)
#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 (0x02U)

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


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   (0x02U) /*!< [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