B-L475E-IOT01 BSP User Manual: B-L475E-IOT01 BSP Drivers

B-L475E-IOT01 BSP User Manual
  • Main Page
  • Modules
  • Data Structures
  • Files
  • Directories
B-L475E-IOT01 BSP Drivers

BSP Drivers User Manual

This document contains the User Manual (UM) of the B-L475E-IOT01 BSP peripheral Firmware drivers.

Document tabsheets description:

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

Revision History:

Date | Revision | Author | Development Platform
11/28/2019 | V1.0 |  | B-L475E-IOT01 Board
Generated on Thu Nov 28 2019 16:15:10 for B-L475E-IOT01 BSP User Manual by doxygen 1.7.6.1


B-L475E-IOT01 BSP User Manual: LOW LEVEL Private Def

  • Data Structures
  • Files
  • Directories
Defines
LOW LEVEL Private Def
LOW LEVEL

Defines

#define | __STM32L475E_IOT01_BSP_VERSION_MAIN (0x01)
STM32L475E IOT01 BSP Driver version number.
#define | __STM32L475E_IOT01_BSP_VERSION_SUB1 (0x01)
#define | __STM32L475E_IOT01_BSP_VERSION_SUB2 (0x06)
#define | __STM32L475E_IOT01_BSP_VERSION_RC (0x00)
#define | __STM32L475E_IOT01_BSP_VERSION

Define Documentation

#define __STM32L475E_IOT01_BSP_VERSION
Value:
((__STM32L475E_IOT01_BSP_VERSION_MAIN << 24)\
                                                 |(__STM32L475E_IOT01_BSP_VERSION_SUB1 << 16)\
                                                 |(__STM32L475E_IOT01_BSP_VERSION_SUB2 << 8 )\
                                                 |(__STM32L475E_IOT01_BSP_VERSION_RC))

Definition at line 45 of file stm32l475e_iot01.c.

Referenced by BSP_GetVersion().

#define __STM32L475E_IOT01_BSP_VERSION_MAIN (0x01)

STM32L475E IOT01 BSP Driver version number.

[31:24] main version

Definition at line 41 of file stm32l475e_iot01.c.

#define __STM32L475E_IOT01_BSP_VERSION_RC (0x00)

[7:0] release candidate

Definition at line 44 of file stm32l475e_iot01.c.

#define __STM32L475E_IOT01_BSP_VERSION_SUB1 (0x01)

[23:16] sub1 version

Definition at line 42 of file stm32l475e_iot01.c.

#define __STM32L475E_IOT01_BSP_VERSION_SUB2 (0x06)

[15:8] sub2 version

Definition at line 43 of file stm32l475e_iot01.c.


B-L475E-IOT01 BSP User Manual: LOW LEVEL Variables

Variables
LOW LEVEL Variables
LOW LEVEL

Variables

const uint32_t | GPIO_PIN [LEDn] = {LED2_PIN}
GPIO_TypeDef * | GPIO_PORT [LEDn] = {LED2_GPIO_PORT}
GPIO_TypeDef * | BUTTON_PORT [BUTTONn] = {USER_BUTTON_GPIO_PORT}
const uint16_t | BUTTON_PIN [BUTTONn] = {USER_BUTTON_PIN}
const uint16_t | BUTTON_IRQn [BUTTONn] = {USER_BUTTON_EXTI_IRQn}
USART_TypeDef * | COM_USART [COMn] = {DISCOVERY_COM1}
GPIO_TypeDef * | COM_TX_PORT [COMn] = {DISCOVERY_COM1_TX_GPIO_PORT}
GPIO_TypeDef * | COM_RX_PORT [COMn] = {DISCOVERY_COM1_RX_GPIO_PORT}
const uint16_t | COM_TX_PIN [COMn] = {DISCOVERY_COM1_TX_PIN}
const uint16_t | COM_RX_PIN [COMn] = {DISCOVERY_COM1_RX_PIN}
const uint16_t | COM_TX_AF [COMn] = {DISCOVERY_COM1_TX_AF}
const uint16_t | COM_RX_AF [COMn] = {DISCOVERY_COM1_RX_AF}
I2C_HandleTypeDef | hI2cHandler
UART_HandleTypeDef | hDiscoUart

Variable Documentation

const uint16_t BUTTON_IRQn[BUTTONn] = {USER_BUTTON_EXTI_IRQn}

Definition at line 67 of file stm32l475e_iot01.c.

Referenced by BSP_PB_DeInit(), and BSP_PB_Init().

const uint16_t BUTTON_PIN[BUTTONn] = {USER_BUTTON_PIN}

Definition at line 65 of file stm32l475e_iot01.c.

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

GPIO_TypeDef* BUTTON_PORT[BUTTONn] = {USER_BUTTON_GPIO_PORT}

Definition at line 63 of file stm32l475e_iot01.c.

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

const uint16_t COM_RX_AF[COMn] = {DISCOVERY_COM1_RX_AF}

Definition at line 81 of file stm32l475e_iot01.c.

Referenced by BSP_COM_Init().

const uint16_t COM_RX_PIN[COMn] = {DISCOVERY_COM1_RX_PIN}

Definition at line 77 of file stm32l475e_iot01.c.

Referenced by BSP_COM_Init().

GPIO_TypeDef* COM_RX_PORT[COMn] = {DISCOVERY_COM1_RX_GPIO_PORT}

Definition at line 73 of file stm32l475e_iot01.c.

Referenced by BSP_COM_Init().

const uint16_t COM_TX_AF[COMn] = {DISCOVERY_COM1_TX_AF}

Definition at line 79 of file stm32l475e_iot01.c.

Referenced by BSP_COM_Init().

const uint16_t COM_TX_PIN[COMn] = {DISCOVERY_COM1_TX_PIN}

Definition at line 75 of file stm32l475e_iot01.c.

Referenced by BSP_COM_Init().

GPIO_TypeDef* COM_TX_PORT[COMn] = {DISCOVERY_COM1_TX_GPIO_PORT}

Definition at line 71 of file stm32l475e_iot01.c.

Referenced by BSP_COM_Init().

USART_TypeDef* COM_USART[COMn] = {DISCOVERY_COM1}

Definition at line 69 of file stm32l475e_iot01.c.

Referenced by BSP_COM_DeInit(), and BSP_COM_Init().

const uint32_t GPIO_PIN[LEDn] = {LED2_PIN}

Definition at line 57 of file stm32l475e_iot01.c.

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

GPIO_TypeDef* GPIO_PORT[LEDn] = {LED2_GPIO_PORT}

Definition at line 60 of file stm32l475e_iot01.c.

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

UART_HandleTypeDef hDiscoUart

Definition at line 84 of file stm32l475e_iot01.c.

I2C_HandleTypeDef hI2cHandler

Definition at line 83 of file stm32l475e_iot01.c.

Referenced by NFC_IO_DeInit(), NFC_IO_Init(), NFC_IO_IsDeviceReady(), NFC_IO_ReadMultiple(), NFC_IO_WriteMultiple(), SENSOR_IO_DeInit(), SENSOR_IO_Init(), SENSOR_IO_IsDeviceReady(), SENSOR_IO_Read(), SENSOR_IO_ReadMultiple(), SENSOR_IO_Write(), and SENSOR_IO_WriteMultiple().


B-L475E-IOT01 BSP User Manual: LOW LEVEL Private Function Prototypes

LOW LEVEL Private Function Prototypes
LOW LEVEL


B-L475E-IOT01 BSP User Manual: LOW LEVEL Private Functions

Functions
LOW LEVEL Private Functions
LOW LEVEL

Functions

uint32_t | BSP_GetVersion (void)
This method returns the STM32L475E IOT01 BSP Driver revision.
void | BSP_LED_Init (Led_TypeDef Led)
Initializes LED GPIO.
void | BSP_LED_DeInit (Led_TypeDef Led)
DeInitializes LED GPIO.
void | BSP_LED_On (Led_TypeDef Led)
Turns the selected LED On.
void | BSP_LED_Off (Led_TypeDef Led)
Turns the selected LED Off.
void | BSP_LED_Toggle (Led_TypeDef Led)
Toggles the selected LED.
void | BSP_PB_Init (Button_TypeDef Button, ButtonMode_TypeDef ButtonMode)
Initializes push button GPIO and EXTI Line.
void | BSP_PB_DeInit (Button_TypeDef Button)
DeInitializes push button.
uint32_t | BSP_PB_GetState (Button_TypeDef Button)
Returns the selected button state.
void | BSP_COM_Init (COM_TypeDef COM, UART_HandleTypeDef *huart)
Configures COM port.
void | BSP_COM_DeInit (COM_TypeDef COM, UART_HandleTypeDef *huart)
DeInitializes COM port.
static void | I2Cx_MspInit (I2C_HandleTypeDef *i2c_handler)
Initializes I2C MSP.
static void | I2Cx_MspDeInit (I2C_HandleTypeDef *i2c_handler)
DeInitializes I2C MSP.
static void | I2Cx_Init (I2C_HandleTypeDef *i2c_handler)
Initializes I2C HAL.
static void | I2Cx_DeInit (I2C_HandleTypeDef *i2c_handler)
DeInitializes I2C HAL.
static HAL_StatusTypeDef | I2Cx_ReadMultiple (I2C_HandleTypeDef *i2c_handler, uint8_t Addr, uint16_t Reg, uint16_t MemAddress, uint8_t *Buffer, uint16_t Length)
Reads multiple data.
static HAL_StatusTypeDef | I2Cx_WriteMultiple (I2C_HandleTypeDef *i2c_handler, uint8_t Addr, uint16_t Reg, uint16_t MemAddress, uint8_t *Buffer, uint16_t Length)
Writes a value in a register of the device through BUS in using DMA mode.
static HAL_StatusTypeDef | I2Cx_IsDeviceReady (I2C_HandleTypeDef *i2c_handler, uint16_t DevAddress, uint32_t Trials)
Checks if target device is ready for communication.
static void | I2Cx_Error (I2C_HandleTypeDef *i2c_handler, uint8_t Addr)
Manages error callback by re-initializing I2C.

Function Documentation

void BSP_COM_DeInit | ( | COM_TypeDef | COM,
 |  | UART_HandleTypeDef * | huart
 | ) |  |

DeInitializes COM port.

Parameters:
COM COM port to be deinitialized. This parameter can be one of the following values:
  • COM1
huart Pointer to a UART_HandleTypeDef structure that contains the configuration information for the specified USART peripheral.

Definition at line 328 of file stm32l475e_iot01.c.

References COM_USART, and DISCOVERY_COMx_CLK_DISABLE.

void BSP_COM_Init | ( | COM_TypeDef | COM,
 |  | UART_HandleTypeDef * | huart
 | ) |  |

Configures COM port.

Parameters:
COM COM port to be initialized. This parameter can be one of the following values:
  • COM1
huart Pointer to a UART_HandleTypeDef structure that contains the configuration information for the specified USART peripheral.

Definition at line 290 of file stm32l475e_iot01.c.

References COM_RX_AF, COM_RX_PIN, COM_RX_PORT, COM_TX_AF, COM_TX_PIN, COM_TX_PORT, COM_USART, DISCOVERY_COMx_CLK_ENABLE, DISCOVERY_COMx_RX_GPIO_CLK_ENABLE, and DISCOVERY_COMx_TX_GPIO_CLK_ENABLE.

uint32_t BSP_GetVersion ( void )

This method returns the STM32L475E IOT01 BSP Driver revision.

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

Definition at line 132 of file stm32l475e_iot01.c.

References __STM32L475E_IOT01_BSP_VERSION.

void BSP_LED_DeInit ( Led_TypeDef Led )

DeInitializes LED GPIO.

Parameters:
Led LED to be deinitialized. This parameter can be one of the following values:
  • LED2

Definition at line 163 of file stm32l475e_iot01.c.

References GPIO_PIN, and GPIO_PORT.

void BSP_LED_Init ( Led_TypeDef Led )

Initializes LED GPIO.

Parameters:
Led LED to be initialized. This parameter can be one of the following values:
  • LED2

Definition at line 143 of file stm32l475e_iot01.c.

References GPIO_PIN, GPIO_PORT, and LEDx_GPIO_CLK_ENABLE.

void BSP_LED_Off ( Led_TypeDef Led )

Turns the selected LED Off.

Parameters:
Led LED to be set off This parameter can be one of the following values:
  • LED2

Definition at line 192 of file stm32l475e_iot01.c.

References GPIO_PIN, and GPIO_PORT.

void BSP_LED_On ( Led_TypeDef Led )

Turns the selected LED On.

Parameters:
Led LED to be set on This parameter can be one of the following values:
  • LED2

Definition at line 181 of file stm32l475e_iot01.c.

References GPIO_PIN, and GPIO_PORT.

void BSP_LED_Toggle ( Led_TypeDef Led )

Toggles the selected LED.

Parameters:
Led LED to be toggled This parameter can be one of the following values:
  • LED2

Definition at line 203 of file stm32l475e_iot01.c.

References GPIO_PIN, and GPIO_PORT.

void BSP_PB_DeInit ( Button_TypeDef Button )

DeInitializes push button.

Parameters:
Button Button to be configured This parameter can be one of the following values:
  • BUTTON_USER User Push Button
Note:
PB DeInit does not disable the GPIO clock

Definition at line 260 of file stm32l475e_iot01.c.

References BUTTON_IRQn, BUTTON_PIN, and BUTTON_PORT.

uint32_t BSP_PB_GetState ( Button_TypeDef Button )

Returns the selected button state.

Parameters:
Button Button to be checked This parameter can be one of the following values:
  • BUTTON_USER User Push Button
Return values:
The Button GPIO pin value (GPIO_PIN_RESET = button pressed)

Definition at line 277 of file stm32l475e_iot01.c.

References BUTTON_PIN, and BUTTON_PORT.

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

Initializes push button GPIO and EXTI Line.

Parameters:
Button Button to be configured This parameter can be one of the following values:
  • BUTTON_USER User Push Button
ButtonMode Button mode This parameter can be one of the following values:
  • BUTTON_MODE_GPIO Button will be used as simple IO
  • BUTTON_MODE_EXTI Button will be connected to EXTI line with interrupt generation capability

Definition at line 219 of file stm32l475e_iot01.c.

References BUTTON_IRQn, BUTTON_MODE_EXTI, BUTTON_MODE_GPIO, BUTTON_PIN, BUTTON_PORT, and USER_BUTTON_GPIO_CLK_ENABLE.

static void I2Cx_DeInit ( I2C_HandleTypeDef * i2c_handler ) [static]

DeInitializes I2C HAL.

Parameters:
i2c_handler I2C handler
Return values:
None

Definition at line 441 of file stm32l475e_iot01.c.

References I2Cx_MspDeInit().

Referenced by NFC_IO_DeInit(), and SENSOR_IO_DeInit().

static void I2Cx_Error | ( | I2C_HandleTypeDef * | i2c_handler,
 |  | uint8_t | Addr
 | ) |  | [static]

Manages error callback by re-initializing I2C.

Parameters:
i2c_handler | I2C handler
Addr | I2C Address
Return values:
None

Definition at line 517 of file stm32l475e_iot01.c.

References I2Cx_Init().

Referenced by I2Cx_ReadMultiple(), and I2Cx_WriteMultiple().

static void I2Cx_Init ( I2C_HandleTypeDef * i2c_handler ) [static]

Initializes I2C HAL.

Parameters:
i2c_handler I2C handler
Return values:
None

Configure Analogue filter

Definition at line 416 of file stm32l475e_iot01.c.

References DISCOVERY_I2Cx, and I2Cx_MspInit().

Referenced by I2Cx_Error(), NFC_IO_Init(), and SENSOR_IO_Init().

static HAL_StatusTypeDef I2Cx_IsDeviceReady | ( | I2C_HandleTypeDef * | i2c_handler,
 |  | uint16_t | DevAddress,
 |  | uint32_t | Trials
 | ) |  | [static]

Checks if target device is ready for communication.

Note:
This function is used with Memory devices
Parameters:
i2c_handler | I2C handler
DevAddress | Target device address
Trials | Number of trials
Return values:
HAL status

Definition at line 506 of file stm32l475e_iot01.c.

Referenced by SENSOR_IO_IsDeviceReady().

static void I2Cx_MspDeInit ( I2C_HandleTypeDef * i2c_handler ) [static]

DeInitializes I2C MSP.

Parameters:
i2c_handler I2C handler
Return values:
None

Definition at line 397 of file stm32l475e_iot01.c.

References DISCOVERY_I2Cx_CLK_DISABLE, DISCOVERY_I2Cx_SCL_PIN, DISCOVERY_I2Cx_SCL_SDA_GPIO_CLK_DISABLE, DISCOVERY_I2Cx_SCL_SDA_GPIO_PORT, and DISCOVERY_I2Cx_SDA_PIN.

Referenced by I2Cx_DeInit().

static void I2Cx_MspInit ( I2C_HandleTypeDef * i2c_handler ) [static]

Initializes I2C MSP.

Parameters:
i2c_handler I2C handler
Return values:
None

Definition at line 355 of file stm32l475e_iot01.c.

References DISCOVERY_I2Cx_CLK_ENABLE, DISCOVERY_I2Cx_ER_IRQn, DISCOVERY_I2Cx_EV_IRQn, DISCOVERY_I2Cx_FORCE_RESET, DISCOVERY_I2Cx_RELEASE_RESET, DISCOVERY_I2Cx_SCL_PIN, DISCOVERY_I2Cx_SCL_SDA_AF, DISCOVERY_I2Cx_SCL_SDA_GPIO_CLK_ENABLE, DISCOVERY_I2Cx_SCL_SDA_GPIO_PORT, and DISCOVERY_I2Cx_SDA_PIN.

Referenced by I2Cx_Init().

static HAL_StatusTypeDef I2Cx_ReadMultiple | ( | I2C_HandleTypeDef * | i2c_handler,
 |  | uint8_t | Addr,
 |  | uint16_t | Reg,
 |  | uint16_t | MemAddress,
 |  | uint8_t * | Buffer,
 |  | uint16_t | Length
 | ) |  | [static]

Reads multiple data.

Parameters:
i2c_handler | I2C handler
Addr | I2C address
Reg | Reg address
MemAddress | memory address
Buffer | Pointer to data buffer
Length | Length of the data
Return values:
HAL status

Definition at line 457 of file stm32l475e_iot01.c.

References I2Cx_Error().

Referenced by SENSOR_IO_Read(), and SENSOR_IO_ReadMultiple().

static HAL_StatusTypeDef I2Cx_WriteMultiple | ( | I2C_HandleTypeDef * | i2c_handler,
 |  | uint8_t | Addr,
 |  | uint16_t | Reg,
 |  | uint16_t | MemAddress,
 |  | uint8_t * | Buffer,
 |  | uint16_t | Length
 | ) |  | [static]

Writes a value in a register of the device through BUS in using DMA mode.

Parameters:
i2c_handler | I2C handler
Addr | Device address on BUS Bus.
Reg | The target register address to write
MemAddress | memory address
Buffer | The target register value to be written
Length | buffer size to be written
Return values:
HAL status

Definition at line 483 of file stm32l475e_iot01.c.

References I2Cx_Error().

Referenced by SENSOR_IO_Write(), and SENSOR_IO_WriteMultiple().


B-L475E-IOT01 BSP User Manual: LOW LEVEL Exported Types

Enumerations
LOW LEVEL Exported Types
LOW LEVEL

Enumerations

enum | Led_TypeDef { LED2 = 0, LED_GREEN = LED2 }
enum | Button_TypeDef { BUTTON_USER = 0 }
enum | ButtonMode_TypeDef { BUTTON_MODE_GPIO = 0, BUTTON_MODE_EXTI = 1 }
enum | COM_TypeDef { COM1 = 0, COM2 = 0 }

Enumeration Type Documentation

enum Button_TypeDef
Enumerator:
BUTTON_USER

Definition at line 53 of file stm32l475e_iot01.h.

enum ButtonMode_TypeDef
Enumerator:
BUTTON_MODE_GPIO
BUTTON_MODE_EXTI

Definition at line 58 of file stm32l475e_iot01.h.

enum COM_TypeDef
Enumerator:
COM1
COM2

Definition at line 64 of file stm32l475e_iot01.h.

enum Led_TypeDef
Enumerator:
LED2
LED_GREEN

Definition at line 46 of file stm32l475e_iot01.h.


B-L475E-IOT01 BSP User Manual: LOW LEVEL Exported Constants

Defines
LOW LEVEL Exported Constants
LOW LEVEL

Defines

#define | LEDn ((uint8_t)1)
Define for STM32L475E_IOT01 board.
#define | LED2_PIN GPIO_PIN_14
#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 | LEDx_GPIO_CLK_ENABLE(__INDEX__) do{if((__INDEX__) == 0) LED2_GPIO_CLK_ENABLE();}while(0)
#define | LEDx_GPIO_CLK_DISABLE(__INDEX__) do{if((__INDEX__) == 0) LED2_GPIO_CLK_DISABLE();}while(0)
#define | BUTTONn ((uint8_t)1)
#define | USER_BUTTON_PIN GPIO_PIN_13
Wakeup push-button.
#define | USER_BUTTON_GPIO_PORT GPIOC
#define | USER_BUTTON_GPIO_CLK_ENABLE() __HAL_RCC_GPIOC_CLK_ENABLE()
#define | USER_BUTTON_GPIO_CLK_DISABLE() __HAL_RCC_GPIOC_CLK_DISABLE()
#define | USER_BUTTON_EXTI_IRQn EXTI15_10_IRQn
#define | NFC_GPIO_GPO_PIN GPIO_PIN_4
NFC Gpio PINs.
#define | NFC_GPIO_GPO_PIN_PORT GPIOE
#define | NFC_GPIO_RFDISABLE_PIN GPIO_PIN_2
#define | NFC_GPIO_RFDISABLE_PIN_PORT GPIOE
#define | NFC_GPIO_CLK_ENABLE() __HAL_RCC_GPIOE_CLK_ENABLE();
#define | NFC_GPIO_CLK_DISABLE() __HAL_RCC_GPIOE_CLK_DISABLE();
#define | COMn ((uint8_t)1)
#define | DISCOVERY_COM1 USART1
Definition for COM port1, connected to USART1.
#define | DISCOVERY_COM1_CLK_ENABLE() __HAL_RCC_USART1_CLK_ENABLE()
#define | DISCOVERY_COM1_CLK_DISABLE() __HAL_RCC_USART1_CLK_DISABLE()
#define | DISCOVERY_COM1_TX_PIN GPIO_PIN_6
#define | DISCOVERY_COM1_TX_GPIO_PORT GPIOB
#define | DISCOVERY_COM1_TX_GPIO_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE()
#define | DISCOVERY_COM1_TX_GPIO_CLK_DISABLE() __HAL_RCC_GPIOB_CLK_DISABLE()
#define | DISCOVERY_COM1_TX_AF GPIO_AF7_USART1
#define | DISCOVERY_COM1_RX_PIN GPIO_PIN_7
#define | DISCOVERY_COM1_RX_GPIO_PORT GPIOB
#define | DISCOVERY_COM1_RX_GPIO_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE()
#define | DISCOVERY_COM1_RX_GPIO_CLK_DISABLE() __HAL_RCC_GPIOB_CLK_DISABLE()
#define | DISCOVERY_COM1_RX_AF GPIO_AF7_USART1
#define | DISCOVERY_COM1_IRQn USART1_IRQn
#define | DISCOVERY_COMx_CLK_ENABLE(__INDEX__) do { if((__INDEX__) == COM1) {DISCOVERY_COM1_CLK_ENABLE();}} while(0)
#define | DISCOVERY_COMx_CLK_DISABLE(__INDEX__) do { if((__INDEX__) == COM1) {DISCOVERY_COM1_CLK_DISABLE();}} while(0)
#define | DISCOVERY_COMx_TX_GPIO_CLK_ENABLE(__INDEX__) do { if((__INDEX__) == COM1) {DISCOVERY_COM1_TX_GPIO_CLK_ENABLE();}} while(0)
#define | DISCOVERY_COMx_TX_GPIO_CLK_DISABLE(__INDEX__) do { if((__INDEX__) == COM1) {DISCOVERY_COM1_TX_GPIO_CLK_DISABLE();}} while(0)
#define | DISCOVERY_COMx_RX_GPIO_CLK_ENABLE(__INDEX__) do { if((__INDEX__) == COM1) {DISCOVERY_COM1_RX_GPIO_CLK_ENABLE();}} while(0)
#define | DISCOVERY_COMx_RX_GPIO_CLK_DISABLE(__INDEX__) do { if((__INDEX__) == COM1) {DISCOVERY_COM1_RX_GPIO_CLK_DISABLE();}} while(0)
#define | DISCOVERY_I2Cx I2C2
#define | DISCOVERY_I2Cx_CLK_ENABLE() __HAL_RCC_I2C2_CLK_ENABLE()
#define | DISCOVERY_I2Cx_CLK_DISABLE() __HAL_RCC_I2C2_CLK_DISABLE()
#define | DISCOVERY_DMAx_CLK_ENABLE() __HAL_RCC_DMA1_CLK_ENABLE()
#define | DISCOVERY_I2Cx_SCL_SDA_GPIO_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE()
#define | DISCOVERY_I2Cx_SCL_SDA_GPIO_CLK_DISABLE() __HAL_RCC_GPIOB_CLK_DISABLE()
#define | DISCOVERY_I2Cx_FORCE_RESET() __HAL_RCC_I2C2_FORCE_RESET()
#define | DISCOVERY_I2Cx_RELEASE_RESET() __HAL_RCC_I2C2_RELEASE_RESET()
#define | DISCOVERY_I2Cx_SCL_PIN GPIO_PIN_10
#define | DISCOVERY_I2Cx_SDA_PIN GPIO_PIN_11
#define | DISCOVERY_I2Cx_SCL_SDA_GPIO_PORT GPIOB
#define | DISCOVERY_I2Cx_SCL_SDA_AF GPIO_AF4_I2C2
#define | DISCOVERY_I2Cx_EV_IRQn I2C2_EV_IRQn
#define | DISCOVERY_I2Cx_ER_IRQn I2C2_ER_IRQn
#define | LPS22HB_I2C_ADDRESS (uint8_t)0xBA
#define | HTS221_I2C_ADDRESS (uint8_t)0xBE
#define | TSENSOR_I2C_ADDRESS HTS221_I2C_ADDRESS
#define | M24SR_I2C_ADDR (uint8_t) 0xAC
#define | NFC_I2C_STATUS_SUCCESS (uint16_t) 0x0000
#define | NFC_I2C_ERROR_TIMEOUT (uint16_t) 0x0011
#define | NFC_I2C_TIMEOUT_STD (uint32_t) 8 /* I2C Time out (ms), used to call Transmit/Receive HAL functions */
#define | NFC_I2C_TIMEOUT_MAX (uint32_t) 200 /* I2C Time out (ms), this is the maximum time needed by M24SR to complete any command */
#define | NFC_I2C_TRIALS (uint32_t) 1 /* In case M24SR will reply ACK failed allow to perform retry before returning error (HAL option not used) */

Define Documentation

#define BUTTONn ((uint8_t)1)

Definition at line 98 of file stm32l475e_iot01.h.

#define COMn ((uint8_t)1)

Definition at line 120 of file stm32l475e_iot01.h.

#define DISCOVERY_COM1 USART1

Definition for COM port1, connected to USART1.

Definition at line 125 of file stm32l475e_iot01.h.

#define DISCOVERY_COM1_CLK_DISABLE ( ) __HAL_RCC_USART1_CLK_DISABLE()

Definition at line 127 of file stm32l475e_iot01.h.

#define DISCOVERY_COM1_CLK_ENABLE ( ) __HAL_RCC_USART1_CLK_ENABLE()

Definition at line 126 of file stm32l475e_iot01.h.

#define DISCOVERY_COM1_IRQn USART1_IRQn

Definition at line 141 of file stm32l475e_iot01.h.

#define DISCOVERY_COM1_RX_AF GPIO_AF7_USART1

Definition at line 139 of file stm32l475e_iot01.h.

#define DISCOVERY_COM1_RX_GPIO_CLK_DISABLE ( ) __HAL_RCC_GPIOB_CLK_DISABLE()

Definition at line 138 of file stm32l475e_iot01.h.

#define DISCOVERY_COM1_RX_GPIO_CLK_ENABLE ( ) __HAL_RCC_GPIOB_CLK_ENABLE()

Definition at line 137 of file stm32l475e_iot01.h.

#define DISCOVERY_COM1_RX_GPIO_PORT GPIOB

Definition at line 136 of file stm32l475e_iot01.h.

#define DISCOVERY_COM1_RX_PIN GPIO_PIN_7

Definition at line 135 of file stm32l475e_iot01.h.

#define DISCOVERY_COM1_TX_AF GPIO_AF7_USART1

Definition at line 133 of file stm32l475e_iot01.h.

#define DISCOVERY_COM1_TX_GPIO_CLK_DISABLE ( ) __HAL_RCC_GPIOB_CLK_DISABLE()

Definition at line 132 of file stm32l475e_iot01.h.

#define DISCOVERY_COM1_TX_GPIO_CLK_ENABLE ( ) __HAL_RCC_GPIOB_CLK_ENABLE()

Definition at line 131 of file stm32l475e_iot01.h.

#define DISCOVERY_COM1_TX_GPIO_PORT GPIOB

Definition at line 130 of file stm32l475e_iot01.h.

#define DISCOVERY_COM1_TX_PIN GPIO_PIN_6

Definition at line 129 of file stm32l475e_iot01.h.

#define DISCOVERY_COMx_CLK_DISABLE ( __INDEX__ ) do { if((__INDEX__) == COM1) {DISCOVERY_COM1_CLK_DISABLE();}} while(0)

Definition at line 145 of file stm32l475e_iot01.h.

Referenced by BSP_COM_DeInit().

#define DISCOVERY_COMx_CLK_ENABLE ( __INDEX__ ) do { if((__INDEX__) == COM1) {DISCOVERY_COM1_CLK_ENABLE();}} while(0)

Definition at line 144 of file stm32l475e_iot01.h.

Referenced by BSP_COM_Init().

#define DISCOVERY_COMx_RX_GPIO_CLK_DISABLE ( __INDEX__ ) do { if((__INDEX__) == COM1) {DISCOVERY_COM1_RX_GPIO_CLK_DISABLE();}} while(0)

Definition at line 151 of file stm32l475e_iot01.h.

#define DISCOVERY_COMx_RX_GPIO_CLK_ENABLE ( __INDEX__ ) do { if((__INDEX__) == COM1) {DISCOVERY_COM1_RX_GPIO_CLK_ENABLE();}} while(0)

Definition at line 150 of file stm32l475e_iot01.h.

Referenced by BSP_COM_Init().

#define DISCOVERY_COMx_TX_GPIO_CLK_DISABLE ( __INDEX__ ) do { if((__INDEX__) == COM1) {DISCOVERY_COM1_TX_GPIO_CLK_DISABLE();}} while(0)

Definition at line 148 of file stm32l475e_iot01.h.

#define DISCOVERY_COMx_TX_GPIO_CLK_ENABLE ( __INDEX__ ) do { if((__INDEX__) == COM1) {DISCOVERY_COM1_TX_GPIO_CLK_ENABLE();}} while(0)

Definition at line 147 of file stm32l475e_iot01.h.

Referenced by BSP_COM_Init().

#define DISCOVERY_DMAx_CLK_ENABLE ( ) __HAL_RCC_DMA1_CLK_ENABLE()

Definition at line 159 of file stm32l475e_iot01.h.

#define DISCOVERY_I2Cx I2C2

Definition at line 156 of file stm32l475e_iot01.h.

Referenced by I2Cx_Init().

#define DISCOVERY_I2Cx_CLK_DISABLE ( ) __HAL_RCC_I2C2_CLK_DISABLE()

Definition at line 158 of file stm32l475e_iot01.h.

Referenced by I2Cx_MspDeInit().

#define DISCOVERY_I2Cx_CLK_ENABLE ( ) __HAL_RCC_I2C2_CLK_ENABLE()

Definition at line 157 of file stm32l475e_iot01.h.

Referenced by I2Cx_MspInit().

#define DISCOVERY_I2Cx_ER_IRQn I2C2_ER_IRQn

Definition at line 174 of file stm32l475e_iot01.h.

Referenced by I2Cx_MspInit().

#define DISCOVERY_I2Cx_EV_IRQn I2C2_EV_IRQn

Definition at line 173 of file stm32l475e_iot01.h.

Referenced by I2Cx_MspInit().

#define DISCOVERY_I2Cx_FORCE_RESET ( ) __HAL_RCC_I2C2_FORCE_RESET()

Definition at line 163 of file stm32l475e_iot01.h.

Referenced by I2Cx_MspInit().

#define DISCOVERY_I2Cx_RELEASE_RESET ( ) __HAL_RCC_I2C2_RELEASE_RESET()

Definition at line 164 of file stm32l475e_iot01.h.

Referenced by I2Cx_MspInit().

#define DISCOVERY_I2Cx_SCL_PIN GPIO_PIN_10

Definition at line 167 of file stm32l475e_iot01.h.

Referenced by I2Cx_MspDeInit(), and I2Cx_MspInit().

#define DISCOVERY_I2Cx_SCL_SDA_AF GPIO_AF4_I2C2

Definition at line 170 of file stm32l475e_iot01.h.

Referenced by I2Cx_MspInit().

#define DISCOVERY_I2Cx_SCL_SDA_GPIO_CLK_DISABLE ( ) __HAL_RCC_GPIOB_CLK_DISABLE()

Definition at line 161 of file stm32l475e_iot01.h.

Referenced by I2Cx_MspDeInit().

#define DISCOVERY_I2Cx_SCL_SDA_GPIO_CLK_ENABLE ( ) __HAL_RCC_GPIOB_CLK_ENABLE()

Definition at line 160 of file stm32l475e_iot01.h.

Referenced by I2Cx_MspInit().

#define DISCOVERY_I2Cx_SCL_SDA_GPIO_PORT GPIOB

Definition at line 169 of file stm32l475e_iot01.h.

Referenced by I2Cx_MspDeInit(), and I2Cx_MspInit().

#define DISCOVERY_I2Cx_SDA_PIN GPIO_PIN_11

Definition at line 168 of file stm32l475e_iot01.h.

Referenced by I2Cx_MspDeInit(), and I2Cx_MspInit().

#define HTS221_I2C_ADDRESS (uint8_t)0xBE

Definition at line 193 of file stm32l475e_iot01.h.

Referenced by BSP_HSENSOR_Init(), BSP_HSENSOR_ReadHumidity(), and BSP_HSENSOR_ReadID().

#define LED2_GPIO_CLK_DISABLE ( ) __HAL_RCC_GPIOB_CLK_DISABLE()

Definition at line 89 of file stm32l475e_iot01.h.

#define LED2_GPIO_CLK_ENABLE ( ) __HAL_RCC_GPIOB_CLK_ENABLE()

Definition at line 88 of file stm32l475e_iot01.h.

#define LED2_GPIO_PORT GPIOB

Definition at line 87 of file stm32l475e_iot01.h.

#define LED2_PIN GPIO_PIN_14

Definition at line 86 of file stm32l475e_iot01.h.

#define LEDn ((uint8_t)1)

Define for STM32L475E_IOT01 board.

Definition at line 84 of file stm32l475e_iot01.h.

#define LEDx_GPIO_CLK_DISABLE ( __INDEX__ ) do{if((__INDEX__) == 0) LED2_GPIO_CLK_DISABLE();}while(0)

Definition at line 95 of file stm32l475e_iot01.h.

#define LEDx_GPIO_CLK_ENABLE ( __INDEX__ ) do{if((__INDEX__) == 0) LED2_GPIO_CLK_ENABLE();}while(0)

Definition at line 93 of file stm32l475e_iot01.h.

Referenced by BSP_LED_Init().

#define LPS22HB_I2C_ADDRESS (uint8_t)0xBA

Definition at line 191 of file stm32l475e_iot01.h.

Referenced by BSP_PSENSOR_Init(), BSP_PSENSOR_ReadID(), and BSP_PSENSOR_ReadPressure().

#define M24SR_I2C_ADDR (uint8_t) 0xAC

M24SR address

Definition at line 204 of file stm32l475e_iot01.h.

#define NFC_GPIO_CLK_DISABLE ( ) __HAL_RCC_GPIOE_CLK_DISABLE();

Definition at line 117 of file stm32l475e_iot01.h.

#define NFC_GPIO_CLK_ENABLE ( ) __HAL_RCC_GPIOE_CLK_ENABLE();

Definition at line 116 of file stm32l475e_iot01.h.

Referenced by NFC_IO_Init().

#define NFC_GPIO_GPO_PIN GPIO_PIN_4

NFC Gpio PINs.

Definition at line 112 of file stm32l475e_iot01.h.

Referenced by NFC_IO_Init(), and NFC_IO_ReadState().

#define NFC_GPIO_GPO_PIN_PORT GPIOE

Definition at line 113 of file stm32l475e_iot01.h.

Referenced by NFC_IO_Init(), and NFC_IO_ReadState().

#define NFC_GPIO_RFDISABLE_PIN GPIO_PIN_2

Definition at line 114 of file stm32l475e_iot01.h.

Referenced by NFC_IO_Init(), and NFC_IO_RfDisable().

#define NFC_GPIO_RFDISABLE_PIN_PORT GPIOE

Definition at line 115 of file stm32l475e_iot01.h.

Referenced by NFC_IO_Init(), and NFC_IO_RfDisable().

#define NFC_I2C_ERROR_TIMEOUT (uint16_t) 0x0011

Definition at line 206 of file stm32l475e_iot01.h.

Referenced by NFC_IO_IsDeviceReady(), NFC_IO_ReadMultiple(), and NFC_IO_WriteMultiple().

#define NFC_I2C_STATUS_SUCCESS (uint16_t) 0x0000

Definition at line 205 of file stm32l475e_iot01.h.

Referenced by NFC_IO_IsDeviceReady(), NFC_IO_ReadMultiple(), and NFC_IO_WriteMultiple().

#define NFC_I2C_TIMEOUT_MAX (uint32_t) 200 /* I2C Time out (ms), this is the maximum time needed by M24SR to complete any command */

Definition at line 208 of file stm32l475e_iot01.h.

Referenced by NFC_IO_IsDeviceReady().

#define NFC_I2C_TIMEOUT_STD (uint32_t) 8 /* I2C Time out (ms), used to call Transmit/Receive HAL functions */

Definition at line 207 of file stm32l475e_iot01.h.

Referenced by NFC_IO_IsDeviceReady(), NFC_IO_ReadMultiple(), and NFC_IO_WriteMultiple().

#define NFC_I2C_TRIALS (uint32_t) 1 /* In case M24SR will reply ACK failed allow to perform retry before returning error (HAL option not used) */

Definition at line 209 of file stm32l475e_iot01.h.

Referenced by NFC_IO_ReadMultiple(), and NFC_IO_WriteMultiple().

#define TSENSOR_I2C_ADDRESS HTS221_I2C_ADDRESS

Definition at line 200 of file stm32l475e_iot01.h.

Referenced by BSP_TSENSOR_Init(), and BSP_TSENSOR_ReadTemp().

#define USER_BUTTON_EXTI_IRQn EXTI15_10_IRQn

Definition at line 107 of file stm32l475e_iot01.h.

#define USER_BUTTON_GPIO_CLK_DISABLE ( ) __HAL_RCC_GPIOC_CLK_DISABLE()

Definition at line 106 of file stm32l475e_iot01.h.

#define USER_BUTTON_GPIO_CLK_ENABLE ( ) __HAL_RCC_GPIOC_CLK_ENABLE()

Definition at line 105 of file stm32l475e_iot01.h.

Referenced by BSP_PB_Init().

#define USER_BUTTON_GPIO_PORT GPIOC

Definition at line 104 of file stm32l475e_iot01.h.

#define USER_BUTTON_PIN GPIO_PIN_13

Wakeup push-button.

Definition at line 103 of file stm32l475e_iot01.h.


B-L475E-IOT01 BSP User Manual: LOW LEVEL Exported Functions

Functions
LOW LEVEL Exported Functions
LOW LEVEL

Functions

uint32_t | BSP_GetVersion (void)
This method returns the STM32L475E IOT01 BSP Driver revision.
void | BSP_LED_Init (Led_TypeDef Led)
Initializes LED GPIO.
void | BSP_LED_DeInit (Led_TypeDef Led)
DeInitializes LED GPIO.
void | BSP_LED_On (Led_TypeDef Led)
Turns the selected LED On.
void | BSP_LED_Off (Led_TypeDef Led)
Turns the selected LED Off.
void | BSP_LED_Toggle (Led_TypeDef Led)
Toggles the selected LED.
void | BSP_PB_Init (Button_TypeDef Button, ButtonMode_TypeDef ButtonMode)
Initializes push button GPIO and EXTI Line.
void | BSP_PB_DeInit (Button_TypeDef Button)
DeInitializes push button.
uint32_t | BSP_PB_GetState (Button_TypeDef Button)
Returns the selected button state.
void | BSP_COM_Init (COM_TypeDef COM, UART_HandleTypeDef *husart)
Configures COM port.
void | BSP_COM_DeInit (COM_TypeDef COM, UART_HandleTypeDef *huart)
DeInitializes COM port.

Function Documentation

void BSP_COM_DeInit | ( | COM_TypeDef | COM,
 |  | UART_HandleTypeDef * | huart
 | ) |  |

DeInitializes COM port.

Parameters:
COM COM port to be deinitialized. This parameter can be one of the following values:
  • COM1
huart Pointer to a UART_HandleTypeDef structure that contains the configuration information for the specified USART peripheral.

Definition at line 328 of file stm32l475e_iot01.c.

References COM_USART, and DISCOVERY_COMx_CLK_DISABLE.

void BSP_COM_Init | ( | COM_TypeDef | COM,
 |  | UART_HandleTypeDef * | huart
 | ) |  |

Configures COM port.

Parameters:
COM COM port to be initialized. This parameter can be one of the following values:
  • COM1
huart Pointer to a UART_HandleTypeDef structure that contains the configuration information for the specified USART peripheral.

Definition at line 290 of file stm32l475e_iot01.c.

References COM_RX_AF, COM_RX_PIN, COM_RX_PORT, COM_TX_AF, COM_TX_PIN, COM_TX_PORT, COM_USART, DISCOVERY_COMx_CLK_ENABLE, DISCOVERY_COMx_RX_GPIO_CLK_ENABLE, and DISCOVERY_COMx_TX_GPIO_CLK_ENABLE.

uint32_t BSP_GetVersion ( void )

This method returns the STM32L475E IOT01 BSP Driver revision.

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

Definition at line 132 of file stm32l475e_iot01.c.

References __STM32L475E_IOT01_BSP_VERSION.

void BSP_LED_DeInit ( Led_TypeDef Led )

DeInitializes LED GPIO.

Parameters:
Led LED to be deinitialized. This parameter can be one of the following values:
  • LED2

Definition at line 163 of file stm32l475e_iot01.c.

References GPIO_PIN, and GPIO_PORT.

void BSP_LED_Init ( Led_TypeDef Led )

Initializes LED GPIO.

Parameters:
Led LED to be initialized. This parameter can be one of the following values:
  • LED2

Definition at line 143 of file stm32l475e_iot01.c.

References GPIO_PIN, GPIO_PORT, and LEDx_GPIO_CLK_ENABLE.

void BSP_LED_Off ( Led_TypeDef Led )

Turns the selected LED Off.

Parameters:
Led LED to be set off This parameter can be one of the following values:
  • LED2

Definition at line 192 of file stm32l475e_iot01.c.

References GPIO_PIN, and GPIO_PORT.

void BSP_LED_On ( Led_TypeDef Led )

Turns the selected LED On.

Parameters:
Led LED to be set on This parameter can be one of the following values:
  • LED2

Definition at line 181 of file stm32l475e_iot01.c.

References GPIO_PIN, and GPIO_PORT.

void BSP_LED_Toggle ( Led_TypeDef Led )

Toggles the selected LED.

Parameters:
Led LED to be toggled This parameter can be one of the following values:
  • LED2

Definition at line 203 of file stm32l475e_iot01.c.

References GPIO_PIN, and GPIO_PORT.

void BSP_PB_DeInit ( Button_TypeDef Button )

DeInitializes push button.

Parameters:
Button Button to be configured This parameter can be one of the following values:
  • BUTTON_USER User Push Button
Note:
PB DeInit does not disable the GPIO clock

Definition at line 260 of file stm32l475e_iot01.c.

References BUTTON_IRQn, BUTTON_PIN, and BUTTON_PORT.

uint32_t BSP_PB_GetState ( Button_TypeDef Button )

Returns the selected button state.

Parameters:
Button Button to be checked This parameter can be one of the following values:
  • BUTTON_USER User Push Button
Return values:
The Button GPIO pin value (GPIO_PIN_RESET = button pressed)

Definition at line 277 of file stm32l475e_iot01.c.

References BUTTON_PIN, and BUTTON_PORT.

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

Initializes push button GPIO and EXTI Line.

Parameters:
Button Button to be configured This parameter can be one of the following values:
  • BUTTON_USER User Push Button
ButtonMode Button mode This parameter can be one of the following values:
  • BUTTON_MODE_GPIO Button will be used as simple IO
  • BUTTON_MODE_EXTI Button will be connected to EXTI line with interrupt generation capability

Definition at line 219 of file stm32l475e_iot01.c.

References BUTTON_IRQn, BUTTON_MODE_EXTI, BUTTON_MODE_GPIO, BUTTON_PIN, BUTTON_PORT, and USER_BUTTON_GPIO_CLK_ENABLE.


B-L475E-IOT01 BSP User Manual: LOW LEVEL

Modules | Functions
LOW LEVEL
STM32L475E_IOT01

Modules

LOW LEVEL Private Def
LOW LEVEL Variables
LOW LEVEL Private Function Prototypes
LOW LEVEL Private Functions
LOW LEVEL Exported Types
LOW LEVEL Exported Constants
LOW LEVEL Exported Functions

Functions

void | SENSOR_IO_Init (void)
Initializes Sensors low level.
void | SENSOR_IO_DeInit (void)
DeInitializes Sensors low level.
void | SENSOR_IO_Write (uint8_t Addr, uint8_t Reg, uint8_t Value)
Writes a single data.
uint8_t | SENSOR_IO_Read (uint8_t Addr, uint8_t Reg)
Reads a single data.
uint16_t | SENSOR_IO_ReadMultiple (uint8_t Addr, uint8_t Reg, uint8_t *Buffer, uint16_t Length)
Reads multiple data with I2C communication channel from TouchScreen.
void | SENSOR_IO_WriteMultiple (uint8_t Addr, uint8_t Reg, uint8_t *Buffer, uint16_t Length)
Writes multiple data with I2C communication channel from MCU to TouchScreen.
HAL_StatusTypeDef | SENSOR_IO_IsDeviceReady (uint16_t DevAddress, uint32_t Trials)
Checks if target device is ready for communication.
void | SENSOR_IO_Delay (uint32_t Delay)
Delay function used in Sensor low level driver.
void | NFC_IO_Init (uint8_t GpoIrqEnable)
Initializes Sensors low level.
void | NFC_IO_DeInit (void)
DeInitializes Sensors low level.
uint16_t | NFC_IO_ReadMultiple (uint8_t Addr, uint8_t *pBuffer, uint16_t Length)
This functions reads a response of the M24SR device.
uint16_t | NFC_IO_WriteMultiple (uint8_t Addr, uint8_t *pBuffer, uint16_t Length)
This functions sends the command buffer.
uint16_t | NFC_IO_IsDeviceReady (uint8_t Addr, uint32_t Trials)
Checks if target device is ready for communication.
void | NFC_IO_ReadState (uint8_t *pPinState)
This function read the state of the M24SR GPO.
void | NFC_IO_RfDisable (uint8_t PinState)
This function sets the state of the M24SR RF disable pin.
void | NFC_IO_Delay (uint32_t Delay)
Delay function used in M24SR low level driver.

Function Documentation

void NFC_IO_DeInit ( void )

DeInitializes Sensors low level.

Return values:
None

Definition at line 679 of file stm32l475e_iot01.c.

References hI2cHandler, and I2Cx_DeInit().

void NFC_IO_Delay ( uint32_t Delay )

Delay function used in M24SR low level driver.

Parameters:
Delay Delay in ms
Return values:
None

Definition at line 789 of file stm32l475e_iot01.c.

void NFC_IO_Init ( uint8_t GpoIrqEnable )

Initializes Sensors low level.

Parameters:
GpoIrqEnable 0x0 is disable, otherwise enabled
Return values:
None

Definition at line 637 of file stm32l475e_iot01.c.

References hI2cHandler, I2Cx_Init(), NFC_GPIO_CLK_ENABLE, NFC_GPIO_GPO_PIN, NFC_GPIO_GPO_PIN_PORT, NFC_GPIO_RFDISABLE_PIN, and NFC_GPIO_RFDISABLE_PIN_PORT.

uint16_t NFC_IO_IsDeviceReady | ( | uint8_t | Addr,
 |  | uint32_t | Trials
 | ) |  |

Checks if target device is ready for communication.

Parameters:
Addr | M24SR I2C address
Trials | Number of trials (currently not present in M24sr)
Return values:
Status Success or Timeout

Definition at line 742 of file stm32l475e_iot01.c.

References hI2cHandler, NFC_I2C_ERROR_TIMEOUT, NFC_I2C_STATUS_SUCCESS, NFC_I2C_TIMEOUT_MAX, and NFC_I2C_TIMEOUT_STD.

Referenced by NFC_IO_ReadMultiple(), and NFC_IO_WriteMultiple().

uint16_t NFC_IO_ReadMultiple | ( | uint8_t | Addr,
 |  | uint8_t * | pBuffer,
 |  | uint16_t | Length
 | ) |  |

This functions reads a response of the M24SR device.

Parameters:
Addr | M24SR I2C address
pBuffer | Pointer on the buffer to retrieve M24SR response
Length | Length of the data
Return values:
Status Success or Timeout

Definition at line 691 of file stm32l475e_iot01.c.

References hI2cHandler, NFC_I2C_ERROR_TIMEOUT, NFC_I2C_STATUS_SUCCESS, NFC_I2C_TIMEOUT_STD, NFC_I2C_TRIALS, and NFC_IO_IsDeviceReady().

void NFC_IO_ReadState ( uint8_t * pPinState )

This function read the state of the M24SR GPO.

Return values:
GPIO_PinState state of the M24SR GPO

Definition at line 770 of file stm32l475e_iot01.c.

References NFC_GPIO_GPO_PIN, and NFC_GPIO_GPO_PIN_PORT.

void NFC_IO_RfDisable ( uint8_t PinState )

This function sets the state of the M24SR RF disable pin.

Parameters:
PinState put RF disable pin of M24SR in PinState (1 or 0)

Definition at line 779 of file stm32l475e_iot01.c.

References NFC_GPIO_RFDISABLE_PIN, and NFC_GPIO_RFDISABLE_PIN_PORT.

uint16_t NFC_IO_WriteMultiple | ( | uint8_t | Addr,
 |  | uint8_t * | pBuffer,
 |  | uint16_t | Length
 | ) |  |

This functions sends the command buffer.

Parameters:
Addr | M24SR I2C address
pBuffer | pointer to the buffer to send to the M24SR
Length | Length of the data
Return values:
Status Success or Timeout

Definition at line 717 of file stm32l475e_iot01.c.

References hI2cHandler, NFC_I2C_ERROR_TIMEOUT, NFC_I2C_STATUS_SUCCESS, NFC_I2C_TIMEOUT_STD, NFC_I2C_TRIALS, and NFC_IO_IsDeviceReady().

void SENSOR_IO_DeInit ( void )

DeInitializes Sensors low level.

Return values:
None

Definition at line 548 of file stm32l475e_iot01.c.

References hI2cHandler, and I2Cx_DeInit().

void SENSOR_IO_Delay ( uint32_t Delay )

Delay function used in Sensor low level driver.

Parameters:
Delay Delay in ms
Return values:
None

Definition at line 625 of file stm32l475e_iot01.c.

void SENSOR_IO_Init ( void )

Initializes Sensors low level.

Return values:
None

Definition at line 539 of file stm32l475e_iot01.c.

References hI2cHandler, and I2Cx_Init().

Referenced by BSP_TSENSOR_Init().

HAL_StatusTypeDef SENSOR_IO_IsDeviceReady | ( | uint16_t | DevAddress,
 |  | uint32_t | Trials
 | ) |  |

Checks if target device is ready for communication.

Note:
This function is used with Memory devices
Parameters:
DevAddress | Target device address
Trials | Number of trials
Return values:
HAL status

Definition at line 615 of file stm32l475e_iot01.c.

References hI2cHandler, and I2Cx_IsDeviceReady().

uint8_t SENSOR_IO_Read | ( | uint8_t | Addr,
 |  | uint8_t | Reg
 | ) |  |

Reads a single data.

Parameters:
Addr | I2C address
Reg | Reg address
Return values:
Data to be read

Definition at line 571 of file stm32l475e_iot01.c.

References hI2cHandler, and I2Cx_ReadMultiple().

uint16_t SENSOR_IO_ReadMultiple | ( | uint8_t | Addr,
 |  | uint8_t | Reg,
 |  | uint8_t * | Buffer,
 |  | uint16_t | Length
 | ) |  |

Reads multiple data with I2C communication channel from TouchScreen.

Parameters:
Addr | I2C address
Reg | Register address
Buffer | Pointer to data buffer
Length | Length of the data
Return values:
HAL status

Definition at line 589 of file stm32l475e_iot01.c.

References hI2cHandler, and I2Cx_ReadMultiple().

void SENSOR_IO_Write | ( | uint8_t | Addr,
 |  | uint8_t | Reg,
 |  | uint8_t | Value
 | ) |  |

Writes a single data.

Parameters:
Addr | I2C address
Reg | Reg address
Value | Data to be written
Return values:
None

Definition at line 560 of file stm32l475e_iot01.c.

References hI2cHandler, and I2Cx_WriteMultiple().

void SENSOR_IO_WriteMultiple | ( | uint8_t | Addr,
 |  | uint8_t | Reg,
 |  | uint8_t * | Buffer,
 |  | uint16_t | Length
 | ) |  |

Writes multiple data with I2C communication channel from MCU to TouchScreen.

Parameters:
Addr | I2C address
Reg | Register address
Buffer | Pointer to data buffer
Length | Length of the data
Return values:
None

Definition at line 603 of file stm32l475e_iot01.c.

References hI2cHandler, and I2Cx_WriteMultiple().


B-L475E-IOT01 BSP User Manual: ACCELERO Private Variables

Variables
ACCELERO Private Variables
ACCELERO

Variables

static ACCELERO_DrvTypeDef * AccelerometerDrv

Variable Documentation

ACCELERO_DrvTypeDef* AccelerometerDrv [static]

Definition at line 37 of file stm32l475e_iot01_accelero.c.

Referenced by BSP_ACCELERO_AccGetXYZ(), BSP_ACCELERO_DeInit(), BSP_ACCELERO_Init(), and BSP_ACCELERO_LowPower().


B-L475E-IOT01 BSP User Manual: ACCELERO Private Functions

Functions
ACCELERO Private Functions
ACCELERO

Functions

ACCELERO_StatusTypeDef | BSP_ACCELERO_Init (void)
Initialize the ACCELERO.
void | BSP_ACCELERO_DeInit (void)
DeInitialize the ACCELERO.
void | BSP_ACCELERO_LowPower (uint16_t status)
Set/Unset the ACCELERO in low power mode.
void | BSP_ACCELERO_AccGetXYZ (int16_t *pDataXYZ)
Get XYZ acceleration values.

Function Documentation

void BSP_ACCELERO_AccGetXYZ ( int16_t * pDataXYZ )

Get XYZ acceleration values.

Parameters:
pDataXYZ Pointer on 3 angular accelerations table with pDataXYZ[0] = X axis, pDataXYZ[1] = Y axis, pDataXYZ[2] = Z axis
Return values:
None

Definition at line 125 of file stm32l475e_iot01_accelero.c.

References AccelerometerDrv.

void BSP_ACCELERO_DeInit ( void )

DeInitialize the ACCELERO.

Return values:
None.

Definition at line 90 of file stm32l475e_iot01_accelero.c.

References AccelerometerDrv.

ACCELERO_StatusTypeDef BSP_ACCELERO_Init ( void )

Initialize the ACCELERO.

Return values:
ACCELERO_OK or ACCELERO_ERROR

Definition at line 49 of file stm32l475e_iot01_accelero.c.

References ACCELERO_ERROR, ACCELERO_OK, and AccelerometerDrv.

void BSP_ACCELERO_LowPower ( uint16_t status )

Set/Unset the ACCELERO in low power mode.

Parameters:
status 0 means disable Low Power Mode, otherwise Low Power Mode is enabled
Return values:
None

Definition at line 107 of file stm32l475e_iot01_accelero.c.

References AccelerometerDrv.


B-L475E-IOT01 BSP User Manual: ACCELERO Exported Types

Enumerations
ACCELERO Exported Types
ACCELERO

Enumerations

enum ACCELERO_StatusTypeDef { ACCELERO_OK = 0, ACCELERO_ERROR = 1, ACCELERO_TIMEOUT = 2 }

Enumeration Type Documentation

enum ACCELERO_StatusTypeDef
Enumerator:
ACCELERO_OK
ACCELERO_ERROR
ACCELERO_TIMEOUT

Definition at line 48 of file stm32l475e_iot01_accelero.h.


B-L475E-IOT01 BSP User Manual: ACCELERO Exported Functions

Functions
ACCELERO Exported Functions
ACCELERO

Functions

ACCELERO_StatusTypeDef | BSP_ACCELERO_Init (void)
Initialize the ACCELERO.
void | BSP_ACCELERO_DeInit (void)
DeInitialize the ACCELERO.
void | BSP_ACCELERO_LowPower (uint16_t status)
Set/Unset the ACCELERO in low power mode.
void | BSP_ACCELERO_AccGetXYZ (int16_t *pDataXYZ)
Get XYZ acceleration values.

Function Documentation

void BSP_ACCELERO_AccGetXYZ ( int16_t * pDataXYZ )

Get XYZ acceleration values.

Parameters:
pDataXYZ Pointer on 3 angular accelerations table with pDataXYZ[0] = X axis, pDataXYZ[1] = Y axis, pDataXYZ[2] = Z axis
Return values:
None

Definition at line 125 of file stm32l475e_iot01_accelero.c.

References AccelerometerDrv.

void BSP_ACCELERO_DeInit ( void )

DeInitialize the ACCELERO.

Return values:
None.

Definition at line 90 of file stm32l475e_iot01_accelero.c.

References AccelerometerDrv.

ACCELERO_StatusTypeDef BSP_ACCELERO_Init ( void )

Initialize the ACCELERO.

Return values:
ACCELERO_OK or ACCELERO_ERROR

Definition at line 49 of file stm32l475e_iot01_accelero.c.

References ACCELERO_ERROR, ACCELERO_OK, and AccelerometerDrv.

void BSP_ACCELERO_LowPower ( uint16_t status )

Set/Unset the ACCELERO in low power mode.

Parameters:
status 0 means disable Low Power Mode, otherwise Low Power Mode is enabled
Return values:
None

Definition at line 107 of file stm32l475e_iot01_accelero.c.

References AccelerometerDrv.


B-L475E-IOT01 BSP User Manual: GYROSCOPE Private Variables

Variables
GYROSCOPE Private Variables
GYROSCOPE

Variables

static GYRO_DrvTypeDef * GyroscopeDrv

Variable Documentation

GYRO_DrvTypeDef* GyroscopeDrv [static]

Definition at line 38 of file stm32l475e_iot01_gyro.c.

Referenced by BSP_GYRO_DeInit(), BSP_GYRO_GetXYZ(), BSP_GYRO_Init(), and BSP_GYRO_LowPower().


B-L475E-IOT01 BSP User Manual: GYROSCOPE Private Functions

Functions
GYROSCOPE Private Functions
GYROSCOPE

Functions

uint8_t | BSP_GYRO_Init (void)
Initialize Gyroscope.
void | BSP_GYRO_DeInit (void)
DeInitialize Gyroscope.
void | BSP_GYRO_LowPower (uint16_t status)
Set/Unset Gyroscope in low power mode.
void | BSP_GYRO_GetXYZ (float *pfData)
Get XYZ angular acceleration from the Gyroscope.

Function Documentation

void BSP_GYRO_DeInit ( void )

DeInitialize Gyroscope.

Definition at line 95 of file stm32l475e_iot01_gyro.c.

References GyroscopeDrv.

void BSP_GYRO_GetXYZ ( float * pfData )

Get XYZ angular acceleration from the Gyroscope.

Parameters:
pfData,: pointer on floating array

Definition at line 128 of file stm32l475e_iot01_gyro.c.

References GyroscopeDrv.

uint8_t BSP_GYRO_Init ( void )

Initialize Gyroscope.

Return values:
GYRO_OK or GYRO_ERROR

Definition at line 52 of file stm32l475e_iot01_gyro.c.

References GYRO_ERROR, GYRO_OK, and GyroscopeDrv.

void BSP_GYRO_LowPower ( uint16_t status )

Set/Unset Gyroscope in low power mode.

Parameters:
status 0 means disable Low Power Mode, otherwise Low Power Mode is enabled

Definition at line 112 of file stm32l475e_iot01_gyro.c.

References GyroscopeDrv.


B-L475E-IOT01 BSP User Manual: GYROSCOPE Exported Constants

Enumerations
GYROSCOPE Exported Constants
GYROSCOPE

Enumerations

enum GYRO_StatusTypeDef { GYRO_OK = 0, GYRO_ERROR = 1, GYRO_TIMEOUT = 2 }

Enumeration Type Documentation

enum GYRO_StatusTypeDef
Enumerator:
GYRO_OK
GYRO_ERROR
GYRO_TIMEOUT

Definition at line 48 of file stm32l475e_iot01_gyro.h.


B-L475E-IOT01 BSP User Manual: GYROSCOPE Exported Functions

Functions
GYROSCOPE Exported Functions
GYROSCOPE

Functions

uint8_t | BSP_GYRO_Init (void)
Initialize Gyroscope.
void | BSP_GYRO_DeInit (void)
DeInitialize Gyroscope.
void | BSP_GYRO_LowPower (uint16_t status)
Set/Unset Gyroscope in low power mode.
void | BSP_GYRO_GetXYZ (float *pfData)
Get XYZ angular acceleration from the Gyroscope.

Function Documentation

void BSP_GYRO_DeInit ( void )

DeInitialize Gyroscope.

Definition at line 95 of file stm32l475e_iot01_gyro.c.

References GyroscopeDrv.

void BSP_GYRO_GetXYZ ( float * pfData )

Get XYZ angular acceleration from the Gyroscope.

Parameters:
pfData,: pointer on floating array

Definition at line 128 of file stm32l475e_iot01_gyro.c.

References GyroscopeDrv.

uint8_t BSP_GYRO_Init ( void )

Initialize Gyroscope.

Return values:
GYRO_OK or GYRO_ERROR

Definition at line 52 of file stm32l475e_iot01_gyro.c.

References GYRO_ERROR, GYRO_OK, and GyroscopeDrv.

void BSP_GYRO_LowPower ( uint16_t status )

Set/Unset Gyroscope in low power mode.

Parameters:
status 0 means disable Low Power Mode, otherwise Low Power Mode is enabled

Definition at line 112 of file stm32l475e_iot01_gyro.c.

References GyroscopeDrv.


B-L475E-IOT01 BSP User Manual: HUMIDITY Private Variables

Variables
HUMIDITY Private Variables
HUMIDITY

Variables

static HSENSOR_DrvTypeDef * Hsensor_drv

Variable Documentation

HSENSOR_DrvTypeDef* Hsensor_drv [static]

Definition at line 38 of file stm32l475e_iot01_hsensor.c.

Referenced by BSP_HSENSOR_Init(), BSP_HSENSOR_ReadHumidity(), and BSP_HSENSOR_ReadID().


B-L475E-IOT01 BSP User Manual: HUMIDITY Private Functions

Functions
HUMIDITY Private Functions
HUMIDITY

Functions

uint32_t | BSP_HSENSOR_Init (void)
Initializes peripherals used by the I2C Humidity Sensor driver.
uint8_t | BSP_HSENSOR_ReadID (void)
Read ID of HTS221.
float | BSP_HSENSOR_ReadHumidity (void)
Read Humidity register of HTS221.

Function Documentation

uint32_t BSP_HSENSOR_Init ( void )

Initializes peripherals used by the I2C Humidity Sensor driver.

Return values:
HSENSOR status

Definition at line 51 of file stm32l475e_iot01_hsensor.c.

References Hsensor_drv, HSENSOR_ERROR, HSENSOR_OK, and HTS221_I2C_ADDRESS.

float BSP_HSENSOR_ReadHumidity ( void )

Read Humidity register of HTS221.

Return values:
HTS221 measured humidity value.

Definition at line 83 of file stm32l475e_iot01_hsensor.c.

References Hsensor_drv, and HTS221_I2C_ADDRESS.

uint8_t BSP_HSENSOR_ReadID ( void )

Read ID of HTS221.

Return values:
HTS221 ID value.

Definition at line 74 of file stm32l475e_iot01_hsensor.c.

References Hsensor_drv, and HTS221_I2C_ADDRESS.


B-L475E-IOT01 BSP User Manual: HUMIDITY Exported Types

Enumerations
HUMIDITY Exported Types
HUMIDITY

Enumerations

enum HSENSOR_Status_TypDef { HSENSOR_OK = 0, HSENSOR_ERROR }
HSENSOR Status. More...

Enumeration Type Documentation

enum HSENSOR_Status_TypDef

HSENSOR Status.

Enumerator:
HSENSOR_OK
HSENSOR_ERROR

Definition at line 52 of file stm32l475e_iot01_hsensor.h.


B-L475E-IOT01 BSP User Manual: HUMIDITY Exported Functions

Functions
HUMIDITY Exported Functions
HUMIDITY

Functions

uint32_t | BSP_HSENSOR_Init (void)
Initializes peripherals used by the I2C Humidity Sensor driver.
uint8_t | BSP_HSENSOR_ReadID (void)
Read ID of HTS221.
float | BSP_HSENSOR_ReadHumidity (void)
Read Humidity register of HTS221.

Function Documentation

uint32_t BSP_HSENSOR_Init ( void )

Initializes peripherals used by the I2C Humidity Sensor driver.

Return values:
HSENSOR status

Definition at line 51 of file stm32l475e_iot01_hsensor.c.

References Hsensor_drv, HSENSOR_ERROR, HSENSOR_OK, and HTS221_I2C_ADDRESS.

float BSP_HSENSOR_ReadHumidity ( void )

Read Humidity register of HTS221.

Return values:
HTS221 measured humidity value.

Definition at line 83 of file stm32l475e_iot01_hsensor.c.

References Hsensor_drv, and HTS221_I2C_ADDRESS.

uint8_t BSP_HSENSOR_ReadID ( void )

Read ID of HTS221.

Return values:
HTS221 ID value.

Definition at line 74 of file stm32l475e_iot01_hsensor.c.

References Hsensor_drv, and HTS221_I2C_ADDRESS.


B-L475E-IOT01 BSP User Manual: MAGNETO Private Variables

Variables
MAGNETO Private Variables
MAGNETO

Variables

static MAGNETO_DrvTypeDef * MagnetoDrv

Variable Documentation

MAGNETO_DrvTypeDef* MagnetoDrv [static]

Definition at line 38 of file stm32l475e_iot01_magneto.c.

Referenced by BSP_MAGNETO_DeInit(), BSP_MAGNETO_GetXYZ(), BSP_MAGNETO_Init(), and BSP_MAGNETO_LowPower().


B-L475E-IOT01 BSP User Manual: MAGNETO Private Functions

Functions
MAGNETO Private Functions
MAGNETO

Functions

MAGNETO_StatusTypeDef | BSP_MAGNETO_Init (void)
Initialize a magnetometer sensor.
void | BSP_MAGNETO_DeInit (void)
DeInitialize the MAGNETO.
void | BSP_MAGNETO_LowPower (uint16_t status)
Set/Unset the MAGNETO in low power mode.
void | BSP_MAGNETO_GetXYZ (int16_t *pDataXYZ)
Get XYZ magnetometer values.

Function Documentation

void BSP_MAGNETO_DeInit ( void )

DeInitialize the MAGNETO.

Definition at line 83 of file stm32l475e_iot01_magneto.c.

References MagnetoDrv.

void BSP_MAGNETO_GetXYZ ( int16_t * pDataXYZ )

Get XYZ magnetometer values.

Parameters:
pDataXYZ Pointer on 3 magnetometer values table with pDataXYZ[0] = X axis, pDataXYZ[1] = Y axis, pDataXYZ[2] = Z axis

Definition at line 115 of file stm32l475e_iot01_magneto.c.

References MagnetoDrv.

MAGNETO_StatusTypeDef BSP_MAGNETO_Init ( void )

Initialize a magnetometer sensor.

Return values:
COMPONENT_ERROR in case of failure

Definition at line 52 of file stm32l475e_iot01_magneto.c.

References MAGNETO_ERROR, MAGNETO_OK, and MagnetoDrv.

void BSP_MAGNETO_LowPower ( uint16_t status )

Set/Unset the MAGNETO in low power mode.

Definition at line 98 of file stm32l475e_iot01_magneto.c.

References MagnetoDrv.


B-L475E-IOT01 BSP User Manual: MAGNETO Exported Types

Enumerations
MAGNETO Exported Types
MAGNETO

Enumerations

enum MAGNETO_StatusTypeDef { MAGNETO_OK = 0, MAGNETO_ERROR = 1, MAGNETO_TIMEOUT = 2 }

Enumeration Type Documentation

enum MAGNETO_StatusTypeDef
Enumerator:
MAGNETO_OK
MAGNETO_ERROR
MAGNETO_TIMEOUT

Definition at line 49 of file stm32l475e_iot01_magneto.h.


B-L475E-IOT01 BSP User Manual: MAGNETO Exported Functions

Functions
MAGNETO Exported Functions
MAGNETO

Functions

MAGNETO_StatusTypeDef | BSP_MAGNETO_Init (void)
Initialize a magnetometer sensor.
void | BSP_MAGNETO_DeInit (void)
DeInitialize the MAGNETO.
void | BSP_MAGNETO_LowPower (uint16_t status)
Set/Unset the MAGNETO in low power mode.
void | BSP_MAGNETO_GetXYZ (int16_t *pDataXYZ)
Get XYZ magnetometer values.

Function Documentation

void BSP_MAGNETO_DeInit ( void )

DeInitialize the MAGNETO.

Definition at line 83 of file stm32l475e_iot01_magneto.c.

References MagnetoDrv.

void BSP_MAGNETO_GetXYZ ( int16_t * pDataXYZ )

Get XYZ magnetometer values.

Parameters:
pDataXYZ Pointer on 3 magnetometer values table with pDataXYZ[0] = X axis, pDataXYZ[1] = Y axis, pDataXYZ[2] = Z axis

Definition at line 115 of file stm32l475e_iot01_magneto.c.

References MagnetoDrv.

MAGNETO_StatusTypeDef BSP_MAGNETO_Init ( void )

Initialize a magnetometer sensor.

Return values:
COMPONENT_ERROR in case of failure

Definition at line 52 of file stm32l475e_iot01_magneto.c.

References MAGNETO_ERROR, MAGNETO_OK, and MagnetoDrv.

void BSP_MAGNETO_LowPower ( uint16_t status )

Set/Unset the MAGNETO in low power mode.

Definition at line 98 of file stm32l475e_iot01_magneto.c.

References MagnetoDrv.


B-L475E-IOT01 BSP User Manual: PRESSURE Private Variables

Variables
PRESSURE Private Variables
PRESSURE

Variables

static PSENSOR_DrvTypeDef * Psensor_drv

Variable Documentation

PSENSOR_DrvTypeDef* Psensor_drv [static]

Definition at line 38 of file stm32l475e_iot01_psensor.c.

Referenced by BSP_PSENSOR_Init(), BSP_PSENSOR_ReadID(), and BSP_PSENSOR_ReadPressure().


B-L475E-IOT01 BSP User Manual: PRESSURE Private Functions

Functions
PRESSURE Private Functions
PRESSURE

Functions

uint32_t | BSP_PSENSOR_Init (void)
Initializes peripherals used by the I2C Pressure Sensor driver.
uint8_t | BSP_PSENSOR_ReadID (void)
Read ID of LPS22HB.
float | BSP_PSENSOR_ReadPressure (void)
Read Pressure register of LPS22HB.

Function Documentation

uint32_t BSP_PSENSOR_Init ( void )

Initializes peripherals used by the I2C Pressure Sensor driver.

Return values:
PSENSOR status

Definition at line 51 of file stm32l475e_iot01_psensor.c.

References LPS22HB_I2C_ADDRESS, Psensor_drv, PSENSOR_ERROR, and PSENSOR_OK.

uint8_t BSP_PSENSOR_ReadID ( void )

Read ID of LPS22HB.

Return values:
LPS22HB ID value.

Definition at line 75 of file stm32l475e_iot01_psensor.c.

References LPS22HB_I2C_ADDRESS, and Psensor_drv.

float BSP_PSENSOR_ReadPressure ( void )

Read Pressure register of LPS22HB.

Return values:
LPS22HB measured pressure value.

Definition at line 84 of file stm32l475e_iot01_psensor.c.

References LPS22HB_I2C_ADDRESS, and Psensor_drv.


B-L475E-IOT01 BSP User Manual: PRESSURE Exported Types

Enumerations
PRESSURE Exported Types
PRESSURE

Enumerations

enum PSENSOR_Status_TypDef { PSENSOR_OK = 0, PSENSOR_ERROR }
PSENSOR Status. More...

Enumeration Type Documentation

enum PSENSOR_Status_TypDef

PSENSOR Status.

Enumerator:
PSENSOR_OK
PSENSOR_ERROR

Definition at line 52 of file stm32l475e_iot01_psensor.h.


B-L475E-IOT01 BSP User Manual: PRESSURE Exported Functions

Functions
PRESSURE Exported Functions
PRESSURE

Functions

uint32_t | BSP_PSENSOR_Init (void)
Initializes peripherals used by the I2C Pressure Sensor driver.
uint8_t | BSP_PSENSOR_ReadID (void)
Read ID of LPS22HB.
float | BSP_PSENSOR_ReadPressure (void)
Read Pressure register of LPS22HB.

Function Documentation

uint32_t BSP_PSENSOR_Init ( void )

Initializes peripherals used by the I2C Pressure Sensor driver.

Return values:
PSENSOR status

Definition at line 51 of file stm32l475e_iot01_psensor.c.

References LPS22HB_I2C_ADDRESS, Psensor_drv, PSENSOR_ERROR, and PSENSOR_OK.

uint8_t BSP_PSENSOR_ReadID ( void )

Read ID of LPS22HB.

Return values:
LPS22HB ID value.

Definition at line 75 of file stm32l475e_iot01_psensor.c.

References LPS22HB_I2C_ADDRESS, and Psensor_drv.

float BSP_PSENSOR_ReadPressure ( void )

Read Pressure register of LPS22HB.

Return values:
LPS22HB measured pressure value.

Definition at line 84 of file stm32l475e_iot01_psensor.c.

References LPS22HB_I2C_ADDRESS, and Psensor_drv.


B-L475E-IOT01 BSP User Manual: QSPI Private Constants

Defines
QSPI Private Constants
QSPI

Defines

#define | QSPI_QUAD_DISABLE 0x0
#define | QSPI_QUAD_ENABLE 0x1
#define | QSPI_HIGH_PERF_DISABLE 0x0
#define | QSPI_HIGH_PERF_ENABLE 0x1

Define Documentation

#define QSPI_HIGH_PERF_DISABLE 0x0

Definition at line 81 of file stm32l475e_iot01_qspi.c.

Referenced by QSPI_HighPerfMode().

#define QSPI_HIGH_PERF_ENABLE 0x1

Definition at line 82 of file stm32l475e_iot01_qspi.c.

Referenced by BSP_QSPI_Init(), and QSPI_HighPerfMode().

#define QSPI_QUAD_DISABLE 0x0

Definition at line 78 of file stm32l475e_iot01_qspi.c.

Referenced by QSPI_QuadMode().

#define QSPI_QUAD_ENABLE 0x1

Definition at line 79 of file stm32l475e_iot01_qspi.c.

Referenced by BSP_QSPI_Init(), and QSPI_QuadMode().


B-L475E-IOT01 BSP User Manual: QSPI Private Variables

Variables
QSPI Private Variables
QSPI

Variables

QSPI_HandleTypeDef QSPIHandle

Variable Documentation

QSPI_HandleTypeDef QSPIHandle

Definition at line 91 of file stm32l475e_iot01_qspi.c.

Referenced by BSP_QSPI_DeInit(), BSP_QSPI_EnableMemoryMappedMode(), BSP_QSPI_EnterDeepPowerDown(), BSP_QSPI_Erase_Block(), BSP_QSPI_Erase_Chip(), BSP_QSPI_Erase_Sector(), BSP_QSPI_GetStatus(), BSP_QSPI_Init(), BSP_QSPI_LeaveDeepPowerDown(), BSP_QSPI_Read(), BSP_QSPI_ResumeErase(), BSP_QSPI_SuspendErase(), BSP_QSPI_Write(), QSPI_AutoPollingMemReady(), QSPI_HighPerfMode(), QSPI_QuadMode(), QSPI_ResetMemory(), and QSPI_WriteEnable().


B-L475E-IOT01 BSP User Manual: QSPI Private Functions

Functions
QSPI Private Functions
QSPI

Functions

static uint8_t | QSPI_ResetMemory (QSPI_HandleTypeDef *hqspi)
This function reset the QSPI memory.
static uint8_t | QSPI_WriteEnable (QSPI_HandleTypeDef *hqspi)
This function send a Write Enable and wait it is effective.
static uint8_t | QSPI_AutoPollingMemReady (QSPI_HandleTypeDef *hqspi, uint32_t Timeout)
This function read the SR of the memory and wait the EOP.
static uint8_t | QSPI_QuadMode (QSPI_HandleTypeDef *hqspi, uint8_t Operation)
This function enables/disables the Quad mode of the memory.
static uint8_t | QSPI_HighPerfMode (QSPI_HandleTypeDef *hqspi, uint8_t Operation)
This function enables/disables the high performance mode of the memory.

Function Documentation

static uint8_t QSPI_AutoPollingMemReady | ( | QSPI_HandleTypeDef * | hqspi,
 |  | uint32_t | Timeout
 | ) |  | [static]

This function read the SR of the memory and wait the EOP.

Parameters:
hqspi | : QSPI handle
Timeout | : Timeout for auto-polling
Return values:
None

Definition at line 866 of file stm32l475e_iot01_qspi.c.

References QSPI_ERROR, QSPI_OK, and QSPIHandle.

Referenced by BSP_QSPI_Erase_Block(), BSP_QSPI_Erase_Chip(), BSP_QSPI_Write(), QSPI_HighPerfMode(), QSPI_QuadMode(), and QSPI_ResetMemory().

static uint8_t QSPI_HighPerfMode | ( | QSPI_HandleTypeDef * | hqspi,
 |  | uint8_t | Operation
 | ) |  | [static]

This function enables/disables the high performance mode of the memory.

Parameters:
hqspi | : QSPI handle
Operation | : QSPI_HIGH_PERF_ENABLE or QSPI_HIGH_PERF_DISABLE high performance mode
Return values:
None

Definition at line 992 of file stm32l475e_iot01_qspi.c.

References QSPI_AutoPollingMemReady(), QSPI_ERROR, QSPI_HIGH_PERF_DISABLE, QSPI_HIGH_PERF_ENABLE, QSPI_OK, QSPI_WriteEnable(), and QSPIHandle.

Referenced by BSP_QSPI_Init().

static uint8_t QSPI_QuadMode | ( | QSPI_HandleTypeDef * | hqspi,
 |  | uint8_t | Operation
 | ) |  | [static]

This function enables/disables the Quad mode of the memory.

Parameters:
hqspi | : QSPI handle
Operation | : QSPI_QUAD_ENABLE or QSPI_QUAD_DISABLE mode
Return values:
None

Definition at line 903 of file stm32l475e_iot01_qspi.c.

References QSPI_AutoPollingMemReady(), QSPI_ERROR, QSPI_OK, QSPI_QUAD_DISABLE, QSPI_QUAD_ENABLE, QSPI_WriteEnable(), and QSPIHandle.

Referenced by BSP_QSPI_Init().

static uint8_t QSPI_ResetMemory ( QSPI_HandleTypeDef * hqspi ) [static]

This function reset the QSPI memory.

Parameters:
hqspi : QSPI handle
Return values:
None

Definition at line 778 of file stm32l475e_iot01_qspi.c.

References QSPI_AutoPollingMemReady(), QSPI_ERROR, QSPI_OK, and QSPIHandle.

Referenced by BSP_QSPI_Init().

static uint8_t QSPI_WriteEnable ( QSPI_HandleTypeDef * hqspi ) [static]

This function send a Write Enable and wait it is effective.

Parameters:
hqspi : QSPI handle
Return values:
None

Definition at line 820 of file stm32l475e_iot01_qspi.c.

References QSPI_ERROR, QSPI_OK, and QSPIHandle.

Referenced by BSP_QSPI_Erase_Block(), BSP_QSPI_Erase_Chip(), BSP_QSPI_Erase_Sector(), BSP_QSPI_Write(), QSPI_HighPerfMode(), and QSPI_QuadMode().


B-L475E-IOT01 BSP User Manual: QSPI Exported Constants

Defines
QSPI Exported Constants
QSPI

Defines

#define | QSPI_OK ((uint8_t)0x00)
#define | QSPI_ERROR ((uint8_t)0x01)
#define | QSPI_BUSY ((uint8_t)0x02)
#define | QSPI_NOT_SUPPORTED ((uint8_t)0x04)
#define | QSPI_SUSPENDED ((uint8_t)0x08)

Define Documentation

#define QSPI_BUSY ((uint8_t)0x02)

Definition at line 52 of file stm32l475e_iot01_qspi.h.

Referenced by BSP_QSPI_GetStatus(), BSP_QSPI_ResumeErase(), and BSP_QSPI_SuspendErase().

#define QSPI_ERROR ((uint8_t)0x01)

Definition at line 51 of file stm32l475e_iot01_qspi.h.

Referenced by BSP_QSPI_DeInit(), BSP_QSPI_EnableMemoryMappedMode(), BSP_QSPI_EnterDeepPowerDown(), BSP_QSPI_Erase_Block(), BSP_QSPI_Erase_Chip(), BSP_QSPI_Erase_Sector(), BSP_QSPI_GetStatus(), BSP_QSPI_Init(), BSP_QSPI_LeaveDeepPowerDown(), BSP_QSPI_Read(), BSP_QSPI_ResumeErase(), BSP_QSPI_SuspendErase(), BSP_QSPI_Write(), QSPI_AutoPollingMemReady(), QSPI_HighPerfMode(), QSPI_QuadMode(), QSPI_ResetMemory(), and QSPI_WriteEnable().

#define QSPI_NOT_SUPPORTED ((uint8_t)0x04)

Definition at line 53 of file stm32l475e_iot01_qspi.h.

Referenced by BSP_QSPI_Init().

#define QSPI_OK ((uint8_t)0x00)

Definition at line 50 of file stm32l475e_iot01_qspi.h.

Referenced by BSP_QSPI_DeInit(), BSP_QSPI_EnableMemoryMappedMode(), BSP_QSPI_EnterDeepPowerDown(), BSP_QSPI_Erase_Block(), BSP_QSPI_Erase_Chip(), BSP_QSPI_Erase_Sector(), BSP_QSPI_GetInfo(), BSP_QSPI_GetStatus(), BSP_QSPI_Init(), BSP_QSPI_LeaveDeepPowerDown(), BSP_QSPI_Read(), BSP_QSPI_ResumeErase(), BSP_QSPI_SuspendErase(), BSP_QSPI_Write(), QSPI_AutoPollingMemReady(), QSPI_HighPerfMode(), QSPI_QuadMode(), QSPI_ResetMemory(), and QSPI_WriteEnable().

#define QSPI_SUSPENDED ((uint8_t)0x08)

Definition at line 54 of file stm32l475e_iot01_qspi.h.

Referenced by BSP_QSPI_GetStatus(), BSP_QSPI_ResumeErase(), and BSP_QSPI_SuspendErase().


B-L475E-IOT01 BSP User Manual: QSPI_Info Struct Reference

  • Data Structure Index
  • Data Fields
Data Fields
QSPI_Info Struct Reference
QSPI Exported Types

#include <stm32l475e_iot01_qspi.h>

Data Fields

uint32_t | FlashSize
uint32_t | EraseSectorSize
uint32_t | EraseSectorsNumber
uint32_t | ProgPageSize
uint32_t | ProgPagesNumber

Detailed Description

Definition at line 65 of file stm32l475e_iot01_qspi.h.

Field Documentation

uint32_t QSPI_Info::EraseSectorSize

Size of sectors for the erase operation

Definition at line 67 of file stm32l475e_iot01_qspi.h.

Referenced by BSP_QSPI_GetInfo().

uint32_t QSPI_Info::EraseSectorsNumber

Number of sectors for the erase operation

Definition at line 68 of file stm32l475e_iot01_qspi.h.

Referenced by BSP_QSPI_GetInfo().

uint32_t QSPI_Info::FlashSize

Size of the flash

Definition at line 66 of file stm32l475e_iot01_qspi.h.

Referenced by BSP_QSPI_GetInfo().

uint32_t QSPI_Info::ProgPageSize

Size of pages for the program operation

Definition at line 69 of file stm32l475e_iot01_qspi.h.

Referenced by BSP_QSPI_GetInfo().

uint32_t QSPI_Info::ProgPagesNumber

Number of pages for the program operation

Definition at line 70 of file stm32l475e_iot01_qspi.h.

Referenced by BSP_QSPI_GetInfo().

The documentation for this struct was generated from the following file:
  • stm32l475e_iot01_qspi.h


B-L475E-IOT01 BSP User Manual: QSPI Exported Functions

Functions
QSPI Exported Functions
QSPI

Functions

uint8_t | BSP_QSPI_Init (void)
Initializes the QSPI interface.
uint8_t | BSP_QSPI_DeInit (void)
De-Initializes the QSPI interface.
uint8_t | BSP_QSPI_Read (uint8_t *pData, uint32_t ReadAddr, uint32_t Size)
Reads an amount of data from the QSPI memory.
uint8_t | BSP_QSPI_Write (uint8_t *pData, uint32_t WriteAddr, uint32_t Size)
Writes an amount of data to the QSPI memory.
uint8_t | BSP_QSPI_Erase_Block (uint32_t BlockAddress)
Erases the specified block of the QSPI memory.
uint8_t | BSP_QSPI_Erase_Sector (uint32_t Sector)
Erases the specified sector of the QSPI memory.
uint8_t | BSP_QSPI_Erase_Chip (void)
Erases the entire QSPI memory.
uint8_t | BSP_QSPI_GetStatus (void)
Reads current status of the QSPI memory.
uint8_t | BSP_QSPI_GetInfo (QSPI_Info *pInfo)
Return the configuration of the QSPI memory.
uint8_t | BSP_QSPI_EnableMemoryMappedMode (void)
Configure the QSPI in memory-mapped mode.
uint8_t | BSP_QSPI_SuspendErase (void)
This function suspends an ongoing erase command.
uint8_t | BSP_QSPI_ResumeErase (void)
This function resumes a paused erase command.
uint8_t | BSP_QSPI_EnterDeepPowerDown (void)
This function enter the QSPI memory in deep power down mode.
uint8_t | BSP_QSPI_LeaveDeepPowerDown (void)
This function leave the QSPI memory from deep power down mode.
__weak void | BSP_QSPI_MspInit (void)
Initializes the QSPI MSP.
__weak void | BSP_QSPI_MspDeInit (void)
De-Initializes the QSPI MSP.

Function Documentation

uint8_t BSP_QSPI_DeInit ( void )

De-Initializes the QSPI interface.

Return values:
QSPI memory status

Definition at line 182 of file stm32l475e_iot01_qspi.c.

References BSP_QSPI_MspDeInit(), QSPI_ERROR, QSPI_OK, and QSPIHandle.

uint8_t BSP_QSPI_EnableMemoryMappedMode ( void )

Configure the QSPI in memory-mapped mode.

Return values:
QSPI memory status

Definition at line 536 of file stm32l475e_iot01_qspi.c.

References QSPI_ERROR, QSPI_OK, and QSPIHandle.

uint8_t BSP_QSPI_EnterDeepPowerDown ( void )

This function enter the QSPI memory in deep power down mode.

Return values:
QSPI memory status

Definition at line 656 of file stm32l475e_iot01_qspi.c.

References QSPI_ERROR, QSPI_OK, and QSPIHandle.

uint8_t BSP_QSPI_Erase_Block ( uint32_t BlockAddress )

Erases the specified block of the QSPI memory.

Parameters:
BlockAddress : Block address to erase
Return values:
QSPI memory status

Definition at line 321 of file stm32l475e_iot01_qspi.c.

References QSPI_AutoPollingMemReady(), QSPI_ERROR, QSPI_OK, QSPI_WriteEnable(), and QSPIHandle.

uint8_t BSP_QSPI_Erase_Chip ( void )

Erases the entire QSPI memory.

Return values:
QSPI memory status

Definition at line 410 of file stm32l475e_iot01_qspi.c.

References QSPI_AutoPollingMemReady(), QSPI_ERROR, QSPI_OK, QSPI_WriteEnable(), and QSPIHandle.

uint8_t BSP_QSPI_Erase_Sector ( uint32_t Sector )

Erases the specified sector of the QSPI memory.

Parameters:
Sector : Sector address to erase (0 to 255)
Return values:
QSPI memory status
Note:
This function is non blocking meaning that sector erase operation is started but not completed when the function returns. Application has to call BSP_QSPI_GetStatus() to know when the device is available again (i.e. erase operation completed).

Definition at line 369 of file stm32l475e_iot01_qspi.c.

References QSPI_ERROR, QSPI_OK, QSPI_WriteEnable(), and QSPIHandle.

uint8_t BSP_QSPI_GetInfo ( QSPI_Info * pInfo )

Return the configuration of the QSPI memory.

Parameters:
pInfo : pointer on the configuration structure
Return values:
QSPI memory status

Definition at line 520 of file stm32l475e_iot01_qspi.c.

References QSPI_Info::EraseSectorSize, QSPI_Info::EraseSectorsNumber, QSPI_Info::FlashSize, QSPI_Info::ProgPageSize, QSPI_Info::ProgPagesNumber, and QSPI_OK.

uint8_t BSP_QSPI_GetStatus ( void )

Reads current status of the QSPI memory.

Return values:
QSPI memory status

Definition at line 450 of file stm32l475e_iot01_qspi.c.

References QSPI_BUSY, QSPI_ERROR, QSPI_OK, QSPI_SUSPENDED, and QSPIHandle.

Referenced by BSP_QSPI_ResumeErase(), and BSP_QSPI_SuspendErase().

uint8_t BSP_QSPI_Init ( void )

Initializes the QSPI interface.

Return values:
QSPI memory status

Definition at line 123 of file stm32l475e_iot01_qspi.c.

References BSP_QSPI_MspInit(), QSPI_ERROR, QSPI_HIGH_PERF_ENABLE, QSPI_HighPerfMode(), QSPI_NOT_SUPPORTED, QSPI_OK, QSPI_QUAD_ENABLE, QSPI_QuadMode(), QSPI_ResetMemory(), and QSPIHandle.

uint8_t BSP_QSPI_LeaveDeepPowerDown ( void )

This function leave the QSPI memory from deep power down mode.

Return values:
QSPI memory status

Definition at line 687 of file stm32l475e_iot01_qspi.c.

References QSPI_ERROR, QSPI_OK, and QSPIHandle.

void BSP_QSPI_MspDeInit ( void )

De-Initializes the QSPI MSP.

Return values:
None

Definition at line 746 of file stm32l475e_iot01_qspi.c.

Referenced by BSP_QSPI_DeInit().

void BSP_QSPI_MspInit ( void )

Initializes the QSPI MSP.

Return values:
None

Definition at line 718 of file stm32l475e_iot01_qspi.c.

Referenced by BSP_QSPI_Init().

uint8_t BSP_QSPI_Read | ( | uint8_t * | pData,
 |  | uint32_t | ReadAddr,
 |  | uint32_t | Size
 | ) |  |

Reads an amount of data from the QSPI memory.

Parameters:
pData | : Pointer to data to be read
ReadAddr | : Read start address
Size | : Size of data to read
Return values:
QSPI memory status

Definition at line 205 of file stm32l475e_iot01_qspi.c.

References QSPI_ERROR, QSPI_OK, and QSPIHandle.

uint8_t BSP_QSPI_ResumeErase ( void )

This function resumes a paused erase command.

Return values:
QSPI memory status

Definition at line 611 of file stm32l475e_iot01_qspi.c.

References BSP_QSPI_GetStatus(), QSPI_BUSY, QSPI_ERROR, QSPI_OK, QSPI_SUSPENDED, and QSPIHandle.

uint8_t BSP_QSPI_SuspendErase ( void )

This function suspends an ongoing erase command.

Return values:
QSPI memory status

Definition at line 570 of file stm32l475e_iot01_qspi.c.

References BSP_QSPI_GetStatus(), QSPI_BUSY, QSPI_ERROR, QSPI_OK, QSPI_SUSPENDED, and QSPIHandle.

uint8_t BSP_QSPI_Write | ( | uint8_t * | pData,
 |  | uint32_t | WriteAddr,
 |  | uint32_t | Size
 | ) |  |

Writes an amount of data to the QSPI memory.

Parameters:
pData | : Pointer to data to be written
WriteAddr | : Write start address
Size | : Size of data to write
Return values:
QSPI memory status

Definition at line 247 of file stm32l475e_iot01_qspi.c.

References QSPI_AutoPollingMemReady(), QSPI_ERROR, QSPI_OK, QSPI_WriteEnable(), and QSPIHandle.


B-L475E-IOT01 BSP User Manual: TEMPERATURE Private Variables

Variables
TEMPERATURE Private Variables
TEMPERATURE

Variables

static TSENSOR_DrvTypeDef * tsensor_drv

Variable Documentation

TSENSOR_DrvTypeDef* tsensor_drv [static]

Definition at line 38 of file stm32l475e_iot01_tsensor.c.

Referenced by BSP_TSENSOR_Init(), and BSP_TSENSOR_ReadTemp().


B-L475E-IOT01 BSP User Manual: TEMPERATURE Private Functions

Functions
TEMPERATURE Private Functions
TEMPERATURE

Functions

uint32_t | BSP_TSENSOR_Init (void)
Initializes peripherals used by the I2C Temperature Sensor driver.
float | BSP_TSENSOR_ReadTemp (void)
Read Temperature register of TS751.

Function Documentation

uint32_t BSP_TSENSOR_Init ( void )

Initializes peripherals used by the I2C Temperature Sensor driver.

Return values:
TSENSOR status

Definition at line 51 of file stm32l475e_iot01_tsensor.c.

References SENSOR_IO_Init(), tsensor_drv, TSENSOR_ERROR, TSENSOR_I2C_ADDRESS, and TSENSOR_OK.

float BSP_TSENSOR_ReadTemp ( void )

Read Temperature register of TS751.

Return values:
STTS751 measured temperature value.

Definition at line 76 of file stm32l475e_iot01_tsensor.c.

References tsensor_drv, and TSENSOR_I2C_ADDRESS.


B-L475E-IOT01 BSP User Manual: TEMPERATURE Exported Types

Enumerations
TEMPERATURE Exported Types
TEMPERATURE

Enumerations

enum TSENSOR_Status_TypDef { TSENSOR_OK = 0, TSENSOR_ERROR }
TSENSOR Status. More...

Enumeration Type Documentation

enum TSENSOR_Status_TypDef

TSENSOR Status.

Enumerator:
TSENSOR_OK
TSENSOR_ERROR

Definition at line 55 of file stm32l475e_iot01_tsensor.h.


B-L475E-IOT01 BSP User Manual: TEMPERATURE Exported Constants

Functions
TEMPERATURE Exported Constants
TEMPERATURE

Functions

uint32_t | BSP_TSENSOR_Init (void)
Initializes peripherals used by the I2C Temperature Sensor driver.
float | BSP_TSENSOR_ReadTemp (void)
Read Temperature register of TS751.

Function Documentation

uint32_t BSP_TSENSOR_Init ( void )

Initializes peripherals used by the I2C Temperature Sensor driver.

Return values:
TSENSOR status

Definition at line 51 of file stm32l475e_iot01_tsensor.c.

References SENSOR_IO_Init(), tsensor_drv, TSENSOR_ERROR, TSENSOR_I2C_ADDRESS, and TSENSOR_OK.

float BSP_TSENSOR_ReadTemp ( void )

Read Temperature register of TS751.

Return values:
STTS751 measured temperature value.

Definition at line 76 of file stm32l475e_iot01_tsensor.c.

References tsensor_drv, and TSENSOR_I2C_ADDRESS.


B-L475E-IOT01 BSP User Manual: Data Fields

  • Data Structure Index
  • Data Fields
  • All
  • Variables
Here is a list of all struct and union fields with links to the structures/unions they belong to:
  • EraseSectorSize : QSPI_Info
  • EraseSectorsNumber : QSPI_Info
  • FlashSize : QSPI_Info
  • ProgPageSize : QSPI_Info
  • ProgPagesNumber : QSPI_Info


B-L475E-IOT01 BSP User Manual: Data Fields - Variables

  • Data Structure Index
  • Data Fields
  • All
  • Variables
  • EraseSectorSize : QSPI_Info
  • EraseSectorsNumber : QSPI_Info
  • FlashSize : QSPI_Info
  • ProgPageSize : QSPI_Info
  • ProgPagesNumber : QSPI_Info


B-L475E-IOT01 BSP User Manual: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • q
  • s
  • t
  • u
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- _ -

  • __STM32L475E_IOT01_BSP_VERSION : stm32l475e_iot01.c
  • __STM32L475E_IOT01_BSP_VERSION_MAIN : stm32l475e_iot01.c
  • __STM32L475E_IOT01_BSP_VERSION_RC : stm32l475e_iot01.c
  • __STM32L475E_IOT01_BSP_VERSION_SUB1 : stm32l475e_iot01.c
  • __STM32L475E_IOT01_BSP_VERSION_SUB2 : stm32l475e_iot01.c


B-L475E-IOT01 BSP User Manual: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • q
  • s
  • t
  • u
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- a -

  • ACCELERO_ERROR : stm32l475e_iot01_accelero.h
  • ACCELERO_OK : stm32l475e_iot01_accelero.h
  • ACCELERO_StatusTypeDef : stm32l475e_iot01_accelero.h
  • ACCELERO_TIMEOUT : stm32l475e_iot01_accelero.h
  • AccelerometerDrv : stm32l475e_iot01_accelero.c


B-L475E-IOT01 BSP User Manual: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • q
  • s
  • t
  • u
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- b -

  • BSP_ACCELERO_AccGetXYZ() : stm32l475e_iot01_accelero.c , stm32l475e_iot01_accelero.h
  • BSP_ACCELERO_DeInit() : stm32l475e_iot01_accelero.h , stm32l475e_iot01_accelero.c
  • BSP_ACCELERO_Init() : stm32l475e_iot01_accelero.c , stm32l475e_iot01_accelero.h
  • BSP_ACCELERO_LowPower() : stm32l475e_iot01_accelero.h , stm32l475e_iot01_accelero.c
  • BSP_COM_DeInit() : stm32l475e_iot01.c , stm32l475e_iot01.h
  • BSP_COM_Init() : stm32l475e_iot01.c , stm32l475e_iot01.h
  • BSP_GetVersion() : stm32l475e_iot01.c , stm32l475e_iot01.h
  • BSP_GYRO_DeInit() : stm32l475e_iot01_gyro.h , stm32l475e_iot01_gyro.c
  • BSP_GYRO_GetXYZ() : stm32l475e_iot01_gyro.c , stm32l475e_iot01_gyro.h
  • BSP_GYRO_Init() : stm32l475e_iot01_gyro.c , stm32l475e_iot01_gyro.h
  • BSP_GYRO_LowPower() : stm32l475e_iot01_gyro.c , stm32l475e_iot01_gyro.h
  • BSP_HSENSOR_Init() : stm32l475e_iot01_hsensor.c , stm32l475e_iot01_hsensor.h
  • BSP_HSENSOR_ReadHumidity() : stm32l475e_iot01_hsensor.c , stm32l475e_iot01_hsensor.h
  • BSP_HSENSOR_ReadID() : stm32l475e_iot01_hsensor.c , stm32l475e_iot01_hsensor.h
  • BSP_LED_DeInit() : stm32l475e_iot01.c , stm32l475e_iot01.h
  • BSP_LED_Init() : stm32l475e_iot01.h , stm32l475e_iot01.c
  • BSP_LED_Off() : stm32l475e_iot01.c , stm32l475e_iot01.h
  • BSP_LED_On() : stm32l475e_iot01.c , stm32l475e_iot01.h
  • BSP_LED_Toggle() : stm32l475e_iot01.c , stm32l475e_iot01.h
  • BSP_MAGNETO_DeInit() : stm32l475e_iot01_magneto.c , stm32l475e_iot01_magneto.h
  • BSP_MAGNETO_GetXYZ() : stm32l475e_iot01_magneto.c , stm32l475e_iot01_magneto.h
  • BSP_MAGNETO_Init() : stm32l475e_iot01_magneto.c , stm32l475e_iot01_magneto.h
  • BSP_MAGNETO_LowPower() : stm32l475e_iot01_magneto.c , stm32l475e_iot01_magneto.h
  • BSP_PB_DeInit() : stm32l475e_iot01.c , stm32l475e_iot01.h
  • BSP_PB_GetState() : stm32l475e_iot01.c , stm32l475e_iot01.h
  • BSP_PB_Init() : stm32l475e_iot01.c , stm32l475e_iot01.h
  • BSP_PSENSOR_Init() : stm32l475e_iot01_psensor.c , stm32l475e_iot01_psensor.h
  • BSP_PSENSOR_ReadID() : stm32l475e_iot01_psensor.c , stm32l475e_iot01_psensor.h
  • BSP_PSENSOR_ReadPressure() : stm32l475e_iot01_psensor.c , stm32l475e_iot01_psensor.h
  • BSP_QSPI_DeInit() : stm32l475e_iot01_qspi.c
  • BSP_QSPI_EnableMemoryMappedMode() : stm32l475e_iot01_qspi.c
  • BSP_QSPI_EnterDeepPowerDown() : stm32l475e_iot01_qspi.c
  • BSP_QSPI_Erase_Block() : stm32l475e_iot01_qspi.c
  • BSP_QSPI_Erase_Chip() : stm32l475e_iot01_qspi.c
  • BSP_QSPI_Erase_Sector() : stm32l475e_iot01_qspi.c
  • BSP_QSPI_GetInfo() : stm32l475e_iot01_qspi.c
  • BSP_QSPI_GetStatus() : stm32l475e_iot01_qspi.c
  • BSP_QSPI_Init() : stm32l475e_iot01_qspi.c
  • BSP_QSPI_LeaveDeepPowerDown() : stm32l475e_iot01_qspi.c
  • BSP_QSPI_MspDeInit() : stm32l475e_iot01_qspi.c
  • BSP_QSPI_MspInit() : stm32l475e_iot01_qspi.c
  • BSP_QSPI_Read() : stm32l475e_iot01_qspi.c
  • BSP_QSPI_ResumeErase() : stm32l475e_iot01_qspi.c
  • BSP_QSPI_SuspendErase() : stm32l475e_iot01_qspi.c
  • BSP_QSPI_Write() : stm32l475e_iot01_qspi.c
  • BSP_TSENSOR_Init() : stm32l475e_iot01_tsensor.c , stm32l475e_iot01_tsensor.h
  • BSP_TSENSOR_ReadTemp() : stm32l475e_iot01_tsensor.c , stm32l475e_iot01_tsensor.h
  • BUTTON_IRQn : stm32l475e_iot01.c
  • BUTTON_MODE_EXTI : stm32l475e_iot01.h
  • BUTTON_MODE_GPIO : stm32l475e_iot01.h
  • BUTTON_PIN : stm32l475e_iot01.c
  • BUTTON_PORT : stm32l475e_iot01.c
  • Button_TypeDef : stm32l475e_iot01.h
  • BUTTON_USER : stm32l475e_iot01.h
  • ButtonMode_TypeDef : stm32l475e_iot01.h
  • BUTTONn : stm32l475e_iot01.h


B-L475E-IOT01 BSP User Manual: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • q
  • s
  • t
  • u
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- c -

  • COM1 : stm32l475e_iot01.h
  • COM2 : stm32l475e_iot01.h
  • COM_RX_AF : stm32l475e_iot01.c
  • COM_RX_PIN : stm32l475e_iot01.c
  • COM_RX_PORT : stm32l475e_iot01.c
  • COM_TX_AF : stm32l475e_iot01.c
  • COM_TX_PIN : stm32l475e_iot01.c
  • COM_TX_PORT : stm32l475e_iot01.c
  • COM_TypeDef : stm32l475e_iot01.h
  • COM_USART : stm32l475e_iot01.c
  • COMn : stm32l475e_iot01.h


B-L475E-IOT01 BSP User Manual: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • q
  • s
  • t
  • u
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- d -

  • DISCOVERY_COM1 : stm32l475e_iot01.h
  • DISCOVERY_COM1_CLK_DISABLE : stm32l475e_iot01.h
  • DISCOVERY_COM1_CLK_ENABLE : stm32l475e_iot01.h
  • DISCOVERY_COM1_IRQn : stm32l475e_iot01.h
  • DISCOVERY_COM1_RX_AF : stm32l475e_iot01.h
  • DISCOVERY_COM1_RX_GPIO_CLK_DISABLE : stm32l475e_iot01.h
  • DISCOVERY_COM1_RX_GPIO_CLK_ENABLE : stm32l475e_iot01.h
  • DISCOVERY_COM1_RX_GPIO_PORT : stm32l475e_iot01.h
  • DISCOVERY_COM1_RX_PIN : stm32l475e_iot01.h
  • DISCOVERY_COM1_TX_AF : stm32l475e_iot01.h
  • DISCOVERY_COM1_TX_GPIO_CLK_DISABLE : stm32l475e_iot01.h
  • DISCOVERY_COM1_TX_GPIO_CLK_ENABLE : stm32l475e_iot01.h
  • DISCOVERY_COM1_TX_GPIO_PORT : stm32l475e_iot01.h
  • DISCOVERY_COM1_TX_PIN : stm32l475e_iot01.h
  • DISCOVERY_COMx_CLK_DISABLE : stm32l475e_iot01.h
  • DISCOVERY_COMx_CLK_ENABLE : stm32l475e_iot01.h
  • DISCOVERY_COMx_RX_GPIO_CLK_DISABLE : stm32l475e_iot01.h
  • DISCOVERY_COMx_RX_GPIO_CLK_ENABLE : stm32l475e_iot01.h
  • DISCOVERY_COMx_TX_GPIO_CLK_DISABLE : stm32l475e_iot01.h
  • DISCOVERY_COMx_TX_GPIO_CLK_ENABLE : stm32l475e_iot01.h
  • DISCOVERY_DMAx_CLK_ENABLE : stm32l475e_iot01.h
  • DISCOVERY_I2Cx : stm32l475e_iot01.h
  • DISCOVERY_I2Cx_CLK_DISABLE : stm32l475e_iot01.h
  • DISCOVERY_I2Cx_CLK_ENABLE : stm32l475e_iot01.h
  • DISCOVERY_I2Cx_ER_IRQn : stm32l475e_iot01.h
  • DISCOVERY_I2Cx_EV_IRQn : stm32l475e_iot01.h
  • DISCOVERY_I2Cx_FORCE_RESET : stm32l475e_iot01.h
  • DISCOVERY_I2Cx_RELEASE_RESET : stm32l475e_iot01.h
  • DISCOVERY_I2Cx_SCL_PIN : stm32l475e_iot01.h
  • DISCOVERY_I2Cx_SCL_SDA_AF : stm32l475e_iot01.h
  • DISCOVERY_I2Cx_SCL_SDA_GPIO_CLK_DISABLE : stm32l475e_iot01.h
  • DISCOVERY_I2Cx_SCL_SDA_GPIO_CLK_ENABLE : stm32l475e_iot01.h
  • DISCOVERY_I2Cx_SCL_SDA_GPIO_PORT : stm32l475e_iot01.h
  • DISCOVERY_I2Cx_SDA_PIN : stm32l475e_iot01.h


B-L475E-IOT01 BSP User Manual: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • q
  • s
  • t
  • u
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- g -

  • GPIO_PIN : stm32l475e_iot01.c
  • GPIO_PORT : stm32l475e_iot01.c
  • GYRO_ERROR : stm32l475e_iot01_gyro.h
  • GYRO_OK : stm32l475e_iot01_gyro.h
  • GYRO_StatusTypeDef : stm32l475e_iot01_gyro.h
  • GYRO_TIMEOUT : stm32l475e_iot01_gyro.h
  • GyroscopeDrv : stm32l475e_iot01_gyro.c


B-L475E-IOT01 BSP User Manual: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • q
  • s
  • t
  • u
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- h -

  • hDiscoUart : stm32l475e_iot01.c
  • hI2cHandler : stm32l475e_iot01.c
  • Hsensor_drv : stm32l475e_iot01_hsensor.c
  • HSENSOR_ERROR : stm32l475e_iot01_hsensor.h
  • HSENSOR_OK : stm32l475e_iot01_hsensor.h
  • HSENSOR_Status_TypDef : stm32l475e_iot01_hsensor.h
  • HTS221_I2C_ADDRESS : stm32l475e_iot01.h


B-L475E-IOT01 BSP User Manual: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • q
  • s
  • t
  • u
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- i -

  • I2Cx_DeInit() : stm32l475e_iot01.c
  • I2Cx_Error() : stm32l475e_iot01.c
  • I2Cx_Init() : stm32l475e_iot01.c
  • I2Cx_IsDeviceReady() : stm32l475e_iot01.c
  • I2Cx_MspDeInit() : stm32l475e_iot01.c
  • I2Cx_MspInit() : stm32l475e_iot01.c
  • I2Cx_ReadMultiple() : stm32l475e_iot01.c
  • I2Cx_WriteMultiple() : stm32l475e_iot01.c


B-L475E-IOT01 BSP User Manual: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • q
  • s
  • t
  • u
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- l -

  • LED2 : stm32l475e_iot01.h
  • LED2_GPIO_CLK_DISABLE : stm32l475e_iot01.h
  • LED2_GPIO_CLK_ENABLE : stm32l475e_iot01.h
  • LED2_GPIO_PORT : stm32l475e_iot01.h
  • LED2_PIN : stm32l475e_iot01.h
  • LED_GREEN : stm32l475e_iot01.h
  • Led_TypeDef : stm32l475e_iot01.h
  • LEDn : stm32l475e_iot01.h
  • LEDx_GPIO_CLK_DISABLE : stm32l475e_iot01.h
  • LEDx_GPIO_CLK_ENABLE : stm32l475e_iot01.h
  • LPS22HB_I2C_ADDRESS : stm32l475e_iot01.h


B-L475E-IOT01 BSP User Manual: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • q
  • s
  • t
  • u
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- m -

  • M24SR_I2C_ADDR : stm32l475e_iot01.h
  • MAGNETO_ERROR : stm32l475e_iot01_magneto.h
  • MAGNETO_OK : stm32l475e_iot01_magneto.h
  • MAGNETO_StatusTypeDef : stm32l475e_iot01_magneto.h
  • MAGNETO_TIMEOUT : stm32l475e_iot01_magneto.h
  • MagnetoDrv : stm32l475e_iot01_magneto.c


B-L475E-IOT01 BSP User Manual: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • q
  • s
  • t
  • u
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- n -

  • NFC_GPIO_CLK_DISABLE : stm32l475e_iot01.h
  • NFC_GPIO_CLK_ENABLE : stm32l475e_iot01.h
  • NFC_GPIO_GPO_PIN : stm32l475e_iot01.h
  • NFC_GPIO_GPO_PIN_PORT : stm32l475e_iot01.h
  • NFC_GPIO_RFDISABLE_PIN : stm32l475e_iot01.h
  • NFC_GPIO_RFDISABLE_PIN_PORT : stm32l475e_iot01.h
  • NFC_I2C_ERROR_TIMEOUT : stm32l475e_iot01.h
  • NFC_I2C_STATUS_SUCCESS : stm32l475e_iot01.h
  • NFC_I2C_TIMEOUT_MAX : stm32l475e_iot01.h
  • NFC_I2C_TIMEOUT_STD : stm32l475e_iot01.h
  • NFC_I2C_TRIALS : stm32l475e_iot01.h
  • NFC_IO_DeInit() : stm32l475e_iot01.c
  • NFC_IO_Delay() : stm32l475e_iot01.c
  • NFC_IO_Init() : stm32l475e_iot01.c
  • NFC_IO_IsDeviceReady() : stm32l475e_iot01.c
  • NFC_IO_ReadMultiple() : stm32l475e_iot01.c
  • NFC_IO_ReadState() : stm32l475e_iot01.c
  • NFC_IO_RfDisable() : stm32l475e_iot01.c
  • NFC_IO_WriteMultiple() : stm32l475e_iot01.c


B-L475E-IOT01 BSP User Manual: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • q
  • s
  • t
  • u
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- p -

  • Psensor_drv : stm32l475e_iot01_psensor.c
  • PSENSOR_ERROR : stm32l475e_iot01_psensor.h
  • PSENSOR_OK : stm32l475e_iot01_psensor.h
  • PSENSOR_Status_TypDef : stm32l475e_iot01_psensor.h


B-L475E-IOT01 BSP User Manual: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • q
  • s
  • t
  • u
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- q -

  • QSPI_AutoPollingMemReady() : stm32l475e_iot01_qspi.c
  • QSPI_BUSY : stm32l475e_iot01_qspi.h
  • QSPI_ERROR : stm32l475e_iot01_qspi.h
  • QSPI_HIGH_PERF_DISABLE : stm32l475e_iot01_qspi.c
  • QSPI_HIGH_PERF_ENABLE : stm32l475e_iot01_qspi.c
  • QSPI_HighPerfMode() : stm32l475e_iot01_qspi.c
  • QSPI_NOT_SUPPORTED : stm32l475e_iot01_qspi.h
  • QSPI_OK : stm32l475e_iot01_qspi.h
  • QSPI_QUAD_DISABLE : stm32l475e_iot01_qspi.c
  • QSPI_QUAD_ENABLE : stm32l475e_iot01_qspi.c
  • QSPI_QuadMode() : stm32l475e_iot01_qspi.c
  • QSPI_ResetMemory() : stm32l475e_iot01_qspi.c
  • QSPI_SUSPENDED : stm32l475e_iot01_qspi.h
  • QSPI_WriteEnable() : stm32l475e_iot01_qspi.c
  • QSPIHandle : stm32l475e_iot01_qspi.c


B-L475E-IOT01 BSP User Manual: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • q
  • s
  • t
  • u
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- s -

  • SENSOR_IO_DeInit() : stm32l475e_iot01.c
  • SENSOR_IO_Delay() : stm32l475e_iot01.c
  • SENSOR_IO_Init() : stm32l475e_iot01.c
  • SENSOR_IO_IsDeviceReady() : stm32l475e_iot01.c
  • SENSOR_IO_Read() : stm32l475e_iot01.c
  • SENSOR_IO_ReadMultiple() : stm32l475e_iot01.c
  • SENSOR_IO_Write() : stm32l475e_iot01.c
  • SENSOR_IO_WriteMultiple() : stm32l475e_iot01.c


B-L475E-IOT01 BSP User Manual: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • q
  • s
  • t
  • u
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- t -

  • tsensor_drv : stm32l475e_iot01_tsensor.c
  • TSENSOR_ERROR : stm32l475e_iot01_tsensor.h
  • TSENSOR_I2C_ADDRESS : stm32l475e_iot01.h
  • TSENSOR_OK : stm32l475e_iot01_tsensor.h
  • TSENSOR_Status_TypDef : stm32l475e_iot01_tsensor.h


B-L475E-IOT01 BSP User Manual: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • q
  • s
  • t
  • u
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- u -

  • USER_BUTTON_EXTI_IRQn : stm32l475e_iot01.h
  • USER_BUTTON_GPIO_CLK_DISABLE : stm32l475e_iot01.h
  • USER_BUTTON_GPIO_CLK_ENABLE : stm32l475e_iot01.h
  • USER_BUTTON_GPIO_PORT : stm32l475e_iot01.h
  • USER_BUTTON_PIN : stm32l475e_iot01.h


B-L475E-IOT01 BSP User Manual: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • Defines
  • b
  • i
  • n
  • q
  • s

- b -

  • BSP_ACCELERO_AccGetXYZ() : stm32l475e_iot01_accelero.c , stm32l475e_iot01_accelero.h
  • BSP_ACCELERO_DeInit() : stm32l475e_iot01_accelero.h , stm32l475e_iot01_accelero.c
  • BSP_ACCELERO_Init() : stm32l475e_iot01_accelero.c , stm32l475e_iot01_accelero.h
  • BSP_ACCELERO_LowPower() : stm32l475e_iot01_accelero.h , stm32l475e_iot01_accelero.c
  • BSP_COM_DeInit() : stm32l475e_iot01.c , stm32l475e_iot01.h
  • BSP_COM_Init() : stm32l475e_iot01.c , stm32l475e_iot01.h
  • BSP_GetVersion() : stm32l475e_iot01.c , stm32l475e_iot01.h
  • BSP_GYRO_DeInit() : stm32l475e_iot01_gyro.h , stm32l475e_iot01_gyro.c
  • BSP_GYRO_GetXYZ() : stm32l475e_iot01_gyro.c , stm32l475e_iot01_gyro.h
  • BSP_GYRO_Init() : stm32l475e_iot01_gyro.c , stm32l475e_iot01_gyro.h
  • BSP_GYRO_LowPower() : stm32l475e_iot01_gyro.c , stm32l475e_iot01_gyro.h
  • BSP_HSENSOR_Init() : stm32l475e_iot01_hsensor.c , stm32l475e_iot01_hsensor.h
  • BSP_HSENSOR_ReadHumidity() : stm32l475e_iot01_hsensor.c , stm32l475e_iot01_hsensor.h
  • BSP_HSENSOR_ReadID() : stm32l475e_iot01_hsensor.c , stm32l475e_iot01_hsensor.h
  • BSP_LED_DeInit() : stm32l475e_iot01.c , stm32l475e_iot01.h
  • BSP_LED_Init() : stm32l475e_iot01.h , stm32l475e_iot01.c
  • BSP_LED_Off() : stm32l475e_iot01.c , stm32l475e_iot01.h
  • BSP_LED_On() : stm32l475e_iot01.c , stm32l475e_iot01.h
  • BSP_LED_Toggle() : stm32l475e_iot01.c , stm32l475e_iot01.h
  • BSP_MAGNETO_DeInit() : stm32l475e_iot01_magneto.c , stm32l475e_iot01_magneto.h
  • BSP_MAGNETO_GetXYZ() : stm32l475e_iot01_magneto.c , stm32l475e_iot01_magneto.h
  • BSP_MAGNETO_Init() : stm32l475e_iot01_magneto.c , stm32l475e_iot01_magneto.h
  • BSP_MAGNETO_LowPower() : stm32l475e_iot01_magneto.c , stm32l475e_iot01_magneto.h
  • BSP_PB_DeInit() : stm32l475e_iot01.c , stm32l475e_iot01.h
  • BSP_PB_GetState() : stm32l475e_iot01.c , stm32l475e_iot01.h
  • BSP_PB_Init() : stm32l475e_iot01.h , stm32l475e_iot01.c
  • BSP_PSENSOR_Init() : stm32l475e_iot01_psensor.c , stm32l475e_iot01_psensor.h
  • BSP_PSENSOR_ReadID() : stm32l475e_iot01_psensor.c , stm32l475e_iot01_psensor.h
  • BSP_PSENSOR_ReadPressure() : stm32l475e_iot01_psensor.c , stm32l475e_iot01_psensor.h
  • BSP_QSPI_DeInit() : stm32l475e_iot01_qspi.c
  • BSP_QSPI_EnableMemoryMappedMode() : stm32l475e_iot01_qspi.c
  • BSP_QSPI_EnterDeepPowerDown() : stm32l475e_iot01_qspi.c
  • BSP_QSPI_Erase_Block() : stm32l475e_iot01_qspi.c
  • BSP_QSPI_Erase_Chip() : stm32l475e_iot01_qspi.c
  • BSP_QSPI_Erase_Sector() : stm32l475e_iot01_qspi.c
  • BSP_QSPI_GetInfo() : stm32l475e_iot01_qspi.c
  • BSP_QSPI_GetStatus() : stm32l475e_iot01_qspi.c
  • BSP_QSPI_Init() : stm32l475e_iot01_qspi.c
  • BSP_QSPI_LeaveDeepPowerDown() : stm32l475e_iot01_qspi.c
  • BSP_QSPI_MspDeInit() : stm32l475e_iot01_qspi.c
  • BSP_QSPI_MspInit() : stm32l475e_iot01_qspi.c
  • BSP_QSPI_Read() : stm32l475e_iot01_qspi.c
  • BSP_QSPI_ResumeErase() : stm32l475e_iot01_qspi.c
  • BSP_QSPI_SuspendErase() : stm32l475e_iot01_qspi.c
  • BSP_QSPI_Write() : stm32l475e_iot01_qspi.c
  • BSP_TSENSOR_Init() : stm32l475e_iot01_tsensor.h , stm32l475e_iot01_tsensor.c
  • BSP_TSENSOR_ReadTemp() : stm32l475e_iot01_tsensor.h , stm32l475e_iot01_tsensor.c

- i -

  • I2Cx_DeInit() : stm32l475e_iot01.c
  • I2Cx_Error() : stm32l475e_iot01.c
  • I2Cx_Init() : stm32l475e_iot01.c
  • I2Cx_IsDeviceReady() : stm32l475e_iot01.c
  • I2Cx_MspDeInit() : stm32l475e_iot01.c
  • I2Cx_MspInit() : stm32l475e_iot01.c
  • I2Cx_ReadMultiple() : stm32l475e_iot01.c
  • I2Cx_WriteMultiple() : stm32l475e_iot01.c

- n -

  • NFC_IO_DeInit() : stm32l475e_iot01.c
  • NFC_IO_Delay() : stm32l475e_iot01.c
  • NFC_IO_Init() : stm32l475e_iot01.c
  • NFC_IO_IsDeviceReady() : stm32l475e_iot01.c
  • NFC_IO_ReadMultiple() : stm32l475e_iot01.c
  • NFC_IO_ReadState() : stm32l475e_iot01.c
  • NFC_IO_RfDisable() : stm32l475e_iot01.c
  • NFC_IO_WriteMultiple() : stm32l475e_iot01.c

- q -

  • QSPI_AutoPollingMemReady() : stm32l475e_iot01_qspi.c
  • QSPI_HighPerfMode() : stm32l475e_iot01_qspi.c
  • QSPI_QuadMode() : stm32l475e_iot01_qspi.c
  • QSPI_ResetMemory() : stm32l475e_iot01_qspi.c
  • QSPI_WriteEnable() : stm32l475e_iot01_qspi.c

- s -

  • SENSOR_IO_DeInit() : stm32l475e_iot01.c
  • SENSOR_IO_Delay() : stm32l475e_iot01.c
  • SENSOR_IO_Init() : stm32l475e_iot01.c
  • SENSOR_IO_IsDeviceReady() : stm32l475e_iot01.c
  • SENSOR_IO_Read() : stm32l475e_iot01.c
  • SENSOR_IO_ReadMultiple() : stm32l475e_iot01.c
  • SENSOR_IO_Write() : stm32l475e_iot01.c
  • SENSOR_IO_WriteMultiple() : stm32l475e_iot01.c


B-L475E-IOT01 BSP User Manual: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • Defines
  • AccelerometerDrv : stm32l475e_iot01_accelero.c
  • BUTTON_IRQn : stm32l475e_iot01.c
  • BUTTON_PIN : stm32l475e_iot01.c
  • BUTTON_PORT : stm32l475e_iot01.c
  • COM_RX_AF : stm32l475e_iot01.c
  • COM_RX_PIN : stm32l475e_iot01.c
  • COM_RX_PORT : stm32l475e_iot01.c
  • COM_TX_AF : stm32l475e_iot01.c
  • COM_TX_PIN : stm32l475e_iot01.c
  • COM_TX_PORT : stm32l475e_iot01.c
  • COM_USART : stm32l475e_iot01.c
  • GPIO_PIN : stm32l475e_iot01.c
  • GPIO_PORT : stm32l475e_iot01.c
  • GyroscopeDrv : stm32l475e_iot01_gyro.c
  • hDiscoUart : stm32l475e_iot01.c
  • hI2cHandler : stm32l475e_iot01.c
  • Hsensor_drv : stm32l475e_iot01_hsensor.c
  • MagnetoDrv : stm32l475e_iot01_magneto.c
  • Psensor_drv : stm32l475e_iot01_psensor.c
  • QSPIHandle : stm32l475e_iot01_qspi.c
  • tsensor_drv : stm32l475e_iot01_tsensor.c


B-L475E-IOT01 BSP User Manual: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • Defines
  • ACCELERO_StatusTypeDef : stm32l475e_iot01_accelero.h
  • Button_TypeDef : stm32l475e_iot01.h
  • ButtonMode_TypeDef : stm32l475e_iot01.h
  • COM_TypeDef : stm32l475e_iot01.h
  • GYRO_StatusTypeDef : stm32l475e_iot01_gyro.h
  • HSENSOR_Status_TypDef : stm32l475e_iot01_hsensor.h
  • Led_TypeDef : stm32l475e_iot01.h
  • MAGNETO_StatusTypeDef : stm32l475e_iot01_magneto.h
  • PSENSOR_Status_TypDef : stm32l475e_iot01_psensor.h
  • TSENSOR_Status_TypDef : stm32l475e_iot01_tsensor.h


B-L475E-IOT01 BSP User Manual: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • Defines
  • ACCELERO_ERROR : stm32l475e_iot01_accelero.h
  • ACCELERO_OK : stm32l475e_iot01_accelero.h
  • ACCELERO_TIMEOUT : stm32l475e_iot01_accelero.h
  • BUTTON_MODE_EXTI : stm32l475e_iot01.h
  • BUTTON_MODE_GPIO : stm32l475e_iot01.h
  • BUTTON_USER : stm32l475e_iot01.h
  • COM1 : stm32l475e_iot01.h
  • COM2 : stm32l475e_iot01.h
  • GYRO_ERROR : stm32l475e_iot01_gyro.h
  • GYRO_OK : stm32l475e_iot01_gyro.h
  • GYRO_TIMEOUT : stm32l475e_iot01_gyro.h
  • HSENSOR_ERROR : stm32l475e_iot01_hsensor.h
  • HSENSOR_OK : stm32l475e_iot01_hsensor.h
  • LED2 : stm32l475e_iot01.h
  • LED_GREEN : stm32l475e_iot01.h
  • MAGNETO_ERROR : stm32l475e_iot01_magneto.h
  • MAGNETO_OK : stm32l475e_iot01_magneto.h
  • MAGNETO_TIMEOUT : stm32l475e_iot01_magneto.h
  • PSENSOR_ERROR : stm32l475e_iot01_psensor.h
  • PSENSOR_OK : stm32l475e_iot01_psensor.h
  • TSENSOR_ERROR : stm32l475e_iot01_tsensor.h
  • TSENSOR_OK : stm32l475e_iot01_tsensor.h


B-L475E-IOT01 BSP User Manual: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • Defines
  • _
  • b
  • c
  • d
  • h
  • l
  • m
  • n
  • q
  • t
  • u

- _ -

  • __STM32L475E_IOT01_BSP_VERSION : stm32l475e_iot01.c
  • __STM32L475E_IOT01_BSP_VERSION_MAIN : stm32l475e_iot01.c
  • __STM32L475E_IOT01_BSP_VERSION_RC : stm32l475e_iot01.c
  • __STM32L475E_IOT01_BSP_VERSION_SUB1 : stm32l475e_iot01.c
  • __STM32L475E_IOT01_BSP_VERSION_SUB2 : stm32l475e_iot01.c

- b -

  • BUTTONn : stm32l475e_iot01.h

- c -

  • COMn : stm32l475e_iot01.h

- d -

  • DISCOVERY_COM1 : stm32l475e_iot01.h
  • DISCOVERY_COM1_CLK_DISABLE : stm32l475e_iot01.h
  • DISCOVERY_COM1_CLK_ENABLE : stm32l475e_iot01.h
  • DISCOVERY_COM1_IRQn : stm32l475e_iot01.h
  • DISCOVERY_COM1_RX_AF : stm32l475e_iot01.h
  • DISCOVERY_COM1_RX_GPIO_CLK_DISABLE : stm32l475e_iot01.h
  • DISCOVERY_COM1_RX_GPIO_CLK_ENABLE : stm32l475e_iot01.h
  • DISCOVERY_COM1_RX_GPIO_PORT : stm32l475e_iot01.h
  • DISCOVERY_COM1_RX_PIN : stm32l475e_iot01.h
  • DISCOVERY_COM1_TX_AF : stm32l475e_iot01.h
  • DISCOVERY_COM1_TX_GPIO_CLK_DISABLE : stm32l475e_iot01.h
  • DISCOVERY_COM1_TX_GPIO_CLK_ENABLE : stm32l475e_iot01.h
  • DISCOVERY_COM1_TX_GPIO_PORT : stm32l475e_iot01.h
  • DISCOVERY_COM1_TX_PIN : stm32l475e_iot01.h
  • DISCOVERY_COMx_CLK_DISABLE : stm32l475e_iot01.h
  • DISCOVERY_COMx_CLK_ENABLE : stm32l475e_iot01.h
  • DISCOVERY_COMx_RX_GPIO_CLK_DISABLE : stm32l475e_iot01.h
  • DISCOVERY_COMx_RX_GPIO_CLK_ENABLE : stm32l475e_iot01.h
  • DISCOVERY_COMx_TX_GPIO_CLK_DISABLE : stm32l475e_iot01.h
  • DISCOVERY_COMx_TX_GPIO_CLK_ENABLE : stm32l475e_iot01.h
  • DISCOVERY_DMAx_CLK_ENABLE : stm32l475e_iot01.h
  • DISCOVERY_I2Cx : stm32l475e_iot01.h
  • DISCOVERY_I2Cx_CLK_DISABLE : stm32l475e_iot01.h
  • DISCOVERY_I2Cx_CLK_ENABLE : stm32l475e_iot01.h
  • DISCOVERY_I2Cx_ER_IRQn : stm32l475e_iot01.h
  • DISCOVERY_I2Cx_EV_IRQn : stm32l475e_iot01.h
  • DISCOVERY_I2Cx_FORCE_RESET : stm32l475e_iot01.h
  • DISCOVERY_I2Cx_RELEASE_RESET : stm32l475e_iot01.h
  • DISCOVERY_I2Cx_SCL_PIN : stm32l475e_iot01.h
  • DISCOVERY_I2Cx_SCL_SDA_AF : stm32l475e_iot01.h
  • DISCOVERY_I2Cx_SCL_SDA_GPIO_CLK_DISABLE : stm32l475e_iot01.h
  • DISCOVERY_I2Cx_SCL_SDA_GPIO_CLK_ENABLE : stm32l475e_iot01.h
  • DISCOVERY_I2Cx_SCL_SDA_GPIO_PORT : stm32l475e_iot01.h
  • DISCOVERY_I2Cx_SDA_PIN : stm32l475e_iot01.h

- h -

  • HTS221_I2C_ADDRESS : stm32l475e_iot01.h

- l -

  • LED2_GPIO_CLK_DISABLE : stm32l475e_iot01.h
  • LED2_GPIO_CLK_ENABLE : stm32l475e_iot01.h
  • LED2_GPIO_PORT : stm32l475e_iot01.h
  • LED2_PIN : stm32l475e_iot01.h
  • LEDn : stm32l475e_iot01.h
  • LEDx_GPIO_CLK_DISABLE : stm32l475e_iot01.h
  • LEDx_GPIO_CLK_ENABLE : stm32l475e_iot01.h
  • LPS22HB_I2C_ADDRESS : stm32l475e_iot01.h

- m -

  • M24SR_I2C_ADDR : stm32l475e_iot01.h

- n -

  • NFC_GPIO_CLK_DISABLE : stm32l475e_iot01.h
  • NFC_GPIO_CLK_ENABLE : stm32l475e_iot01.h
  • NFC_GPIO_GPO_PIN : stm32l475e_iot01.h
  • NFC_GPIO_GPO_PIN_PORT : stm32l475e_iot01.h
  • NFC_GPIO_RFDISABLE_PIN : stm32l475e_iot01.h
  • NFC_GPIO_RFDISABLE_PIN_PORT : stm32l475e_iot01.h
  • NFC_I2C_ERROR_TIMEOUT : stm32l475e_iot01.h
  • NFC_I2C_STATUS_SUCCESS : stm32l475e_iot01.h
  • NFC_I2C_TIMEOUT_MAX : stm32l475e_iot01.h
  • NFC_I2C_TIMEOUT_STD : stm32l475e_iot01.h
  • NFC_I2C_TRIALS : stm32l475e_iot01.h

- q -

  • QSPI_BUSY : stm32l475e_iot01_qspi.h
  • QSPI_ERROR : stm32l475e_iot01_qspi.h
  • QSPI_HIGH_PERF_DISABLE : stm32l475e_iot01_qspi.c
  • QSPI_HIGH_PERF_ENABLE : stm32l475e_iot01_qspi.c
  • QSPI_NOT_SUPPORTED : stm32l475e_iot01_qspi.h
  • QSPI_OK : stm32l475e_iot01_qspi.h
  • QSPI_QUAD_DISABLE : stm32l475e_iot01_qspi.c
  • QSPI_QUAD_ENABLE : stm32l475e_iot01_qspi.c
  • QSPI_SUSPENDED : stm32l475e_iot01_qspi.h

- t -

  • TSENSOR_I2C_ADDRESS : stm32l475e_iot01.h

- u -

  • USER_BUTTON_EXTI_IRQn : stm32l475e_iot01.h
  • USER_BUTTON_GPIO_CLK_DISABLE : stm32l475e_iot01.h
  • USER_BUTTON_GPIO_CLK_ENABLE : stm32l475e_iot01.h
  • USER_BUTTON_GPIO_PORT : stm32l475e_iot01.h
  • USER_BUTTON_PIN : stm32l475e_iot01.h


B-L475E-IOT01 BSP User Manual: stm32l475e_iot01.c File Reference

  • File List
  • Globals
  • Firmware
  • Drivers
  • BSP
  • B-L475E-IOT01
Defines | Functions | Variables
stm32l475e_iot01.c File Reference

STM32L475E-IOT01 board support package. More...

#include "stm32l475e_iot01.h"

Go to the source code of this file.

Defines

#define | __STM32L475E_IOT01_BSP_VERSION_MAIN (0x01)
STM32L475E IOT01 BSP Driver version number.
#define | __STM32L475E_IOT01_BSP_VERSION_SUB1 (0x01)
#define | __STM32L475E_IOT01_BSP_VERSION_SUB2 (0x06)
#define | __STM32L475E_IOT01_BSP_VERSION_RC (0x00)
#define | __STM32L475E_IOT01_BSP_VERSION

Functions

static void | I2Cx_MspInit (I2C_HandleTypeDef *i2c_handler)
Initializes I2C MSP.
static void | I2Cx_MspDeInit (I2C_HandleTypeDef *i2c_handler)
DeInitializes I2C MSP.
static void | I2Cx_Init (I2C_HandleTypeDef *i2c_handler)
Initializes I2C HAL.
static void | I2Cx_DeInit (I2C_HandleTypeDef *i2c_handler)
DeInitializes I2C HAL.
static HAL_StatusTypeDef | I2Cx_ReadMultiple (I2C_HandleTypeDef *i2c_handler, uint8_t Addr, uint16_t Reg, uint16_t MemAddress, uint8_t *Buffer, uint16_t Length)
Reads multiple data.
static HAL_StatusTypeDef | I2Cx_WriteMultiple (I2C_HandleTypeDef *i2c_handler, uint8_t Addr, uint16_t Reg, uint16_t MemAddress, uint8_t *Buffer, uint16_t Length)
Writes a value in a register of the device through BUS in using DMA mode.
static HAL_StatusTypeDef | I2Cx_IsDeviceReady (I2C_HandleTypeDef *i2c_handler, uint16_t DevAddress, uint32_t Trials)
Checks if target device is ready for communication.
static void | I2Cx_Error (I2C_HandleTypeDef *i2c_handler, uint8_t Addr)
Manages error callback by re-initializing I2C.
void | SENSOR_IO_Init (void)
Initializes Sensors low level.
void | SENSOR_IO_DeInit (void)
DeInitializes Sensors low level.
void | SENSOR_IO_Write (uint8_t Addr, uint8_t Reg, uint8_t Value)
Writes a single data.
uint8_t | SENSOR_IO_Read (uint8_t Addr, uint8_t Reg)
Reads a single data.
uint16_t | SENSOR_IO_ReadMultiple (uint8_t Addr, uint8_t Reg, uint8_t *Buffer, uint16_t Length)
Reads multiple data with I2C communication channel from TouchScreen.
void | SENSOR_IO_WriteMultiple (uint8_t Addr, uint8_t Reg, uint8_t *Buffer, uint16_t Length)
Writes multiple data with I2C communication channel from MCU to TouchScreen.
HAL_StatusTypeDef | SENSOR_IO_IsDeviceReady (uint16_t DevAddress, uint32_t Trials)
Checks if target device is ready for communication.
void | SENSOR_IO_Delay (uint32_t Delay)
Delay function used in Sensor low level driver.
void | NFC_IO_Init (uint8_t GpoIrqEnable)
Initializes Sensors low level.
void | NFC_IO_DeInit (void)
DeInitializes Sensors low level.
uint16_t | NFC_IO_ReadMultiple (uint8_t Addr, uint8_t *pBuffer, uint16_t Length)
This functions reads a response of the M24SR device.
uint16_t | NFC_IO_WriteMultiple (uint8_t Addr, uint8_t *pBuffer, uint16_t Length)
This functions sends the command buffer.
uint16_t | NFC_IO_IsDeviceReady (uint8_t Addr, uint32_t Trials)
Checks if target device is ready for communication.
void | NFC_IO_ReadState (uint8_t *pPinState)
This function read the state of the M24SR GPO.
void | NFC_IO_RfDisable (uint8_t PinState)
This function sets the state of the M24SR RF disable pin.
void | NFC_IO_Delay (uint32_t Delay)
Delay function used in M24SR low level driver.
uint32_t | BSP_GetVersion (void)
This method returns the STM32L475E IOT01 BSP Driver revision.
void | BSP_LED_Init (Led_TypeDef Led)
Initializes LED GPIO.
void | BSP_LED_DeInit (Led_TypeDef Led)
DeInitializes LED GPIO.
void | BSP_LED_On (Led_TypeDef Led)
Turns the selected LED On.
void | BSP_LED_Off (Led_TypeDef Led)
Turns the selected LED Off.
void | BSP_LED_Toggle (Led_TypeDef Led)
Toggles the selected LED.
void | BSP_PB_Init (Button_TypeDef Button, ButtonMode_TypeDef ButtonMode)
Initializes push button GPIO and EXTI Line.
void | BSP_PB_DeInit (Button_TypeDef Button)
DeInitializes push button.
uint32_t | BSP_PB_GetState (Button_TypeDef Button)
Returns the selected button state.
void | BSP_COM_Init (COM_TypeDef COM, UART_HandleTypeDef *huart)
Configures COM port.
void | BSP_COM_DeInit (COM_TypeDef COM, UART_HandleTypeDef *huart)
DeInitializes COM port.

Variables

const uint32_t | GPIO_PIN [LEDn] = {LED2_PIN}
GPIO_TypeDef * | GPIO_PORT [LEDn] = {LED2_GPIO_PORT}
GPIO_TypeDef * | BUTTON_PORT [BUTTONn] = {USER_BUTTON_GPIO_PORT}
const uint16_t | BUTTON_PIN [BUTTONn] = {USER_BUTTON_PIN}
const uint16_t | BUTTON_IRQn [BUTTONn] = {USER_BUTTON_EXTI_IRQn}
USART_TypeDef * | COM_USART [COMn] = {DISCOVERY_COM1}
GPIO_TypeDef * | COM_TX_PORT [COMn] = {DISCOVERY_COM1_TX_GPIO_PORT}
GPIO_TypeDef * | COM_RX_PORT [COMn] = {DISCOVERY_COM1_RX_GPIO_PORT}
const uint16_t | COM_TX_PIN [COMn] = {DISCOVERY_COM1_TX_PIN}
const uint16_t | COM_RX_PIN [COMn] = {DISCOVERY_COM1_RX_PIN}
const uint16_t | COM_TX_AF [COMn] = {DISCOVERY_COM1_TX_AF}
const uint16_t | COM_RX_AF [COMn] = {DISCOVERY_COM1_RX_AF}
I2C_HandleTypeDef | hI2cHandler
UART_HandleTypeDef | hDiscoUart

Detailed Description

STM32L475E-IOT01 board support package.

Author:
MCD Application Team
Attention:

© Copyright (c) 2017 STMicroelectronics. All rights reserved.

This software component is licensed by ST under BSD 3-Clause license, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: opensource.org/licenses/BSD-3-Clause

Definition in file stm32l475e_iot01.c.


B-L475E-IOT01 BSP User Manual: stm32l475e_iot01.h File Reference

  • File List
  • Globals
  • Firmware
  • Drivers
  • BSP
  • B-L475E-IOT01
Defines | Enumerations | Functions
stm32l475e_iot01.h File Reference

STM32L475E IOT01 board support package. More...

#include "stm32l4xx_hal.h"

Go to the source code of this file.

Defines

#define | LEDn ((uint8_t)1)
Define for STM32L475E_IOT01 board.
#define | LED2_PIN GPIO_PIN_14
#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 | LEDx_GPIO_CLK_ENABLE(__INDEX__) do{if((__INDEX__) == 0) LED2_GPIO_CLK_ENABLE();}while(0)
#define | LEDx_GPIO_CLK_DISABLE(__INDEX__) do{if((__INDEX__) == 0) LED2_GPIO_CLK_DISABLE();}while(0)
#define | BUTTONn ((uint8_t)1)
#define | USER_BUTTON_PIN GPIO_PIN_13
Wakeup push-button.
#define | USER_BUTTON_GPIO_PORT GPIOC
#define | USER_BUTTON_GPIO_CLK_ENABLE() __HAL_RCC_GPIOC_CLK_ENABLE()
#define | USER_BUTTON_GPIO_CLK_DISABLE() __HAL_RCC_GPIOC_CLK_DISABLE()
#define | USER_BUTTON_EXTI_IRQn EXTI15_10_IRQn
#define | NFC_GPIO_GPO_PIN GPIO_PIN_4
NFC Gpio PINs.
#define | NFC_GPIO_GPO_PIN_PORT GPIOE
#define | NFC_GPIO_RFDISABLE_PIN GPIO_PIN_2
#define | NFC_GPIO_RFDISABLE_PIN_PORT GPIOE
#define | NFC_GPIO_CLK_ENABLE() __HAL_RCC_GPIOE_CLK_ENABLE();
#define | NFC_GPIO_CLK_DISABLE() __HAL_RCC_GPIOE_CLK_DISABLE();
#define | COMn ((uint8_t)1)
#define | DISCOVERY_COM1 USART1
Definition for COM port1, connected to USART1.
#define | DISCOVERY_COM1_CLK_ENABLE() __HAL_RCC_USART1_CLK_ENABLE()
#define | DISCOVERY_COM1_CLK_DISABLE() __HAL_RCC_USART1_CLK_DISABLE()
#define | DISCOVERY_COM1_TX_PIN GPIO_PIN_6
#define | DISCOVERY_COM1_TX_GPIO_PORT GPIOB
#define | DISCOVERY_COM1_TX_GPIO_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE()
#define | DISCOVERY_COM1_TX_GPIO_CLK_DISABLE() __HAL_RCC_GPIOB_CLK_DISABLE()
#define | DISCOVERY_COM1_TX_AF GPIO_AF7_USART1
#define | DISCOVERY_COM1_RX_PIN GPIO_PIN_7
#define | DISCOVERY_COM1_RX_GPIO_PORT GPIOB
#define | DISCOVERY_COM1_RX_GPIO_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE()
#define | DISCOVERY_COM1_RX_GPIO_CLK_DISABLE() __HAL_RCC_GPIOB_CLK_DISABLE()
#define | DISCOVERY_COM1_RX_AF GPIO_AF7_USART1
#define | DISCOVERY_COM1_IRQn USART1_IRQn
#define | DISCOVERY_COMx_CLK_ENABLE(__INDEX__) do { if((__INDEX__) == COM1) {DISCOVERY_COM1_CLK_ENABLE();}} while(0)
#define | DISCOVERY_COMx_CLK_DISABLE(__INDEX__) do { if((__INDEX__) == COM1) {DISCOVERY_COM1_CLK_DISABLE();}} while(0)
#define | DISCOVERY_COMx_TX_GPIO_CLK_ENABLE(__INDEX__) do { if((__INDEX__) == COM1) {DISCOVERY_COM1_TX_GPIO_CLK_ENABLE();}} while(0)
#define | DISCOVERY_COMx_TX_GPIO_CLK_DISABLE(__INDEX__) do { if((__INDEX__) == COM1) {DISCOVERY_COM1_TX_GPIO_CLK_DISABLE();}} while(0)
#define | DISCOVERY_COMx_RX_GPIO_CLK_ENABLE(__INDEX__) do { if((__INDEX__) == COM1) {DISCOVERY_COM1_RX_GPIO_CLK_ENABLE();}} while(0)
#define | DISCOVERY_COMx_RX_GPIO_CLK_DISABLE(__INDEX__) do { if((__INDEX__) == COM1) {DISCOVERY_COM1_RX_GPIO_CLK_DISABLE();}} while(0)
#define | DISCOVERY_I2Cx I2C2
#define | DISCOVERY_I2Cx_CLK_ENABLE() __HAL_RCC_I2C2_CLK_ENABLE()
#define | DISCOVERY_I2Cx_CLK_DISABLE() __HAL_RCC_I2C2_CLK_DISABLE()
#define | DISCOVERY_DMAx_CLK_ENABLE() __HAL_RCC_DMA1_CLK_ENABLE()
#define | DISCOVERY_I2Cx_SCL_SDA_GPIO_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE()
#define | DISCOVERY_I2Cx_SCL_SDA_GPIO_CLK_DISABLE() __HAL_RCC_GPIOB_CLK_DISABLE()
#define | DISCOVERY_I2Cx_FORCE_RESET() __HAL_RCC_I2C2_FORCE_RESET()
#define | DISCOVERY_I2Cx_RELEASE_RESET() __HAL_RCC_I2C2_RELEASE_RESET()
#define | DISCOVERY_I2Cx_SCL_PIN GPIO_PIN_10
#define | DISCOVERY_I2Cx_SDA_PIN GPIO_PIN_11
#define | DISCOVERY_I2Cx_SCL_SDA_GPIO_PORT GPIOB
#define | DISCOVERY_I2Cx_SCL_SDA_AF GPIO_AF4_I2C2
#define | DISCOVERY_I2Cx_EV_IRQn I2C2_EV_IRQn
#define | DISCOVERY_I2Cx_ER_IRQn I2C2_ER_IRQn
#define | LPS22HB_I2C_ADDRESS (uint8_t)0xBA
#define | HTS221_I2C_ADDRESS (uint8_t)0xBE
#define | TSENSOR_I2C_ADDRESS HTS221_I2C_ADDRESS
#define | M24SR_I2C_ADDR (uint8_t) 0xAC
#define | NFC_I2C_STATUS_SUCCESS (uint16_t) 0x0000
#define | NFC_I2C_ERROR_TIMEOUT (uint16_t) 0x0011
#define | NFC_I2C_TIMEOUT_STD (uint32_t) 8 /* I2C Time out (ms), used to call Transmit/Receive HAL functions */
#define | NFC_I2C_TIMEOUT_MAX (uint32_t) 200 /* I2C Time out (ms), this is the maximum time needed by M24SR to complete any command */
#define | NFC_I2C_TRIALS (uint32_t) 1 /* In case M24SR will reply ACK failed allow to perform retry before returning error (HAL option not used) */

Enumerations

enum | Led_TypeDef { LED2 = 0, LED_GREEN = LED2 }
enum | Button_TypeDef { BUTTON_USER = 0 }
enum | ButtonMode_TypeDef { BUTTON_MODE_GPIO = 0, BUTTON_MODE_EXTI = 1 }
enum | COM_TypeDef { COM1 = 0, COM2 = 0 }

Functions

uint32_t | BSP_GetVersion (void)
This method returns the STM32L475E IOT01 BSP Driver revision.
void | BSP_LED_Init (Led_TypeDef Led)
Initializes LED GPIO.
void | BSP_LED_DeInit (Led_TypeDef Led)
DeInitializes LED GPIO.
void | BSP_LED_On (Led_TypeDef Led)
Turns the selected LED On.
void | BSP_LED_Off (Led_TypeDef Led)
Turns the selected LED Off.
void | BSP_LED_Toggle (Led_TypeDef Led)
Toggles the selected LED.
void | BSP_PB_Init (Button_TypeDef Button, ButtonMode_TypeDef ButtonMode)
Initializes push button GPIO and EXTI Line.
void | BSP_PB_DeInit (Button_TypeDef Button)
DeInitializes push button.
uint32_t | BSP_PB_GetState (Button_TypeDef Button)
Returns the selected button state.
void | BSP_COM_Init (COM_TypeDef COM, UART_HandleTypeDef *husart)
Configures COM port.
void | BSP_COM_DeInit (COM_TypeDef COM, UART_HandleTypeDef *huart)
DeInitializes COM port.

Detailed Description

STM32L475E IOT01 board support package.

Author:
MCD Application Team
Attention:

© Copyright (c) 2017 STMicroelectronics. All rights reserved.

This software component is licensed by ST under BSD 3-Clause license, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: opensource.org/licenses/BSD-3-Clause

Definition in file stm32l475e_iot01.h.


B-L475E-IOT01 BSP User Manual: stm32l475e_iot01_accelero.c File Reference

  • File List
  • Globals
  • Firmware
  • Drivers
  • BSP
  • B-L475E-IOT01
Functions | Variables
stm32l475e_iot01_accelero.c File Reference

This file provides a set of functions needed to manage the accelerometer sensor. More...

#include "stm32l475e_iot01_accelero.h"

Go to the source code of this file.

Functions

ACCELERO_StatusTypeDef | BSP_ACCELERO_Init (void)
Initialize the ACCELERO.
void | BSP_ACCELERO_DeInit (void)
DeInitialize the ACCELERO.
void | BSP_ACCELERO_LowPower (uint16_t status)
Set/Unset the ACCELERO in low power mode.
void | BSP_ACCELERO_AccGetXYZ (int16_t *pDataXYZ)
Get XYZ acceleration values.

Variables

static ACCELERO_DrvTypeDef * | AccelerometerDrv

Detailed Description

This file provides a set of functions needed to manage the accelerometer sensor.

Author:
MCD Application Team
Attention:

© Copyright (c) 2017 STMicroelectronics. All rights reserved.

This software component is licensed by ST under BSD 3-Clause license, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: opensource.org/licenses/BSD-3-Clause

Definition in file stm32l475e_iot01_accelero.c.


B-L475E-IOT01 BSP User Manual: stm32l475e_iot01_accelero.h File Reference

  • File List
  • Globals
  • Firmware
  • Drivers
  • BSP
  • B-L475E-IOT01
Enumerations | Functions
stm32l475e_iot01_accelero.h File Reference

This file provides a set of functions needed to manage the accelerometer sensor. More...

#include "stm32l475e_iot01.h"
#include "../Components/lsm6dsl/lsm6dsl.h"

Go to the source code of this file.

Enumerations

enum | ACCELERO_StatusTypeDef { ACCELERO_OK = 0, ACCELERO_ERROR = 1, ACCELERO_TIMEOUT = 2 }

Functions

ACCELERO_StatusTypeDef | BSP_ACCELERO_Init (void)
Initialize the ACCELERO.
void | BSP_ACCELERO_DeInit (void)
DeInitialize the ACCELERO.
void | BSP_ACCELERO_LowPower (uint16_t status)
Set/Unset the ACCELERO in low power mode.
void | BSP_ACCELERO_AccGetXYZ (int16_t *pDataXYZ)
Get XYZ acceleration values.

Detailed Description

This file provides a set of functions needed to manage the accelerometer sensor.

Author:
MCD Application Team
Attention:

© Copyright (c) 2017 STMicroelectronics. All rights reserved.

This software component is licensed by ST under BSD 3-Clause license, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: opensource.org/licenses/BSD-3-Clause

Definition in file stm32l475e_iot01_accelero.h.


B-L475E-IOT01 BSP User Manual: stm32l475e_iot01_gyro.c File Reference

  • File List
  • Globals
  • Firmware
  • Drivers
  • BSP
  • B-L475E-IOT01
Functions | Variables
stm32l475e_iot01_gyro.c File Reference

This file provides a set of functions needed to manage the gyroscope sensor. More...

#include "stm32l475e_iot01_gyro.h"

Go to the source code of this file.

Functions

uint8_t | BSP_GYRO_Init (void)
Initialize Gyroscope.
void | BSP_GYRO_DeInit (void)
DeInitialize Gyroscope.
void | BSP_GYRO_LowPower (uint16_t status)
Set/Unset Gyroscope in low power mode.
void | BSP_GYRO_GetXYZ (float *pfData)
Get XYZ angular acceleration from the Gyroscope.

Variables

static GYRO_DrvTypeDef * | GyroscopeDrv

Detailed Description

This file provides a set of functions needed to manage the gyroscope sensor.

Author:
MCD Application Team
Attention:

© Copyright (c) 2017 STMicroelectronics. All rights reserved.

This software component is licensed by ST under BSD 3-Clause license, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: opensource.org/licenses/BSD-3-Clause

Definition in file stm32l475e_iot01_gyro.c.


B-L475E-IOT01 BSP User Manual: stm32l475e_iot01_gyro.h File Reference

  • File List
  • Globals
  • Firmware
  • Drivers
  • BSP
  • B-L475E-IOT01
Enumerations | Functions
stm32l475e_iot01_gyro.h File Reference

This file contains definitions for the stm32l475e_iot01_gyro.c. More...

#include "stm32l475e_iot01.h"
#include "../Components/lsm6dsl/lsm6dsl.h"

Go to the source code of this file.

Enumerations

enum | GYRO_StatusTypeDef { GYRO_OK = 0, GYRO_ERROR = 1, GYRO_TIMEOUT = 2 }

Functions

uint8_t | BSP_GYRO_Init (void)
Initialize Gyroscope.
void | BSP_GYRO_DeInit (void)
DeInitialize Gyroscope.
void | BSP_GYRO_LowPower (uint16_t status)
Set/Unset Gyroscope in low power mode.
void | BSP_GYRO_GetXYZ (float *pfData)
Get XYZ angular acceleration from the Gyroscope.

Detailed Description

This file contains definitions for the stm32l475e_iot01_gyro.c.

Author:
MCD Application Team
Attention:

© Copyright (c) 2017 STMicroelectronics. All rights reserved.

This software component is licensed by ST under BSD 3-Clause license, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: opensource.org/licenses/BSD-3-Clause

Definition in file stm32l475e_iot01_gyro.h.


B-L475E-IOT01 BSP User Manual: stm32l475e_iot01_hsensor.c File Reference

  • File List
  • Globals
  • Firmware
  • Drivers
  • BSP
  • B-L475E-IOT01
Functions | Variables
stm32l475e_iot01_hsensor.c File Reference

This file provides a set of functions needed to manage the humidity sensor. More...

#include "stm32l475e_iot01_hsensor.h"

Go to the source code of this file.

Functions

uint32_t | BSP_HSENSOR_Init (void)
Initializes peripherals used by the I2C Humidity Sensor driver.
uint8_t | BSP_HSENSOR_ReadID (void)
Read ID of HTS221.
float | BSP_HSENSOR_ReadHumidity (void)
Read Humidity register of HTS221.

Variables

static HSENSOR_DrvTypeDef * | Hsensor_drv

Detailed Description

This file provides a set of functions needed to manage the humidity sensor.

Author:
MCD Application Team
Attention:

© Copyright (c) 2017 STMicroelectronics. All rights reserved.

This software component is licensed by ST under BSD 3-Clause license, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: opensource.org/licenses/BSD-3-Clause

Definition in file stm32l475e_iot01_hsensor.c.


B-L475E-IOT01 BSP User Manual: stm32l475e_iot01_hsensor.h File Reference

  • File List
  • Globals
  • Firmware
  • Drivers
  • BSP
  • B-L475E-IOT01
Enumerations | Functions
stm32l475e_iot01_hsensor.h File Reference

This file provides a set of functions needed to manage the humidity sensor. More...

#include "stm32l475e_iot01.h"
#include "../Components/hts221/hts221.h"

Go to the source code of this file.

Enumerations

enum | HSENSOR_Status_TypDef { HSENSOR_OK = 0, HSENSOR_ERROR }
HSENSOR Status. More...

Functions

uint32_t | BSP_HSENSOR_Init (void)
Initializes peripherals used by the I2C Humidity Sensor driver.
uint8_t | BSP_HSENSOR_ReadID (void)
Read ID of HTS221.
float | BSP_HSENSOR_ReadHumidity (void)
Read Humidity register of HTS221.

Detailed Description

This file provides a set of functions needed to manage the humidity sensor.

Author:
MCD Application Team
Attention:

© Copyright (c) 2017 STMicroelectronics. All rights reserved.

This software component is licensed by ST under BSD 3-Clause license, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: opensource.org/licenses/BSD-3-Clause

Definition in file stm32l475e_iot01_hsensor.h.


B-L475E-IOT01 BSP User Manual: stm32l475e_iot01_magneto.c File Reference

  • File List
  • Globals
  • Firmware
  • Drivers
  • BSP
  • B-L475E-IOT01
Functions | Variables
stm32l475e_iot01_magneto.c File Reference

This file provides a set of functions needed to manage the magnetometer sensor. More...

#include "stm32l475e_iot01_magneto.h"

Go to the source code of this file.

Functions

MAGNETO_StatusTypeDef | BSP_MAGNETO_Init (void)
Initialize a magnetometer sensor.
void | BSP_MAGNETO_DeInit (void)
DeInitialize the MAGNETO.
void | BSP_MAGNETO_LowPower (uint16_t status)
Set/Unset the MAGNETO in low power mode.
void | BSP_MAGNETO_GetXYZ (int16_t *pDataXYZ)
Get XYZ magnetometer values.

Variables

static MAGNETO_DrvTypeDef * | MagnetoDrv

Detailed Description

This file provides a set of functions needed to manage the magnetometer sensor.

Author:
MCD Application Team
Attention:

© Copyright (c) 2017 STMicroelectronics. All rights reserved.

This software component is licensed by ST under BSD 3-Clause license, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: opensource.org/licenses/BSD-3-Clause

Definition in file stm32l475e_iot01_magneto.c.


B-L475E-IOT01 BSP User Manual: stm32l475e_iot01_magneto.h File Reference

  • File List
  • Globals
  • Firmware
  • Drivers
  • BSP
  • B-L475E-IOT01
Enumerations | Functions
stm32l475e_iot01_magneto.h File Reference

This file provides a set of functions needed to manage the magnetometer sensor. More...

#include "stm32l475e_iot01.h"
#include "../Components/lis3mdl/lis3mdl.h"

Go to the source code of this file.

Enumerations

enum | MAGNETO_StatusTypeDef { MAGNETO_OK = 0, MAGNETO_ERROR = 1, MAGNETO_TIMEOUT = 2 }

Functions

MAGNETO_StatusTypeDef | BSP_MAGNETO_Init (void)
Initialize a magnetometer sensor.
void | BSP_MAGNETO_DeInit (void)
DeInitialize the MAGNETO.
void | BSP_MAGNETO_LowPower (uint16_t status)
Set/Unset the MAGNETO in low power mode.
void | BSP_MAGNETO_GetXYZ (int16_t *pDataXYZ)
Get XYZ magnetometer values.

Detailed Description

This file provides a set of functions needed to manage the magnetometer sensor.

Author:
MCD Application Team
Attention:

© Copyright (c) 2017 STMicroelectronics. All rights reserved.

This software component is licensed by ST under BSD 3-Clause license, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: opensource.org/licenses/BSD-3-Clause

Definition in file stm32l475e_iot01_magneto.h.


B-L475E-IOT01 BSP User Manual: stm32l475e_iot01_psensor.c File Reference

  • File List
  • Globals
  • Firmware
  • Drivers
  • BSP
  • B-L475E-IOT01
Functions | Variables
stm32l475e_iot01_psensor.c File Reference

This file provides a set of functions needed to manage the pressure sensor. More...

#include "stm32l475e_iot01_psensor.h"

Go to the source code of this file.

Functions

uint32_t | BSP_PSENSOR_Init (void)
Initializes peripherals used by the I2C Pressure Sensor driver.
uint8_t | BSP_PSENSOR_ReadID (void)
Read ID of LPS22HB.
float | BSP_PSENSOR_ReadPressure (void)
Read Pressure register of LPS22HB.

Variables

static PSENSOR_DrvTypeDef * | Psensor_drv

Detailed Description

This file provides a set of functions needed to manage the pressure sensor.

Author:
MCD Application Team
Attention:

© Copyright (c) 2017 STMicroelectronics. All rights reserved.

This software component is licensed by ST under BSD 3-Clause license, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: opensource.org/licenses/BSD-3-Clause

Definition in file stm32l475e_iot01_psensor.c.


B-L475E-IOT01 BSP User Manual: stm32l475e_iot01_psensor.h File Reference

  • File List
  • Globals
  • Firmware
  • Drivers
  • BSP
  • B-L475E-IOT01
Enumerations | Functions
stm32l475e_iot01_psensor.h File Reference

This file provides a set of functions needed to manage the pressure sensor. More...

#include "stm32l475e_iot01.h"
#include "../Components/lps22hb/lps22hb.h"

Go to the source code of this file.

Enumerations

enum | PSENSOR_Status_TypDef { PSENSOR_OK = 0, PSENSOR_ERROR }
PSENSOR Status. More...

Functions

uint32_t | BSP_PSENSOR_Init (void)
Initializes peripherals used by the I2C Pressure Sensor driver.
uint8_t | BSP_PSENSOR_ReadID (void)
Read ID of LPS22HB.
float | BSP_PSENSOR_ReadPressure (void)
Read Pressure register of LPS22HB.

Detailed Description

This file provides a set of functions needed to manage the pressure sensor.

Author:
MCD Application Team
Attention:

© Copyright (c) 2017 STMicroelectronics. All rights reserved.

This software component is licensed by ST under BSD 3-Clause license, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: opensource.org/licenses/BSD-3-Clause

Definition in file stm32l475e_iot01_psensor.h.


B-L475E-IOT01 BSP User Manual: stm32l475e_iot01_qspi.c File Reference

  • File List
  • Globals
  • Firmware
  • Drivers
  • BSP
  • B-L475E-IOT01
Defines | Functions | Variables
stm32l475e_iot01_qspi.c File Reference

This file includes a standard driver for the MX25R6435F QSPI memory mounted on STM32L475E IOT01 board. More...

#include "stm32l475e_iot01_qspi.h"

Go to the source code of this file.

Defines

#define | QSPI_QUAD_DISABLE 0x0
#define | QSPI_QUAD_ENABLE 0x1
#define | QSPI_HIGH_PERF_DISABLE 0x0
#define | QSPI_HIGH_PERF_ENABLE 0x1

Functions

static uint8_t | QSPI_ResetMemory (QSPI_HandleTypeDef *hqspi)
This function reset the QSPI memory.
static uint8_t | QSPI_WriteEnable (QSPI_HandleTypeDef *hqspi)
This function send a Write Enable and wait it is effective.
static uint8_t | QSPI_AutoPollingMemReady (QSPI_HandleTypeDef *hqspi, uint32_t Timeout)
This function read the SR of the memory and wait the EOP.
static uint8_t | QSPI_QuadMode (QSPI_HandleTypeDef *hqspi, uint8_t Operation)
This function enables/disables the Quad mode of the memory.
static uint8_t | QSPI_HighPerfMode (QSPI_HandleTypeDef *hqspi, uint8_t Operation)
This function enables/disables the high performance mode of the memory.
uint8_t | BSP_QSPI_Init (void)
Initializes the QSPI interface.
uint8_t | BSP_QSPI_DeInit (void)
De-Initializes the QSPI interface.
uint8_t | BSP_QSPI_Read (uint8_t *pData, uint32_t ReadAddr, uint32_t Size)
Reads an amount of data from the QSPI memory.
uint8_t | BSP_QSPI_Write (uint8_t *pData, uint32_t WriteAddr, uint32_t Size)
Writes an amount of data to the QSPI memory.
uint8_t | BSP_QSPI_Erase_Block (uint32_t BlockAddress)
Erases the specified block of the QSPI memory.
uint8_t | BSP_QSPI_Erase_Sector (uint32_t Sector)
Erases the specified sector of the QSPI memory.
uint8_t | BSP_QSPI_Erase_Chip (void)
Erases the entire QSPI memory.
uint8_t | BSP_QSPI_GetStatus (void)
Reads current status of the QSPI memory.
uint8_t | BSP_QSPI_GetInfo (QSPI_Info *pInfo)
Return the configuration of the QSPI memory.
uint8_t | BSP_QSPI_EnableMemoryMappedMode (void)
Configure the QSPI in memory-mapped mode.
uint8_t | BSP_QSPI_SuspendErase (void)
This function suspends an ongoing erase command.
uint8_t | BSP_QSPI_ResumeErase (void)
This function resumes a paused erase command.
uint8_t | BSP_QSPI_EnterDeepPowerDown (void)
This function enter the QSPI memory in deep power down mode.
uint8_t | BSP_QSPI_LeaveDeepPowerDown (void)
This function leave the QSPI memory from deep power down mode.
__weak void | BSP_QSPI_MspInit (void)
Initializes the QSPI MSP.
__weak void | BSP_QSPI_MspDeInit (void)
De-Initializes the QSPI MSP.

Variables

QSPI_HandleTypeDef | QSPIHandle

Detailed Description

This file includes a standard driver for the MX25R6435F QSPI memory mounted on STM32L475E IOT01 board.

Author:
MCD Application Team
  ==============================================================================
                     ##### How to use this driver #####
  ==============================================================================
  [..]
   (#) This driver is used to drive the MX25R6435F QSPI external
       memory mounted on STM32L475E IOT01 board.

   (#) This driver need a specific component driver (MX25R6435F) to be included with.

   (#) Initialization steps:
       (++) Initialize the QPSI external memory using the BSP_QSPI_Init() function. This
            function includes the MSP layer hardware resources initialization and the
            QSPI interface with the external memory. The BSP_QSPI_DeInit() can be used
            to deactivate the QSPI interface.

   (#) QSPI memory operations
       (++) QSPI memory can be accessed with read/write operations once it is
            initialized.
            Read/write operation can be performed with AHB access using the functions
            BSP_QSPI_Read()/BSP_QSPI_Write().
       (++) The function to the QSPI memory in memory-mapped mode is possible after
            the call of the function BSP_QSPI_EnableMemoryMappedMode().
       (++) The function BSP_QSPI_GetInfo() returns the configuration of the QSPI memory.
            (see the QSPI memory data sheet)
       (++) Perform erase block operation using the function BSP_QSPI_Erase_Block() and by
            specifying the block address. You can perform an erase operation of the whole
            chip by calling the function BSP_QSPI_Erase_Chip().
       (++) The function BSP_QSPI_GetStatus() returns the current status of the QSPI memory.
            (see the QSPI memory data sheet)
       (++) Perform erase sector operation using the function BSP_QSPI_Erase_Sector()
            which is not blocking. So the function BSP_QSPI_GetStatus() should be used
            to check if the memory is busy, and the functions BSP_QSPI_SuspendErase()/
            BSP_QSPI_ResumeErase() can be used to perform other operations during the
            sector erase.
       (++) Deep power down of the QSPI memory is managed with the call of the functions
            BSP_QSPI_EnterDeepPowerDown()/BSP_QSPI_LeaveDeepPowerDown()
Attention:

© Copyright (c) 2017 STMicroelectronics. All rights reserved.

This software component is licensed by ST under BSD 3-Clause license, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: opensource.org/licenses/BSD-3-Clause

Definition in file stm32l475e_iot01_qspi.c.


B-L475E-IOT01 BSP User Manual: stm32l475e_iot01_qspi.h File Reference

  • File List
  • Globals
  • Firmware
  • Drivers
  • BSP
  • B-L475E-IOT01
Data Structures | Defines | Functions
stm32l475e_iot01_qspi.h File Reference

This file contains the common defines and functions prototypes for the stm32l475e_iot01_qspi.c driver. More...

#include "stm32l4xx_hal.h"
#include "../Components/mx25r6435f/mx25r6435f.h"

Go to the source code of this file.

Data Structures

struct | QSPI_Info

Defines

#define | QSPI_OK ((uint8_t)0x00)
#define | QSPI_ERROR ((uint8_t)0x01)
#define | QSPI_BUSY ((uint8_t)0x02)
#define | QSPI_NOT_SUPPORTED ((uint8_t)0x04)
#define | QSPI_SUSPENDED ((uint8_t)0x08)

Functions

uint8_t | BSP_QSPI_Init (void)
Initializes the QSPI interface.
uint8_t | BSP_QSPI_DeInit (void)
De-Initializes the QSPI interface.
uint8_t | BSP_QSPI_Read (uint8_t *pData, uint32_t ReadAddr, uint32_t Size)
Reads an amount of data from the QSPI memory.
uint8_t | BSP_QSPI_Write (uint8_t *pData, uint32_t WriteAddr, uint32_t Size)
Writes an amount of data to the QSPI memory.
uint8_t | BSP_QSPI_Erase_Block (uint32_t BlockAddress)
Erases the specified block of the QSPI memory.
uint8_t | BSP_QSPI_Erase_Sector (uint32_t Sector)
Erases the specified sector of the QSPI memory.
uint8_t | BSP_QSPI_Erase_Chip (void)
Erases the entire QSPI memory.
uint8_t | BSP_QSPI_GetStatus (void)
Reads current status of the QSPI memory.
uint8_t | BSP_QSPI_GetInfo (QSPI_Info *pInfo)
Return the configuration of the QSPI memory.
uint8_t | BSP_QSPI_EnableMemoryMappedMode (void)
Configure the QSPI in memory-mapped mode.
uint8_t | BSP_QSPI_SuspendErase (void)
This function suspends an ongoing erase command.
uint8_t | BSP_QSPI_ResumeErase (void)
This function resumes a paused erase command.
uint8_t | BSP_QSPI_EnterDeepPowerDown (void)
This function enter the QSPI memory in deep power down mode.
uint8_t | BSP_QSPI_LeaveDeepPowerDown (void)
This function leave the QSPI memory from deep power down mode.
__weak void | BSP_QSPI_MspInit (void)
Initializes the QSPI MSP.
__weak void | BSP_QSPI_MspDeInit (void)
De-Initializes the QSPI MSP.

Detailed Description

This file contains the common defines and functions prototypes for the stm32l475e_iot01_qspi.c driver.

Author:
MCD Application Team
Attention:

© Copyright (c) 2017 STMicroelectronics. All rights reserved.

This software component is licensed by ST under BSD 3-Clause license, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: opensource.org/licenses/BSD-3-Clause

Definition in file stm32l475e_iot01_qspi.h.


B-L475E-IOT01 BSP User Manual: stm32l475e_iot01_tsensor.c File Reference

  • File List
  • Globals
  • Firmware
  • Drivers
  • BSP
  • B-L475E-IOT01
Functions | Variables
stm32l475e_iot01_tsensor.c File Reference

This file provides a set of functions needed to manage the temperature sensor. More...

#include "stm32l475e_iot01_tsensor.h"

Go to the source code of this file.

Functions

uint32_t | BSP_TSENSOR_Init (void)
Initializes peripherals used by the I2C Temperature Sensor driver.
float | BSP_TSENSOR_ReadTemp (void)
Read Temperature register of TS751.

Variables

static TSENSOR_DrvTypeDef * | tsensor_drv

Detailed Description

This file provides a set of functions needed to manage the temperature sensor.

Author:
MCD Application Team
Attention:

© Copyright (c) 2017 STMicroelectronics. All rights reserved.

This software component is licensed by ST under BSD 3-Clause license, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: opensource.org/licenses/BSD-3-Clause

Definition in file stm32l475e_iot01_tsensor.c.


B-L475E-IOT01 BSP User Manual: stm32l475e_iot01_tsensor.h File Reference

  • File List
  • Globals
  • Firmware
  • Drivers
  • BSP
  • B-L475E-IOT01
Enumerations | Functions
stm32l475e_iot01_tsensor.h File Reference

This file provides a set of functions needed to manage the temperature sensor. More...

#include "stm32l475e_iot01.h"
#include "../Components/hts221/hts221.h"

Go to the source code of this file.

Enumerations

enum | TSENSOR_Status_TypDef { TSENSOR_OK = 0, TSENSOR_ERROR }
TSENSOR Status. More...

Functions

uint32_t | BSP_TSENSOR_Init (void)
Initializes peripherals used by the I2C Temperature Sensor driver.
float | BSP_TSENSOR_ReadTemp (void)
Read Temperature register of TS751.

Detailed Description

This file provides a set of functions needed to manage the temperature sensor.

Author:
MCD Application Team
Attention:

© Copyright (c) 2017 STMicroelectronics. All rights reserved.

This software component is licensed by ST under BSD 3-Clause license, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: opensource.org/licenses/BSD-3-Clause

Definition in file stm32l475e_iot01_tsensor.h.


B-L475E-IOT01 BSP User Manual: Data Structures

  • Data Structure Index
  • Data Fields
Data Structures
Here are the data structures with brief descriptions:
QSPI_Info


B-L475E-IOT01 BSP User Manual: Data Structure Index

  • Data Structure Index
  • Data Fields
Data Structure Index
Q
Q
QSPI_Info
Q


B-L475E-IOT01 BSP User Manual: C:/git/l4_release_v1.15.0/Firmware/Drivers/ Directory Reference

  • Firmware
  • Drivers
Drivers Directory Reference

Directories

directory BSP


B-L475E-IOT01 BSP User Manual: C:/git/l4_release_v1.15.0/Firmware/ Directory Reference

  • Firmware
Firmware Directory Reference

Directories

directory Drivers


B-L475E-IOT01 BSP User Manual: C:/git/l4_release_v1.15.0/Firmware/Drivers/BSP/ Directory Reference

  • Firmware
  • Drivers
  • BSP
BSP Directory Reference

Directories

directory B-L475E-IOT01


B-L475E-IOT01 BSP User Manual: C:/git/l4_release_v1.15.0/Firmware/Drivers/BSP/B-L475E-IOT01/ Directory Reference

  • Firmware
  • Drivers
  • BSP
  • B-L475E-IOT01
B-L475E-IOT01 Directory Reference

Files

file | stm32l475e_iot01.c [code]

STM32L475E-IOT01 board support package.

file | stm32l475e_iot01.h [code]

STM32L475E IOT01 board support package.

file | stm32l475e_iot01_accelero.c [code]

This file provides a set of functions needed to manage the accelerometer sensor.

file | stm32l475e_iot01_accelero.h [code]

This file provides a set of functions needed to manage the accelerometer sensor.

file | stm32l475e_iot01_gyro.c [code]

This file provides a set of functions needed to manage the gyroscope sensor.

file | stm32l475e_iot01_gyro.h [code]

This file contains definitions for the stm32l475e_iot01_gyro.c.

file | stm32l475e_iot01_hsensor.c [code]

This file provides a set of functions needed to manage the humidity sensor.

file | stm32l475e_iot01_hsensor.h [code]

This file provides a set of functions needed to manage the humidity sensor.

file | stm32l475e_iot01_magneto.c [code]

This file provides a set of functions needed to manage the magnetometer sensor.

file | stm32l475e_iot01_magneto.h [code]

This file provides a set of functions needed to manage the magnetometer sensor.

file | stm32l475e_iot01_psensor.c [code]

This file provides a set of functions needed to manage the pressure sensor.

file | stm32l475e_iot01_psensor.h [code]

This file provides a set of functions needed to manage the pressure sensor.

file | stm32l475e_iot01_qspi.c [code]

This file includes a standard driver for the MX25R6435F QSPI memory mounted on STM32L475E IOT01 board.

file | stm32l475e_iot01_qspi.h [code]

This file contains the common defines and functions prototypes for the stm32l475e_iot01_qspi.c driver.

file | stm32l475e_iot01_tsensor.c [code]

This file provides a set of functions needed to manage the temperature sensor.

file | stm32l475e_iot01_tsensor.h [code]

This file provides a set of functions needed to manage the temperature sensor.


B-L475E-IOT01 BSP User Manual: Directories

Directories
This directory hierarchy is sorted roughly, but not completely, alphabetically:
  • Firmware
    • Drivers
      • BSP
        • B-L475E-IOT01


B-L475E-IOT01 BSP User Manual: File List

  • File List
  • Globals
File List
Here is a list of all files with brief descriptions:
stm32l475e_iot01.c [code] | STM32L475E-IOT01 board support package
stm32l475e_iot01.h [code] | STM32L475E IOT01 board support package
stm32l475e_iot01_accelero.c [code] | This file provides a set of functions needed to manage the accelerometer sensor
stm32l475e_iot01_accelero.h [code] | This file provides a set of functions needed to manage the accelerometer sensor
stm32l475e_iot01_gyro.c [code] | This file provides a set of functions needed to manage the gyroscope sensor
stm32l475e_iot01_gyro.h [code] | This file contains definitions for the stm32l475e_iot01_gyro.c
stm32l475e_iot01_hsensor.c [code] | This file provides a set of functions needed to manage the humidity sensor
stm32l475e_iot01_hsensor.h [code] | This file provides a set of functions needed to manage the humidity sensor
stm32l475e_iot01_magneto.c [code] | This file provides a set of functions needed to manage the magnetometer sensor
stm32l475e_iot01_magneto.h [code] | This file provides a set of functions needed to manage the magnetometer sensor
stm32l475e_iot01_psensor.c [code] | This file provides a set of functions needed to manage the pressure sensor
stm32l475e_iot01_psensor.h [code] | This file provides a set of functions needed to manage the pressure sensor
stm32l475e_iot01_qspi.c [code] | This file includes a standard driver for the MX25R6435F QSPI memory mounted on STM32L475E IOT01 board
stm32l475e_iot01_qspi.h [code] | This file contains the common defines and functions prototypes for the stm32l475e_iot01_qspi.c driver
stm32l475e_iot01_tsensor.c [code] | This file provides a set of functions needed to manage the temperature sensor
stm32l475e_iot01_tsensor.h [code] | This file provides a set of functions needed to manage the temperature sensor


B-L475E-IOT01 BSP User Manual: BSP

Modules
BSP

Modules

STM32L475E_IOT01


B-L475E-IOT01 BSP User Manual: STM32L475E_IOT01

Modules
STM32L475E_IOT01
BSP

Modules

LOW LEVEL
ACCELERO
GYROSCOPE
HUMIDITY
MAGNETO
PRESSURE
QSPI
TEMPERATURE


B-L475E-IOT01 BSP User Manual: ACCELERO

Modules
ACCELERO
STM32L475E_IOT01

Modules

ACCELERO Private Variables
ACCELERO Private Functions
ACCELERO Exported Types
ACCELERO Exported Functions


B-L475E-IOT01 BSP User Manual: GYROSCOPE

Modules
GYROSCOPE
STM32L475E_IOT01

Modules

GYROSCOPE Private Variables
GYROSCOPE Private Functions
GYROSCOPE Exported Constants
GYROSCOPE Exported Functions


B-L475E-IOT01 BSP User Manual: HUMIDITY

Modules
HUMIDITY
STM32L475E_IOT01

Modules

HUMIDITY Private Variables
HUMIDITY Private Functions
HUMIDITY Exported Types
HUMIDITY Exported Functions


B-L475E-IOT01 BSP User Manual: MAGNETO

Modules
MAGNETO
STM32L475E_IOT01

Modules

MAGNETO Private Variables
MAGNETO Private Functions
MAGNETO Exported Types
MAGNETO Exported Functions


B-L475E-IOT01 BSP User Manual: PRESSURE

Modules
PRESSURE
STM32L475E_IOT01

Modules

PRESSURE Private Variables
PRESSURE Private Functions
PRESSURE Exported Types
PRESSURE Exported Functions


B-L475E-IOT01 BSP User Manual: QSPI

Modules
QSPI
STM32L475E_IOT01

Modules

QSPI Private Constants
QSPI Private Variables
QSPI Private Functions
QSPI Exported Constants
QSPI Exported Types
QSPI Exported Functions


B-L475E-IOT01 BSP User Manual: QSPI Exported Types

Data Structures
QSPI Exported Types
QSPI

Data Structures

struct QSPI_Info


B-L475E-IOT01 BSP User Manual: TEMPERATURE

Modules
TEMPERATURE
STM32L475E_IOT01

Modules

TEMPERATURE Private Variables
TEMPERATURE Private Functions
TEMPERATURE Exported Types
TEMPERATURE Exported Constants


B-L475E-IOT01 BSP User Manual: Modules

Modules
Here is a list of all modules:
  • BSP
    • STM32L475E_IOT01
      • LOW LEVEL
        • LOW LEVEL Private Def
        • LOW LEVEL Variables
        • LOW LEVEL Private Function Prototypes
        • LOW LEVEL Private Functions
        • LOW LEVEL Exported Types
        • LOW LEVEL Exported Constants
        • LOW LEVEL Exported Functions
      • ACCELERO
        • ACCELERO Private Variables
        • ACCELERO Private Functions
        • ACCELERO Exported Types
        • ACCELERO Exported Functions
      • GYROSCOPE
        • GYROSCOPE Private Variables
        • GYROSCOPE Private Functions
        • GYROSCOPE Exported Constants
        • GYROSCOPE Exported Functions
      • HUMIDITY
        • HUMIDITY Private Variables
        • HUMIDITY Private Functions
        • HUMIDITY Exported Types
        • HUMIDITY Exported Functions
      • MAGNETO
        • MAGNETO Private Variables
        • MAGNETO Private Functions
        • MAGNETO Exported Types
        • MAGNETO Exported Functions
      • PRESSURE
        • PRESSURE Private Variables
        • PRESSURE Private Functions
        • PRESSURE Exported Types
        • PRESSURE Exported Functions
      • QSPI
        • QSPI Private Constants
        • QSPI Private Variables
        • QSPI Private Functions
        • QSPI Exported Constants
        • QSPI Exported Types
        • QSPI Exported Functions
      • TEMPERATURE
        • TEMPERATURE Private Variables
        • TEMPERATURE Private Functions
        • TEMPERATURE Exported Types
        • TEMPERATURE Exported Constants


B-L475E-IOT01 BSP User Manual: stm32l475e_iot01.c Source File

  • File List
  • Globals
  • Firmware
  • Drivers
  • BSP
  • B-L475E-IOT01
stm32l475e_iot01.c
Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   * @file    stm32l475e_iot01.c
00004   * @author  MCD Application Team
00005   * @brief   STM32L475E-IOT01 board support package
00006   ******************************************************************************
00007   * @attention
00008   *
00009   * <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
00010   * All rights reserved.</center></h2>
00011   *
00012   * This software component is licensed by ST under BSD 3-Clause license,
00013   * the "License"; You may not use this file except in compliance with the
00014   * License. You may obtain a copy of the License at:
00015   *                        opensource.org/licenses/BSD-3-Clause
00016   *
00017   ******************************************************************************
00018   */
00019
00020 /* Includes ------------------------------------------------------------------*/
00021 #include "stm32l475e_iot01.h"
00022
00023 /** @defgroup BSP BSP
00024   * @{
00025   */
00026
00027 /** @defgroup STM32L475E_IOT01 STM32L475E_IOT01
00028   * @{
00029   */
00030
00031 /** @defgroup STM32L475E_IOT01_LOW_LEVEL LOW LEVEL
00032   * @{
00033   */
00034
00035 /** @defgroup STM32L475E_IOT01_LOW_LEVEL_Private_Defines LOW LEVEL Private Def
00036   * @{
00037   */
00038 /**
00039  * @brief STM32L475E IOT01 BSP Driver version number
00040    */
00041 #define __STM32L475E_IOT01_BSP_VERSION_MAIN   (0x01) /*!< [31:24] main version */
00042 #define __STM32L475E_IOT01_BSP_VERSION_SUB1   (0x01) /*!< [23:16] sub1 version */
00043 #define __STM32L475E_IOT01_BSP_VERSION_SUB2   (0x06) /*!< [15:8]  sub2 version */
00044 #define __STM32L475E_IOT01_BSP_VERSION_RC     (0x00) /*!< [7:0]  release candidate */
00045 #define __STM32L475E_IOT01_BSP_VERSION        ((__STM32L475E_IOT01_BSP_VERSION_MAIN << 24)\
00046                                                  |(__STM32L475E_IOT01_BSP_VERSION_SUB1 << 16)\
00047                                                  |(__STM32L475E_IOT01_BSP_VERSION_SUB2 << 8 )\
00048                                                  |(__STM32L475E_IOT01_BSP_VERSION_RC))
00049 /**
00050   * @}
00051   */
00052
00053 /** @defgroup STM32L475E_IOT01_LOW_LEVEL_Private_Variables LOW LEVEL Variables
00054   * @{
00055   */
00056
00057 const uint32_t GPIO_PIN[LEDn] = {LED2_PIN};
00058
00059
00060 GPIO_TypeDef* GPIO_PORT[LEDn] = {LED2_GPIO_PORT};
00061
00062
00063 GPIO_TypeDef* BUTTON_PORT[BUTTONn] = {USER_BUTTON_GPIO_PORT};
00064
00065 const uint16_t BUTTON_PIN[BUTTONn] = {USER_BUTTON_PIN};
00066
00067 const uint16_t BUTTON_IRQn[BUTTONn] = {USER_BUTTON_EXTI_IRQn};
00068
00069 USART_TypeDef* COM_USART[COMn] = {DISCOVERY_COM1};
00070
00071 GPIO_TypeDef* COM_TX_PORT[COMn] = {DISCOVERY_COM1_TX_GPIO_PORT};
00072
00073 GPIO_TypeDef* COM_RX_PORT[COMn] = {DISCOVERY_COM1_RX_GPIO_PORT};
00074
00075 const uint16_t COM_TX_PIN[COMn] = {DISCOVERY_COM1_TX_PIN};
00076
00077 const uint16_t COM_RX_PIN[COMn] = {DISCOVERY_COM1_RX_PIN};
00078
00079 const uint16_t COM_TX_AF[COMn] = {DISCOVERY_COM1_TX_AF};
00080
00081 const uint16_t COM_RX_AF[COMn] = {DISCOVERY_COM1_RX_AF};
00082
00083 I2C_HandleTypeDef hI2cHandler;
00084 UART_HandleTypeDef hDiscoUart;
00085
00086 /**
00087   * @}
00088   */
00089 /** @defgroup STM32L475E_IOT01_LOW_LEVEL_Private_FunctionPrototypes LOW LEVEL Private Function Prototypes
00090   * @{
00091   */
00092 static void     I2Cx_MspInit(I2C_HandleTypeDef *i2c_handler);
00093 static void     I2Cx_MspDeInit(I2C_HandleTypeDef *i2c_handler);
00094 static void     I2Cx_Init(I2C_HandleTypeDef *i2c_handler);
00095 static void     I2Cx_DeInit(I2C_HandleTypeDef *i2c_handler);
00096 static HAL_StatusTypeDef I2Cx_ReadMultiple(I2C_HandleTypeDef *i2c_handler, uint8_t Addr, uint16_t Reg, uint16_t MemAddSize, uint8_t *Buffer, uint16_t Length);
00097 static HAL_StatusTypeDef I2Cx_WriteMultiple(I2C_HandleTypeDef *i2c_handler, uint8_t Addr, uint16_t Reg, uint16_t MemAddSize, uint8_t *Buffer, uint16_t Length);
00098 static HAL_StatusTypeDef I2Cx_IsDeviceReady(I2C_HandleTypeDef *i2c_handler, uint16_t DevAddress, uint32_t Trials);
00099 static void              I2Cx_Error(I2C_HandleTypeDef *i2c_handler, uint8_t Addr);
00100
00101 /* Sensors IO functions */
00102 void     SENSOR_IO_Init(void);
00103 void     SENSOR_IO_DeInit(void);
00104 void     SENSOR_IO_Write(uint8_t Addr, uint8_t Reg, uint8_t Value);
00105 uint8_t  SENSOR_IO_Read(uint8_t Addr, uint8_t Reg);
00106 uint16_t SENSOR_IO_ReadMultiple(uint8_t Addr, uint8_t Reg, uint8_t *Buffer, uint16_t Length);
00107 void     SENSOR_IO_WriteMultiple(uint8_t Addr, uint8_t Reg, uint8_t *Buffer, uint16_t Length);
00108 HAL_StatusTypeDef SENSOR_IO_IsDeviceReady(uint16_t DevAddress, uint32_t Trials);
00109 void     SENSOR_IO_Delay(uint32_t Delay);
00110
00111 void     NFC_IO_Init(uint8_t GpoIrqEnable);
00112 void     NFC_IO_DeInit(void);
00113 uint16_t NFC_IO_ReadMultiple (uint8_t Addr, uint8_t *pBuffer, uint16_t Length );
00114 uint16_t NFC_IO_WriteMultiple (uint8_t Addr, uint8_t *pBuffer, uint16_t Length);
00115 uint16_t NFC_IO_IsDeviceReady (uint8_t Addr, uint32_t Trials);
00116 void     NFC_IO_ReadState(uint8_t * pPinState);
00117 void     NFC_IO_RfDisable(uint8_t PinState);
00118 void     NFC_IO_Delay(uint32_t Delay);
00119
00120 /**
00121   * @}
00122   */
00123
00124 /** @defgroup STM32L475E_IOT01_LOW_LEVEL_Private_Functions LOW LEVEL Private Functions
00125   * @{
00126   */
00127
00128 /**
00129   * @brief  This method returns the STM32L475E IOT01 BSP Driver revision
00130   * @retval version  0xXYZR (8bits for each decimal, R for RC)
00131   */
00132 uint32_t BSP_GetVersion(void)
00133 {
00134   return __STM32L475E_IOT01_BSP_VERSION;
00135 }
00136
00137 /**
00138   * @brief  Initializes LED GPIO.
00139   * @param  Led  LED to be initialized.
00140   *              This parameter can be one of the following values:
00141   *                @arg  LED2
00142   */
00143 void BSP_LED_Init(Led_TypeDef Led)
00144 {
00145   GPIO_InitTypeDef  gpio_init_structure;
00146
00147   LEDx_GPIO_CLK_ENABLE(Led);
00148   /* Configure the GPIO_LED pin */
00149   gpio_init_structure.Pin   = GPIO_PIN[Led];
00150   gpio_init_structure.Mode  = GPIO_MODE_OUTPUT_PP;
00151   gpio_init_structure.Pull  = GPIO_NOPULL;
00152   gpio_init_structure.Speed = GPIO_SPEED_FREQ_HIGH;
00153
00154   HAL_GPIO_Init(GPIO_PORT[Led], &gpio_init_structure);
00155 }
00156
00157 /**
00158   * @brief  DeInitializes LED GPIO.
00159   * @param  Led  LED to be deinitialized.
00160   *              This parameter can be one of the following values:
00161   *                @arg  LED2
00162   */
00163 void BSP_LED_DeInit(Led_TypeDef Led)
00164 {
00165   GPIO_InitTypeDef  gpio_init_structure;
00166
00167   /* DeInit the GPIO_LED pin */
00168   gpio_init_structure.Pin = GPIO_PIN[Led];
00169
00170   /* Turn off LED */
00171   HAL_GPIO_WritePin(GPIO_PORT[Led], GPIO_PIN[Led], GPIO_PIN_RESET);
00172   HAL_GPIO_DeInit(GPIO_PORT[Led], gpio_init_structure.Pin);
00173 }
00174
00175 /**
00176   * @brief  Turns the selected LED On.
00177   * @param  Led  LED to be set on
00178   *              This parameter can be one of the following values:
00179   *                @arg  LED2
00180   */
00181 void BSP_LED_On(Led_TypeDef Led)
00182 {
00183   HAL_GPIO_WritePin(GPIO_PORT[Led], GPIO_PIN[Led], GPIO_PIN_SET);
00184 }
00185
00186 /**
00187   * @brief  Turns the selected LED Off.
00188   * @param  Led  LED to be set off
00189   *              This parameter can be one of the following values:
00190   *                @arg  LED2
00191   */
00192 void BSP_LED_Off(Led_TypeDef Led)
00193 {
00194   HAL_GPIO_WritePin(GPIO_PORT[Led], GPIO_PIN[Led], GPIO_PIN_RESET);
00195 }
00196
00197 /**
00198   * @brief  Toggles the selected LED.
00199   * @param  Led  LED to be toggled
00200   *              This parameter can be one of the following values:
00201   *                @arg  LED2
00202   */
00203 void BSP_LED_Toggle(Led_TypeDef Led)
00204 {
00205   HAL_GPIO_TogglePin(GPIO_PORT[Led], GPIO_PIN[Led]);
00206 }
00207
00208 /**
00209   * @brief  Initializes push button GPIO and EXTI Line.
00210   * @param  Button  Button to be configured
00211   *                 This parameter can be one of the following values:
00212   *                   @arg  BUTTON_USER  User Push Button
00213   * @param  ButtonMode Button mode
00214   *                    This parameter can be one of the following values:
00215   *                      @arg  BUTTON_MODE_GPIO  Button will be used as simple IO
00216   *                      @arg  BUTTON_MODE_EXTI  Button will be connected to EXTI line
00217   *                                              with interrupt generation capability
00218   */
00219 void BSP_PB_Init(Button_TypeDef Button, ButtonMode_TypeDef ButtonMode)
00220 {
00221   GPIO_InitTypeDef gpio_init_structure;
00222
00223   /* Enable the BUTTON clock */
00224   USER_BUTTON_GPIO_CLK_ENABLE();
00225
00226   if(ButtonMode == BUTTON_MODE_GPIO)
00227   {
00228     /* Configure Button pin as input */
00229     gpio_init_structure.Pin = BUTTON_PIN[Button];
00230     gpio_init_structure.Mode = GPIO_MODE_INPUT;
00231     gpio_init_structure.Pull = GPIO_PULLUP;
00232     gpio_init_structure.Speed = GPIO_SPEED_FREQ_HIGH;
00233     HAL_GPIO_Init(BUTTON_PORT[Button], &gpio_init_structure);
00234   }
00235
00236   if(ButtonMode == BUTTON_MODE_EXTI)
00237   {
00238     /* Configure Button pin as input with External interrupt */
00239     gpio_init_structure.Pin = BUTTON_PIN[Button];
00240     gpio_init_structure.Pull = GPIO_PULLUP;
00241     gpio_init_structure.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
00242
00243     gpio_init_structure.Mode = GPIO_MODE_IT_RISING;
00244
00245     HAL_GPIO_Init(BUTTON_PORT[Button], &gpio_init_structure);
00246
00247     /* Enable and set Button EXTI Interrupt to the lowest priority */
00248     HAL_NVIC_SetPriority((IRQn_Type)(BUTTON_IRQn[Button]), 0x0F, 0x00);
00249     HAL_NVIC_EnableIRQ((IRQn_Type)(BUTTON_IRQn[Button]));
00250   }
00251 }
00252
00253 /**
00254   * @brief  DeInitializes push button.
00255   * @param  Button  Button to be configured
00256   *                 This parameter can be one of the following values:
00257   *                   @arg  BUTTON_USER  User Push Button
00258   * @note PB DeInit does not disable the GPIO clock
00259   */
00260 void BSP_PB_DeInit(Button_TypeDef Button)
00261 {
00262   GPIO_InitTypeDef gpio_init_structure;
00263
00264   gpio_init_structure.Pin = BUTTON_PIN[Button];
00265   HAL_NVIC_DisableIRQ((IRQn_Type)(BUTTON_IRQn[Button]));
00266   HAL_GPIO_DeInit(BUTTON_PORT[Button], gpio_init_structure.Pin);
00267 }
00268
00269
00270 /**
00271   * @brief  Returns the selected button state.
00272   * @param  Button  Button to be checked
00273   *                 This parameter can be one of the following values:
00274   *                   @arg  BUTTON_USER  User Push Button
00275   * @retval The Button GPIO pin value (GPIO_PIN_RESET = button pressed)
00276   */
00277 uint32_t BSP_PB_GetState(Button_TypeDef Button)
00278 {
00279   return HAL_GPIO_ReadPin(BUTTON_PORT[Button], BUTTON_PIN[Button]);
00280 }
00281
00282 /**
00283   * @brief  Configures COM port.
00284   * @param  COM  COM port to be initialized.
00285   *              This parameter can be one of the following values:
00286   *                @arg  COM1
00287   * @param  huart  Pointer to a UART_HandleTypeDef structure that contains the
00288   *                configuration information for the specified USART peripheral.
00289   */
00290 void BSP_COM_Init(COM_TypeDef COM, UART_HandleTypeDef *huart)
00291 {
00292   GPIO_InitTypeDef gpio_init_structure;
00293
00294   /* Enable GPIO clock */
00295   DISCOVERY_COMx_TX_GPIO_CLK_ENABLE(COM);
00296   DISCOVERY_COMx_RX_GPIO_CLK_ENABLE(COM);
00297
00298   /* Enable USART clock */
00299   DISCOVERY_COMx_CLK_ENABLE(COM);
00300
00301   /* Configure USART Tx as alternate function */
00302   gpio_init_structure.Pin = COM_TX_PIN[COM];
00303   gpio_init_structure.Mode = GPIO_MODE_AF_PP;
00304   gpio_init_structure.Speed = GPIO_SPEED_FREQ_HIGH;
00305   gpio_init_structure.Pull = GPIO_NOPULL;
00306   gpio_init_structure.Alternate = COM_TX_AF[COM];
00307   HAL_GPIO_Init(COM_TX_PORT[COM], &gpio_init_structure);
00308
00309   /* Configure USART Rx as alternate function */
00310   gpio_init_structure.Pin = COM_RX_PIN[COM];
00311   gpio_init_structure.Mode = GPIO_MODE_AF_PP;
00312   gpio_init_structure.Alternate = COM_RX_AF[COM];
00313   HAL_GPIO_Init(COM_RX_PORT[COM], &gpio_init_structure);
00314
00315   /* USART configuration */
00316   huart->Instance = COM_USART[COM];
00317   HAL_UART_Init(huart);
00318 }
00319
00320 /**
00321   * @brief  DeInitializes COM port.
00322   * @param  COM  COM port to be deinitialized.
00323   *              This parameter can be one of the following values:
00324   *                @arg  COM1
00325   * @param  huart  Pointer to a UART_HandleTypeDef structure that contains the
00326   *                configuration information for the specified USART peripheral.
00327   */
00328 void BSP_COM_DeInit(COM_TypeDef COM, UART_HandleTypeDef *huart)
00329 {
00330   /* USART configuration */
00331   huart->Instance = COM_USART[COM];
00332   HAL_UART_DeInit(huart);
00333
00334   /* Enable USART clock */
00335   DISCOVERY_COMx_CLK_DISABLE(COM);
00336
00337   /* DeInit GPIO pins can be done in the application
00338      (by surcharging this __weak function) */
00339
00340   /* GPIO pins clock, FMC clock and DMA clock can be shut down in the application
00341      by surcharging this __weak function */
00342 }
00343
00344
00345 /*******************************************************************************
00346                             BUS OPERATIONS
00347 *******************************************************************************/
00348
00349 /******************************* I2C Routines *********************************/
00350 /**
00351   * @brief  Initializes I2C MSP.
00352   * @param  i2c_handler  I2C handler
00353   * @retval None
00354   */
00355 static void I2Cx_MspInit(I2C_HandleTypeDef *i2c_handler)
00356 {
00357   GPIO_InitTypeDef  gpio_init_structure;
00358
00359   /*** Configure the GPIOs ***/
00360   /* Enable GPIO clock */
00361   DISCOVERY_I2Cx_SCL_SDA_GPIO_CLK_ENABLE();
00362
00363   /* Configure I2C Tx, Rx as alternate function */
00364   gpio_init_structure.Pin = DISCOVERY_I2Cx_SCL_PIN | DISCOVERY_I2Cx_SDA_PIN;
00365   gpio_init_structure.Mode = GPIO_MODE_AF_OD;
00366   gpio_init_structure.Pull = GPIO_PULLUP;
00367   gpio_init_structure.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
00368   gpio_init_structure.Alternate = DISCOVERY_I2Cx_SCL_SDA_AF;
00369   HAL_GPIO_Init(DISCOVERY_I2Cx_SCL_SDA_GPIO_PORT, &gpio_init_structure);
00370
00371   HAL_GPIO_Init(DISCOVERY_I2Cx_SCL_SDA_GPIO_PORT, &gpio_init_structure);
00372
00373   /*** Configure the I2C peripheral ***/
00374   /* Enable I2C clock */
00375   DISCOVERY_I2Cx_CLK_ENABLE();
00376
00377   /* Force the I2C peripheral clock reset */
00378   DISCOVERY_I2Cx_FORCE_RESET();
00379
00380   /* Release the I2C peripheral clock reset */
00381   DISCOVERY_I2Cx_RELEASE_RESET();
00382
00383   /* Enable and set I2Cx Interrupt to a lower priority */
00384   HAL_NVIC_SetPriority(DISCOVERY_I2Cx_EV_IRQn, 0x0F, 0);
00385   HAL_NVIC_EnableIRQ(DISCOVERY_I2Cx_EV_IRQn);
00386
00387   /* Enable and set I2Cx Interrupt to a lower priority */
00388   HAL_NVIC_SetPriority(DISCOVERY_I2Cx_ER_IRQn, 0x0F, 0);
00389   HAL_NVIC_EnableIRQ(DISCOVERY_I2Cx_ER_IRQn);
00390 }
00391
00392 /**
00393   * @brief  DeInitializes I2C MSP.
00394   * @param  i2c_handler  I2C handler
00395   * @retval None
00396   */
00397 static void I2Cx_MspDeInit(I2C_HandleTypeDef *i2c_handler)
00398 {
00399   GPIO_InitTypeDef  gpio_init_structure;
00400
00401   /* Configure I2C Tx, Rx as alternate function */
00402   gpio_init_structure.Pin = DISCOVERY_I2Cx_SCL_PIN | DISCOVERY_I2Cx_SDA_PIN;
00403   HAL_GPIO_DeInit(DISCOVERY_I2Cx_SCL_SDA_GPIO_PORT, gpio_init_structure.Pin);
00404   /* Disable GPIO clock */
00405   DISCOVERY_I2Cx_SCL_SDA_GPIO_CLK_DISABLE();
00406
00407   /* Disable I2C clock */
00408   DISCOVERY_I2Cx_CLK_DISABLE();
00409 }
00410
00411 /**
00412   * @brief  Initializes I2C HAL.
00413   * @param  i2c_handler  I2C handler
00414   * @retval None
00415   */
00416 static void I2Cx_Init(I2C_HandleTypeDef *i2c_handler)
00417 {
00418   /* I2C configuration */
00419   i2c_handler->Instance              = DISCOVERY_I2Cx;
00420   i2c_handler->Init.Timing           = DISCOVERY_I2Cx_TIMING;
00421   i2c_handler->Init.OwnAddress1      = 0;
00422   i2c_handler->Init.AddressingMode   = I2C_ADDRESSINGMODE_7BIT;
00423   i2c_handler->Init.DualAddressMode  = I2C_DUALADDRESS_DISABLE;
00424   i2c_handler->Init.OwnAddress2      = 0;
00425   i2c_handler->Init.GeneralCallMode  = I2C_GENERALCALL_DISABLE;
00426   i2c_handler->Init.NoStretchMode    = I2C_NOSTRETCH_DISABLE;
00427
00428   /* Init the I2C */
00429   I2Cx_MspInit(i2c_handler);
00430   HAL_I2C_Init(i2c_handler);
00431
00432   /**Configure Analogue filter */
00433   HAL_I2CEx_ConfigAnalogFilter(i2c_handler, I2C_ANALOGFILTER_ENABLE);
00434 }
00435
00436 /**
00437   * @brief  DeInitializes I2C HAL.
00438   * @param  i2c_handler  I2C handler
00439   * @retval None
00440   */
00441 static void I2Cx_DeInit(I2C_HandleTypeDef *i2c_handler)
00442 {  /* DeInit the I2C */
00443   I2Cx_MspDeInit(i2c_handler);
00444   HAL_I2C_DeInit(i2c_handler);
00445 }
00446
00447 /**
00448   * @brief  Reads multiple data.
00449   * @param  i2c_handler  I2C handler
00450   * @param  Addr  I2C address
00451   * @param  Reg  Reg address
00452   * @param  MemAddress  memory address
00453   * @param  Buffer  Pointer to data buffer
00454   * @param  Length  Length of the data
00455   * @retval HAL status
00456   */
00457 static HAL_StatusTypeDef I2Cx_ReadMultiple(I2C_HandleTypeDef *i2c_handler, uint8_t Addr, uint16_t Reg, uint16_t MemAddress, uint8_t *Buffer, uint16_t Length)
00458 {
00459   HAL_StatusTypeDef status = HAL_OK;
00460
00461   status = HAL_I2C_Mem_Read(i2c_handler, Addr, (uint16_t)Reg, MemAddress, Buffer, Length, 1000);
00462
00463   /* Check the communication status */
00464   if(status != HAL_OK)
00465   {
00466     /* I2C error occured */
00467     I2Cx_Error(i2c_handler, Addr);
00468   }
00469   return status;
00470 }
00471
00472
00473 /**
00474   * @brief  Writes a value in a register of the device through BUS in using DMA mode.
00475   * @param  i2c_handler  I2C handler
00476   * @param  Addr  Device address on BUS Bus.
00477   * @param  Reg  The target register address to write
00478   * @param  MemAddress  memory address
00479   * @param  Buffer  The target register value to be written
00480   * @param  Length  buffer size to be written
00481   * @retval HAL status
00482   */
00483 static HAL_StatusTypeDef I2Cx_WriteMultiple(I2C_HandleTypeDef *i2c_handler, uint8_t Addr, uint16_t Reg, uint16_t MemAddress, uint8_t *Buffer, uint16_t Length)
00484 {
00485   HAL_StatusTypeDef status = HAL_OK;
00486
00487   status = HAL_I2C_Mem_Write(i2c_handler, Addr, (uint16_t)Reg, MemAddress, Buffer, Length, 1000);
00488
00489   /* Check the communication status */
00490   if(status != HAL_OK)
00491   {
00492     /* Re-Initiaize the I2C Bus */
00493     I2Cx_Error(i2c_handler, Addr);
00494   }
00495   return status;
00496 }
00497
00498 /**
00499   * @brief  Checks if target device is ready for communication.
00500   * @note   This function is used with Memory devices
00501   * @param  i2c_handler  I2C handler
00502   * @param  DevAddress  Target device address
00503   * @param  Trials  Number of trials
00504   * @retval HAL status
00505   */
00506 static HAL_StatusTypeDef I2Cx_IsDeviceReady(I2C_HandleTypeDef *i2c_handler, uint16_t DevAddress, uint32_t Trials)
00507 {
00508   return (HAL_I2C_IsDeviceReady(i2c_handler, DevAddress, Trials, 1000));
00509 }
00510
00511 /**
00512   * @brief  Manages error callback by re-initializing I2C.
00513   * @param  i2c_handler  I2C handler
00514   * @param  Addr  I2C Address
00515   * @retval None
00516   */
00517 static void I2Cx_Error(I2C_HandleTypeDef *i2c_handler, uint8_t Addr)
00518 {
00519   /* De-initialize the I2C communication bus */
00520   HAL_I2C_DeInit(i2c_handler);
00521
00522   /* Re-Initialize the I2C communication bus */
00523   I2Cx_Init(i2c_handler);
00524 }
00525
00526 /**
00527   * @}
00528   */
00529
00530 /*******************************************************************************
00531                             LINK OPERATIONS
00532 *******************************************************************************/
00533 /******************************** LINK Sensors ********************************/
00534
00535 /**
00536   * @brief  Initializes Sensors low level.
00537   * @retval None
00538   */
00539 void SENSOR_IO_Init(void)
00540 {
00541   I2Cx_Init(&hI2cHandler);
00542 }
00543
00544 /**
00545   * @brief  DeInitializes Sensors low level.
00546   * @retval None
00547   */
00548 void SENSOR_IO_DeInit(void)
00549 {
00550   I2Cx_DeInit(&hI2cHandler);
00551 }
00552
00553 /**
00554   * @brief  Writes a single data.
00555   * @param  Addr  I2C address
00556   * @param  Reg  Reg address
00557   * @param  Value  Data to be written
00558   * @retval None
00559   */
00560 void SENSOR_IO_Write(uint8_t Addr, uint8_t Reg, uint8_t Value)
00561 {
00562   I2Cx_WriteMultiple(&hI2cHandler, Addr, (uint16_t)Reg, I2C_MEMADD_SIZE_8BIT,(uint8_t*)&Value, 1);
00563 }
00564
00565 /**
00566   * @brief  Reads a single data.
00567   * @param  Addr  I2C address
00568   * @param  Reg  Reg address
00569   * @retval Data to be read
00570   */
00571 uint8_t SENSOR_IO_Read(uint8_t Addr, uint8_t Reg)
00572 {
00573   uint8_t read_value = 0;
00574
00575   I2Cx_ReadMultiple(&hI2cHandler, Addr, Reg, I2C_MEMADD_SIZE_8BIT, (uint8_t*)&read_value, 1);
00576
00577   return read_value;
00578 }
00579
00580 /**
00581   * @brief  Reads multiple data with I2C communication
00582   *         channel from TouchScreen.
00583   * @param  Addr  I2C address
00584   * @param  Reg  Register address
00585   * @param  Buffer  Pointer to data buffer
00586   * @param  Length  Length of the data
00587   * @retval HAL status
00588   */
00589 uint16_t SENSOR_IO_ReadMultiple(uint8_t Addr, uint8_t Reg, uint8_t *Buffer, uint16_t Length)
00590 {
00591  return I2Cx_ReadMultiple(&hI2cHandler, Addr, (uint16_t)Reg, I2C_MEMADD_SIZE_8BIT, Buffer, Length);
00592 }
00593
00594 /**
00595   * @brief  Writes multiple data with I2C communication
00596   *         channel from MCU to TouchScreen.
00597   * @param  Addr  I2C address
00598   * @param  Reg  Register address
00599   * @param  Buffer  Pointer to data buffer
00600   * @param  Length  Length of the data
00601   * @retval None
00602   */
00603 void SENSOR_IO_WriteMultiple(uint8_t Addr, uint8_t Reg, uint8_t *Buffer, uint16_t Length)
00604 {
00605   I2Cx_WriteMultiple(&hI2cHandler, Addr, (uint16_t)Reg, I2C_MEMADD_SIZE_8BIT, Buffer, Length);
00606 }
00607
00608 /**
00609   * @brief  Checks if target device is ready for communication.
00610   * @note   This function is used with Memory devices
00611   * @param  DevAddress  Target device address
00612   * @param  Trials  Number of trials
00613   * @retval HAL status
00614   */
00615 HAL_StatusTypeDef SENSOR_IO_IsDeviceReady(uint16_t DevAddress, uint32_t Trials)
00616 {
00617   return (I2Cx_IsDeviceReady(&hI2cHandler, DevAddress, Trials));
00618 }
00619
00620 /**
00621   * @brief  Delay function used in Sensor low level driver.
00622   * @param  Delay  Delay in ms
00623   * @retval None
00624   */
00625 void SENSOR_IO_Delay(uint32_t Delay)
00626 {
00627   HAL_Delay(Delay);
00628 }
00629
00630 /******************************** LINK NFC ********************************/
00631
00632 /**
00633   * @brief  Initializes Sensors low level.
00634   * @param  GpoIrqEnable  0x0 is disable, otherwise enabled
00635   * @retval None
00636   */
00637 void NFC_IO_Init(uint8_t GpoIrqEnable)
00638 {
00639   GPIO_InitTypeDef GPIO_InitStruct;
00640
00641   /* I2C init */
00642   I2Cx_Init(&hI2cHandler);
00643
00644   /* GPIO Ports Clock Enable */
00645   NFC_GPIO_CLK_ENABLE();
00646
00647   /* Configure GPIO pins for GPO (PE4) */
00648   if(GpoIrqEnable == 0)
00649   {
00650     GPIO_InitStruct.Pin = NFC_GPIO_GPO_PIN;
00651     GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
00652     GPIO_InitStruct.Pull = GPIO_PULLUP;
00653     GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
00654     HAL_GPIO_Init(NFC_GPIO_GPO_PIN_PORT, &GPIO_InitStruct);
00655   }
00656   else
00657   {
00658     GPIO_InitStruct.Pin = NFC_GPIO_GPO_PIN;
00659     GPIO_InitStruct.Mode = GPIO_MODE_IT_FALLING;
00660     GPIO_InitStruct.Pull = GPIO_PULLUP;
00661     GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
00662     HAL_GPIO_Init(NFC_GPIO_GPO_PIN_PORT, &GPIO_InitStruct);
00663     /* Enable and set EXTI4_IRQn Interrupt to the lowest priority */
00664     HAL_NVIC_SetPriority(EXTI4_IRQn, 3, 0);
00665     HAL_NVIC_EnableIRQ(EXTI4_IRQn);
00666   }
00667
00668   /* Configure GPIO pins for DISABLE (PE2)*/
00669   GPIO_InitStruct.Pin = NFC_GPIO_RFDISABLE_PIN;
00670   GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
00671   GPIO_InitStruct.Pull = GPIO_NOPULL;
00672   HAL_GPIO_Init(NFC_GPIO_RFDISABLE_PIN_PORT, &GPIO_InitStruct);
00673 }
00674
00675 /**
00676   * @brief  DeInitializes Sensors low level.
00677   * @retval None
00678   */
00679 void NFC_IO_DeInit(void)
00680 {
00681   I2Cx_DeInit(&hI2cHandler);
00682 }
00683
00684 /**
00685   * @brief  This functions reads a response of the M24SR device
00686   * @param  Addr  M24SR I2C address
00687   * @param  pBuffer  Pointer on the buffer to retrieve M24SR response
00688   * @param  Length  Length of the data
00689   * @retval Status  Success or Timeout
00690   */
00691 uint16_t NFC_IO_ReadMultiple (uint8_t Addr, uint8_t *pBuffer, uint16_t Length )
00692 {
00693   uint16_t status ;
00694
00695     /* Before calling this function M24SR must be ready: check to detect potential issues */
00696   status = NFC_IO_IsDeviceReady(Addr, NFC_I2C_TRIALS);
00697   if (status != NFC_I2C_STATUS_SUCCESS)
00698   {
00699     return NFC_I2C_ERROR_TIMEOUT;
00700   }
00701
00702   if( HAL_I2C_Master_Receive(&hI2cHandler, Addr, (uint8_t*)pBuffer, Length, NFC_I2C_TIMEOUT_STD) != HAL_OK)
00703   {
00704     return NFC_I2C_ERROR_TIMEOUT;
00705   }
00706
00707   return NFC_I2C_STATUS_SUCCESS;
00708 }
00709
00710 /**
00711   * @brief  This functions sends the command buffer
00712   * @param  Addr  M24SR I2C address
00713   * @param  pBuffer  pointer to the buffer to send to the M24SR
00714   * @param  Length  Length of the data
00715   * @retval Status  Success or Timeout
00716   */
00717 uint16_t  NFC_IO_WriteMultiple (uint8_t Addr, uint8_t *pBuffer, uint16_t Length)
00718 {
00719   uint16_t status ;
00720
00721   /* Before calling this function M24SR must be ready: check to detect potential issues */
00722   status = NFC_IO_IsDeviceReady(Addr, NFC_I2C_TRIALS);
00723   if (status != NFC_I2C_STATUS_SUCCESS)
00724   {
00725     return NFC_I2C_ERROR_TIMEOUT;
00726   }
00727
00728   if( HAL_I2C_Master_Transmit(&hI2cHandler, Addr, (uint8_t*)pBuffer, Length, NFC_I2C_TIMEOUT_STD) != HAL_OK)
00729   {
00730     return NFC_I2C_ERROR_TIMEOUT;
00731   }
00732
00733   return NFC_I2C_STATUS_SUCCESS;
00734 }
00735
00736 /**
00737   * @brief  Checks if target device is ready for communication.
00738   * @param  Addr  M24SR I2C address
00739   * @param  Trials  Number of trials (currently not present in M24sr)
00740   * @retval Status  Success or Timeout
00741   */
00742 uint16_t   NFC_IO_IsDeviceReady (uint8_t Addr, uint32_t Trials)
00743 {
00744     HAL_StatusTypeDef status;
00745     uint32_t tickstart = 0;
00746     uint32_t currenttick = 0;
00747
00748     /* Get tick */
00749     tickstart = HAL_GetTick();
00750
00751     /* Wait until M24SR is ready or timeout occurs */
00752     do
00753     {
00754         status = HAL_I2C_IsDeviceReady(&hI2cHandler, Addr, Trials, NFC_I2C_TIMEOUT_STD);
00755         currenttick = HAL_GetTick();
00756     } while( ( (currenttick - tickstart) < NFC_I2C_TIMEOUT_MAX) && (status != HAL_OK) );
00757
00758     if (status != HAL_OK)
00759     {
00760         return NFC_I2C_ERROR_TIMEOUT;
00761     }
00762
00763     return NFC_I2C_STATUS_SUCCESS;
00764 }
00765
00766 /**
00767   * @brief  This function read the state of the M24SR GPO
00768   * @retval GPIO_PinState  state of the M24SR GPO
00769   */
00770 void NFC_IO_ReadState(uint8_t * pPinState)
00771 {
00772   *pPinState = (uint8_t)HAL_GPIO_ReadPin(NFC_GPIO_GPO_PIN_PORT,NFC_GPIO_GPO_PIN);
00773 }
00774
00775 /**
00776   * @brief  This function sets the state of the M24SR RF disable pin
00777   * @param  PinState  put RF disable pin of M24SR in PinState (1 or 0)
00778   */
00779 void NFC_IO_RfDisable(uint8_t PinState)
00780 {
00781   HAL_GPIO_WritePin(NFC_GPIO_RFDISABLE_PIN_PORT,NFC_GPIO_RFDISABLE_PIN,(GPIO_PinState)PinState);
00782 }
00783
00784 /**
00785   * @brief  Delay function used in M24SR low level driver.
00786   * @param  Delay  Delay in ms
00787   * @retval None
00788   */
00789 void NFC_IO_Delay(uint32_t Delay)
00790 {
00791   HAL_Delay(Delay);
00792 }
00793
00794 /**
00795   * @}
00796   */
00797
00798 /**
00799   * @}
00800   */
00801
00802 /**
00803   * @}
00804   */
00805
00806 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Generated on Thu Nov 28 2019 16:15:09 for B-L475E-IOT01 BSP User Manual by doxygen 1.7.6.1


B-L475E-IOT01 BSP User Manual: stm32l475e_iot01.h Source File

  • File List
  • Globals
  • Firmware
  • Drivers
  • BSP
  • B-L475E-IOT01
stm32l475e_iot01.h
Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   * @file    stm32l475e_iot01.h
00004   * @author  MCD Application Team
00005   * @brief   STM32L475E IOT01 board support package
00006   ******************************************************************************
00007   * @attention
00008   *
00009   * <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
00010   * All rights reserved.</center></h2>
00011   *
00012   * This software component is licensed by ST under BSD 3-Clause license,
00013   * the "License"; You may not use this file except in compliance with the
00014   * License. You may obtain a copy of the License at:
00015   *                        opensource.org/licenses/BSD-3-Clause
00016   *
00017   ******************************************************************************
00018   */
00019
00020 /* Define to prevent recursive inclusion -------------------------------------*/
00021 #ifndef __STM32L475E_IOT01_H
00022 #define __STM32L475E_IOT01_H
00023
00024 #ifdef __cplusplus
00025  extern "C" {
00026 #endif
00027
00028 /* Includes ------------------------------------------------------------------*/
00029 #include "stm32l4xx_hal.h"
00030
00031 /** @addtogroup BSP
00032   * @{
00033   */
00034
00035 /** @addtogroup STM32L475E_IOT01
00036   * @{
00037   */
00038
00039 /** @addtogroup STM32L475E_IOT01_LOW_LEVEL
00040   * @{
00041   */
00042
00043 /** @defgroup STM32L475E_IOT01_LOW_LEVEL_Exported_Types LOW LEVEL Exported Types
00044   * @{
00045   */
00046 typedef enum
00047 {
00048 LED2 = 0,
00049 LED_GREEN = LED2,
00050 }Led_TypeDef;
00051
00052
00053 typedef enum
00054 {
00055   BUTTON_USER = 0
00056 }Button_TypeDef;
00057
00058 typedef enum
00059 {
00060   BUTTON_MODE_GPIO = 0,
00061   BUTTON_MODE_EXTI = 1
00062 }ButtonMode_TypeDef;
00063
00064 typedef enum
00065 {
00066   COM1 = 0,
00067   COM2 = 0,
00068 }COM_TypeDef;
00069 /**
00070   * @}
00071   */
00072
00073 /** @defgroup STM32L475E_IOT01_LOW_LEVEL_Exported_Constants LOW LEVEL Exported Constants
00074   * @{
00075   */
00076
00077 /**
00078   * @brief  Define for STM32L475E_IOT01 board
00079   */
00080 #if !defined (USE_STM32L475E_IOT01)
00081  #define USE_STM32L475E_IOT01
00082 #endif
00083
00084 #define LEDn                             ((uint8_t)1)
00085
00086 #define LED2_PIN                         GPIO_PIN_14
00087 #define LED2_GPIO_PORT                   GPIOB
00088 #define LED2_GPIO_CLK_ENABLE()           __HAL_RCC_GPIOB_CLK_ENABLE()
00089 #define LED2_GPIO_CLK_DISABLE()          __HAL_RCC_GPIOB_CLK_DISABLE()
00090
00091
00092
00093 #define LEDx_GPIO_CLK_ENABLE(__INDEX__)  do{if((__INDEX__) == 0) LED2_GPIO_CLK_ENABLE();}while(0)
00094
00095 #define LEDx_GPIO_CLK_DISABLE(__INDEX__)  do{if((__INDEX__) == 0) LED2_GPIO_CLK_DISABLE();}while(0)
00096
00097 /* Only one User/Wakeup button */
00098 #define BUTTONn                             ((uint8_t)1)
00099
00100 /**
00101   * @brief Wakeup push-button
00102   */
00103 #define USER_BUTTON_PIN                   GPIO_PIN_13
00104 #define USER_BUTTON_GPIO_PORT             GPIOC
00105 #define USER_BUTTON_GPIO_CLK_ENABLE()     __HAL_RCC_GPIOC_CLK_ENABLE()
00106 #define USER_BUTTON_GPIO_CLK_DISABLE()    __HAL_RCC_GPIOC_CLK_DISABLE()
00107 #define USER_BUTTON_EXTI_IRQn             EXTI15_10_IRQn
00108
00109 /**
00110   * @brief  NFC Gpio PINs
00111   */
00112 #define NFC_GPIO_GPO_PIN                         GPIO_PIN_4
00113 #define NFC_GPIO_GPO_PIN_PORT                    GPIOE
00114 #define NFC_GPIO_RFDISABLE_PIN                   GPIO_PIN_2
00115 #define NFC_GPIO_RFDISABLE_PIN_PORT              GPIOE
00116 #define NFC_GPIO_CLK_ENABLE()                    __HAL_RCC_GPIOE_CLK_ENABLE();
00117 #define NFC_GPIO_CLK_DISABLE()                   __HAL_RCC_GPIOE_CLK_DISABLE();
00118
00119
00120 #define COMn                              ((uint8_t)1)
00121
00122 /**
00123  * @brief Definition for COM port1, connected to USART1
00124  */
00125 #define DISCOVERY_COM1                          USART1
00126 #define DISCOVERY_COM1_CLK_ENABLE()             __HAL_RCC_USART1_CLK_ENABLE()
00127 #define DISCOVERY_COM1_CLK_DISABLE()            __HAL_RCC_USART1_CLK_DISABLE()
00128
00129 #define DISCOVERY_COM1_TX_PIN                   GPIO_PIN_6
00130 #define DISCOVERY_COM1_TX_GPIO_PORT             GPIOB
00131 #define DISCOVERY_COM1_TX_GPIO_CLK_ENABLE()     __HAL_RCC_GPIOB_CLK_ENABLE()
00132 #define DISCOVERY_COM1_TX_GPIO_CLK_DISABLE()    __HAL_RCC_GPIOB_CLK_DISABLE()
00133 #define DISCOVERY_COM1_TX_AF                    GPIO_AF7_USART1
00134
00135 #define DISCOVERY_COM1_RX_PIN                   GPIO_PIN_7
00136 #define DISCOVERY_COM1_RX_GPIO_PORT             GPIOB
00137 #define DISCOVERY_COM1_RX_GPIO_CLK_ENABLE()     __HAL_RCC_GPIOB_CLK_ENABLE()
00138 #define DISCOVERY_COM1_RX_GPIO_CLK_DISABLE()    __HAL_RCC_GPIOB_CLK_DISABLE()
00139 #define DISCOVERY_COM1_RX_AF                    GPIO_AF7_USART1
00140
00141 #define DISCOVERY_COM1_IRQn                     USART1_IRQn
00142
00143
00144 #define DISCOVERY_COMx_CLK_ENABLE(__INDEX__)            do { if((__INDEX__) == COM1) {DISCOVERY_COM1_CLK_ENABLE();}} while(0)
00145 #define DISCOVERY_COMx_CLK_DISABLE(__INDEX__)           do { if((__INDEX__) == COM1) {DISCOVERY_COM1_CLK_DISABLE();}} while(0)
00146
00147 #define DISCOVERY_COMx_TX_GPIO_CLK_ENABLE(__INDEX__)    do { if((__INDEX__) == COM1) {DISCOVERY_COM1_TX_GPIO_CLK_ENABLE();}} while(0)
00148 #define DISCOVERY_COMx_TX_GPIO_CLK_DISABLE(__INDEX__)   do { if((__INDEX__) == COM1) {DISCOVERY_COM1_TX_GPIO_CLK_DISABLE();}} while(0)
00149
00150 #define DISCOVERY_COMx_RX_GPIO_CLK_ENABLE(__INDEX__)    do { if((__INDEX__) == COM1) {DISCOVERY_COM1_RX_GPIO_CLK_ENABLE();}} while(0)
00151 #define DISCOVERY_COMx_RX_GPIO_CLK_DISABLE(__INDEX__)   do { if((__INDEX__) == COM1) {DISCOVERY_COM1_RX_GPIO_CLK_DISABLE();}} while(0)
00152
00153
00154 /* User can use this section to tailor I2Cx instance used and associated resources */
00155 /* Definition for I2Cx resources */
00156 #define DISCOVERY_I2Cx                             I2C2
00157 #define DISCOVERY_I2Cx_CLK_ENABLE()                __HAL_RCC_I2C2_CLK_ENABLE()
00158 #define DISCOVERY_I2Cx_CLK_DISABLE()               __HAL_RCC_I2C2_CLK_DISABLE()
00159 #define DISCOVERY_DMAx_CLK_ENABLE()                __HAL_RCC_DMA1_CLK_ENABLE()
00160 #define DISCOVERY_I2Cx_SCL_SDA_GPIO_CLK_ENABLE()   __HAL_RCC_GPIOB_CLK_ENABLE()
00161 #define DISCOVERY_I2Cx_SCL_SDA_GPIO_CLK_DISABLE()  __HAL_RCC_GPIOB_CLK_DISABLE()
00162
00163 #define DISCOVERY_I2Cx_FORCE_RESET()               __HAL_RCC_I2C2_FORCE_RESET()
00164 #define DISCOVERY_I2Cx_RELEASE_RESET()             __HAL_RCC_I2C2_RELEASE_RESET()
00165
00166 /* Definition for I2Cx Pins */
00167 #define DISCOVERY_I2Cx_SCL_PIN                     GPIO_PIN_10
00168 #define DISCOVERY_I2Cx_SDA_PIN                     GPIO_PIN_11
00169 #define DISCOVERY_I2Cx_SCL_SDA_GPIO_PORT           GPIOB
00170 #define DISCOVERY_I2Cx_SCL_SDA_AF                  GPIO_AF4_I2C2
00171
00172 /* I2C interrupt requests */
00173 #define DISCOVERY_I2Cx_EV_IRQn                     I2C2_EV_IRQn
00174 #define DISCOVERY_I2Cx_ER_IRQn                     I2C2_ER_IRQn
00175
00176 /* I2C clock speed configuration (in Hz)
00177   WARNING:
00178    Make sure that this define is not already declared in other files.
00179    It can be used in parallel by other modules. */
00180 #ifndef DISCOVERY_I2C_SPEED
00181  #define DISCOVERY_I2C_SPEED                             100000
00182 #endif /* DISCOVERY_I2C_SPEED */
00183
00184 #ifndef DISCOVERY_I2Cx_TIMING
00185 #define DISCOVERY_I2Cx_TIMING                     ((uint32_t)0x00702681)
00186 #endif /* DISCOVERY_I2Cx_TIMING */
00187
00188
00189 /* I2C Sensors address */
00190 /* LPS22HB (Pressure) I2C Address */
00191 #define LPS22HB_I2C_ADDRESS  (uint8_t)0xBA
00192 /* HTS221 (Humidity) I2C Address */
00193 #define HTS221_I2C_ADDRESS   (uint8_t)0xBE
00194
00195 #ifdef USE_LPS22HB_TEMP
00196 /* LPS22HB Sensor hardware I2C address */
00197 #define TSENSOR_I2C_ADDRESS     LPS22HB_I2C_ADDRESS
00198 #else /* USE_HTS221_TEMP */
00199 /* HTS221 Sensor hardware I2C address */
00200 #define TSENSOR_I2C_ADDRESS     HTS221_I2C_ADDRESS
00201 #endif
00202
00203 /* NFC I2C address and specific config parameters */
00204 #define M24SR_I2C_ADDR             (uint8_t)  0xAC /*!< M24SR address */
00205 #define NFC_I2C_STATUS_SUCCESS     (uint16_t) 0x0000
00206 #define NFC_I2C_ERROR_TIMEOUT      (uint16_t) 0x0011
00207 #define NFC_I2C_TIMEOUT_STD        (uint32_t) 8 /* I2C Time out (ms), used to call Transmit/Receive HAL functions */
00208 #define NFC_I2C_TIMEOUT_MAX        (uint32_t) 200 /* I2C Time out (ms), this is the maximum time needed by M24SR to complete any command */
00209 #define NFC_I2C_TRIALS             (uint32_t) 1 /* In case M24SR will reply ACK failed allow to perform retry before returning error (HAL option not used) */
00210
00211
00212 /**
00213   * @}
00214   */
00215
00216 /* Exported types ------------------------------------------------------------*/
00217 /* Exported constants --------------------------------------------------------*/
00218 /* Exported macros -----------------------------------------------------------*/
00219 /* Private macros ------------------------------------------------------------*/
00220 /* Exported functions --------------------------------------------------------*/
00221
00222 /** @defgroup STM32L475E_IOT01_LOW_LEVEL_Exported_Functions LOW LEVEL Exported Functions
00223   * @{
00224   */
00225 uint32_t         BSP_GetVersion(void);
00226 void             BSP_LED_Init(Led_TypeDef Led);
00227 void             BSP_LED_DeInit(Led_TypeDef Led);
00228 void             BSP_LED_On(Led_TypeDef Led);
00229 void             BSP_LED_Off(Led_TypeDef Led);
00230 void             BSP_LED_Toggle(Led_TypeDef Led);
00231 void             BSP_PB_Init(Button_TypeDef Button, ButtonMode_TypeDef ButtonMode);
00232 void             BSP_PB_DeInit(Button_TypeDef Button);
00233 uint32_t         BSP_PB_GetState(Button_TypeDef Button);
00234 void             BSP_COM_Init(COM_TypeDef COM, UART_HandleTypeDef *husart);
00235 void             BSP_COM_DeInit(COM_TypeDef COM, UART_HandleTypeDef *huart);
00236 /**
00237   * @}
00238   */
00239
00240 /**
00241   * @}
00242   */
00243
00244 /**
00245   * @}
00246   */
00247
00248 /**
00249   * @}
00250   */
00251 #ifdef __cplusplus
00252 }
00253 #endif
00254
00255 #endif /* __STM32L475E_IOT01_H */
00256
00257 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Generated on Thu Nov 28 2019 16:15:09 for B-L475E-IOT01 BSP User Manual by doxygen 1.7.6.1


B-L475E-IOT01 BSP User Manual: stm32l475e_iot01_accelero.c Source File

  • File List
  • Globals
  • Firmware
  • Drivers
  • BSP
  • B-L475E-IOT01
stm32l475e_iot01_accelero.c
Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   * @file    stm32l475e_iot01_accelero.c
00004   * @author  MCD Application Team
00005   * @brief   This file provides a set of functions needed to manage the accelerometer sensor
00006   ******************************************************************************
00007   * @attention
00008   *
00009   * <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
00010   * All rights reserved.</center></h2>
00011   *
00012   * This software component is licensed by ST under BSD 3-Clause license,
00013   * the "License"; You may not use this file except in compliance with the
00014   * License. You may obtain a copy of the License at:
00015   *                        opensource.org/licenses/BSD-3-Clause
00016   *
00017   ******************************************************************************
00018   */
00019
00020 /* Includes ------------------------------------------------------------------*/
00021 #include "stm32l475e_iot01_accelero.h"
00022 /** @addtogroup BSP
00023   * @{
00024   */
00025
00026 /** @addtogroup STM32L475E_IOT01
00027   * @{
00028   */
00029
00030 /** @defgroup STM32L475E_IOT01_ACCELERO ACCELERO
00031   * @{
00032   */
00033
00034 /** @defgroup STM32L475E_IOT01_ACCELERO_Private_Variables ACCELERO Private Variables
00035   * @{
00036   */
00037 static ACCELERO_DrvTypeDef *AccelerometerDrv;
00038 /**
00039   * @}
00040   */
00041
00042 /** @defgroup STM32L475E_IOT01_ACCELERO_Private_Functions ACCELERO Private Functions
00043   * @{
00044   */
00045 /**
00046   * @brief  Initialize the ACCELERO.
00047   * @retval ACCELERO_OK or ACCELERO_ERROR
00048   */
00049 ACCELERO_StatusTypeDef BSP_ACCELERO_Init(void)
00050 {
00051   ACCELERO_StatusTypeDef ret = ACCELERO_OK;
00052   uint16_t ctrl = 0x0000;
00053   ACCELERO_InitTypeDef LSM6DSL_InitStructure;
00054
00055   if(Lsm6dslAccDrv.ReadID() != LSM6DSL_ACC_GYRO_WHO_AM_I)
00056   {
00057     ret = ACCELERO_ERROR;
00058   }
00059   else
00060   {
00061     /* Initialize the ACCELERO accelerometer driver structure */
00062     AccelerometerDrv = &Lsm6dslAccDrv;
00063
00064     /* MEMS configuration ------------------------------------------------------*/
00065     /* Fill the ACCELERO accelerometer structure */
00066     LSM6DSL_InitStructure.AccOutput_DataRate = LSM6DSL_ODR_52Hz;
00067     LSM6DSL_InitStructure.Axes_Enable = 0;
00068     LSM6DSL_InitStructure.AccFull_Scale = LSM6DSL_ACC_FULLSCALE_2G;
00069     LSM6DSL_InitStructure.BlockData_Update = LSM6DSL_BDU_BLOCK_UPDATE;
00070     LSM6DSL_InitStructure.High_Resolution = 0;
00071     LSM6DSL_InitStructure.Communication_Mode = 0;
00072
00073     /* Configure MEMS: data rate, full scale  */
00074     ctrl =  (LSM6DSL_InitStructure.AccOutput_DataRate | LSM6DSL_InitStructure.AccFull_Scale);
00075
00076     /* Configure MEMS: BDU and Auto-increment for multi read/write */
00077     ctrl |= ((LSM6DSL_InitStructure.BlockData_Update | LSM6DSL_ACC_GYRO_IF_INC_ENABLED) << 8);
00078
00079     /* Configure the ACCELERO accelerometer main parameters */
00080     AccelerometerDrv->Init(ctrl);
00081   }
00082
00083   return ret;
00084 }
00085
00086 /**
00087   * @brief  DeInitialize the ACCELERO.
00088   * @retval None.
00089   */
00090 void BSP_ACCELERO_DeInit(void)
00091 {
00092   /* DeInitialize the accelerometer IO interfaces */
00093   if(AccelerometerDrv != NULL)
00094   {
00095     if(AccelerometerDrv->DeInit != NULL)
00096     {
00097       AccelerometerDrv->DeInit();
00098     }
00099   }
00100 }
00101
00102 /**
00103   * @brief  Set/Unset the ACCELERO in low power mode.
00104   * @param  status 0 means disable Low Power Mode, otherwise Low Power Mode is enabled
00105   * @retval None
00106   */
00107 void BSP_ACCELERO_LowPower(uint16_t status)
00108 {
00109   /* Set/Unset the ACCELERO in low power mode */
00110   if(AccelerometerDrv != NULL)
00111   {
00112     if(AccelerometerDrv->LowPower != NULL)
00113     {
00114       AccelerometerDrv->LowPower(status);
00115     }
00116   }
00117 }
00118
00119 /**
00120   * @brief  Get XYZ acceleration values.
00121   * @param  pDataXYZ Pointer on 3 angular accelerations table with
00122   *                  pDataXYZ[0] = X axis, pDataXYZ[1] = Y axis, pDataXYZ[2] = Z axis
00123   * @retval None
00124   */
00125 void BSP_ACCELERO_AccGetXYZ(int16_t *pDataXYZ)
00126 {
00127   if(AccelerometerDrv != NULL)
00128   {
00129     if(AccelerometerDrv->GetXYZ != NULL)
00130     {
00131       AccelerometerDrv->GetXYZ(pDataXYZ);
00132     }
00133   }
00134 }
00135 /**
00136   * @}
00137   */
00138
00139 /**
00140   * @}
00141   */
00142
00143 /**
00144   * @}
00145   */
00146
00147 /**
00148   * @}
00149   */
00150
00151 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Generated on Thu Nov 28 2019 16:15:09 for B-L475E-IOT01 BSP User Manual by doxygen 1.7.6.1


B-L475E-IOT01 BSP User Manual: stm32l475e_iot01_accelero.h Source File

  • File List
  • Globals
  • Firmware
  • Drivers
  • BSP
  • B-L475E-IOT01
stm32l475e_iot01_accelero.h
Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   * @file    stm32l475e_iot01_accelero.h
00004   * @author  MCD Application Team
00005   * @brief   This file provides a set of functions needed to manage the accelerometer sensor
00006   ******************************************************************************
00007   * @attention
00008   *
00009   * <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
00010   * All rights reserved.</center></h2>
00011   *
00012   * This software component is licensed by ST under BSD 3-Clause license,
00013   * the "License"; You may not use this file except in compliance with the
00014   * License. You may obtain a copy of the License at:
00015   *                        opensource.org/licenses/BSD-3-Clause
00016   *
00017   ******************************************************************************
00018   */
00019
00020 /* Define to prevent recursive inclusion -------------------------------------*/
00021 #ifndef __STM32L475E_IOT01_ACCELERO_H
00022 #define __STM32L475E_IOT01_ACCELERO_H
00023
00024 #ifdef __cplusplus
00025  extern "C" {
00026 #endif
00027
00028 /* Includes ------------------------------------------------------------------*/
00029 #include "stm32l475e_iot01.h"
00030 /* Include Accelero component driver */
00031 #include "../Components/lsm6dsl/lsm6dsl.h"
00032
00033 /** @addtogroup BSP
00034   * @{
00035   */
00036
00037 /** @addtogroup STM32L475E_IOT01
00038   * @{
00039   */
00040
00041 /** @addtogroup STM32L475E_IOT01_ACCELERO
00042   * @{
00043   */
00044
00045 /** @defgroup STM32L475_DISCOVERY_ACCELERO_Exported_Types ACCELERO Exported Types
00046   * @{
00047   */
00048 typedef enum
00049 {
00050   ACCELERO_OK = 0,
00051   ACCELERO_ERROR = 1,
00052   ACCELERO_TIMEOUT = 2
00053 }
00054 ACCELERO_StatusTypeDef;
00055
00056 /**
00057   * @}
00058   */
00059
00060 /** @defgroup STM32L475E_IOT01_ACCELERO_Exported_Functions ACCELERO Exported Functions
00061   * @{
00062   */
00063 /* Sensor Configuration Functions */
00064 ACCELERO_StatusTypeDef BSP_ACCELERO_Init(void);
00065 void BSP_ACCELERO_DeInit(void);
00066 void BSP_ACCELERO_LowPower(uint16_t status); /* 0 Means Disable Low Power Mode, otherwise Low Power Mode is enabled */
00067 void BSP_ACCELERO_AccGetXYZ(int16_t *pDataXYZ);
00068 /**
00069   * @}
00070   */
00071
00072 /**
00073   * @}
00074   */
00075
00076 /**
00077   * @}
00078   */
00079
00080 /**
00081   * @}
00082   */
00083 #ifdef __cplusplus
00084 }
00085 #endif
00086
00087 #endif /* __STM32L475E_IOT01_ACCELERO_H */
00088
00089 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Generated on Thu Nov 28 2019 16:15:09 for B-L475E-IOT01 BSP User Manual by doxygen 1.7.6.1


B-L475E-IOT01 BSP User Manual: stm32l475e_iot01_gyro.c Source File

  • File List
  • Globals
  • Firmware
  • Drivers
  • BSP
  • B-L475E-IOT01
stm32l475e_iot01_gyro.c
Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   * @file    stm32l475e_iot01_gyro.c
00004   * @author  MCD Application Team
00005   * @brief   This file provides a set of functions needed to manage the gyroscope sensor
00006   ******************************************************************************
00007   * @attention
00008   *
00009   * <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
00010   * All rights reserved.</center></h2>
00011   *
00012   * This software component is licensed by ST under BSD 3-Clause license,
00013   * the "License"; You may not use this file except in compliance with the
00014   * License. You may obtain a copy of the License at:
00015   *                        opensource.org/licenses/BSD-3-Clause
00016   *
00017   ******************************************************************************
00018   */
00019
00020 /* Includes ------------------------------------------------------------------*/
00021 #include "stm32l475e_iot01_gyro.h"
00022
00023 /** @addtogroup BSP
00024   * @{
00025   */
00026
00027 /** @addtogroup STM32L475E_IOT01
00028   * @{
00029   */
00030
00031 /** @defgroup STM32L475E_IOT01_GYROSCOPE GYROSCOPE
00032   * @{
00033   */
00034
00035 /** @defgroup STM32L475E_IOT01_GYROSCOPE_Private_Variables GYROSCOPE Private Variables
00036   * @{
00037   */
00038 static GYRO_DrvTypeDef *GyroscopeDrv;
00039
00040 /**
00041   * @}
00042   */
00043
00044
00045 /** @defgroup STM32L475E_IOT01_GYROSCOPE_Private_Functions GYROSCOPE Private Functions
00046   * @{
00047   */
00048 /**
00049   * @brief  Initialize Gyroscope.
00050   * @retval GYRO_OK or GYRO_ERROR
00051   */
00052 uint8_t BSP_GYRO_Init(void)
00053 {
00054   uint8_t ret = GYRO_ERROR;
00055   uint16_t ctrl = 0x0000;
00056   GYRO_InitTypeDef LSM6DSL_InitStructure;
00057
00058   if(Lsm6dslGyroDrv.ReadID() != LSM6DSL_ACC_GYRO_WHO_AM_I)
00059   {
00060     ret = GYRO_ERROR;
00061   }
00062   else
00063   {
00064     /* Initialize the gyroscope driver structure */
00065     GyroscopeDrv = &Lsm6dslGyroDrv;
00066
00067     /* Configure Mems : data rate, power mode, full scale and axes */
00068     LSM6DSL_InitStructure.Power_Mode = 0;
00069     LSM6DSL_InitStructure.Output_DataRate = LSM6DSL_ODR_52Hz;
00070     LSM6DSL_InitStructure.Axes_Enable = 0;
00071     LSM6DSL_InitStructure.Band_Width = 0;
00072     LSM6DSL_InitStructure.BlockData_Update = LSM6DSL_BDU_BLOCK_UPDATE;
00073     LSM6DSL_InitStructure.Endianness = 0;
00074     LSM6DSL_InitStructure.Full_Scale = LSM6DSL_GYRO_FS_2000;
00075
00076     /* Configure MEMS: data rate, full scale  */
00077     ctrl = (LSM6DSL_InitStructure.Full_Scale | LSM6DSL_InitStructure.Output_DataRate);
00078
00079     /* Configure MEMS: BDU and Auto-increment for multi read/write */
00080     ctrl |= ((LSM6DSL_InitStructure.BlockData_Update | LSM6DSL_ACC_GYRO_IF_INC_ENABLED) << 8);
00081
00082     /* Initialize component */
00083     GyroscopeDrv->Init(ctrl);
00084
00085     ret = GYRO_OK;
00086   }
00087
00088   return ret;
00089 }
00090
00091
00092 /**
00093   * @brief  DeInitialize Gyroscope.
00094   */
00095 void BSP_GYRO_DeInit(void)
00096 {
00097   /* DeInitialize the Gyroscope IO interfaces */
00098   if(GyroscopeDrv != NULL)
00099   {
00100     if(GyroscopeDrv->DeInit!= NULL)
00101     {
00102       GyroscopeDrv->DeInit();
00103     }
00104   }
00105 }
00106
00107
00108 /**
00109   * @brief  Set/Unset Gyroscope in low power mode.
00110   * @param  status 0 means disable Low Power Mode, otherwise Low Power Mode is enabled
00111   */
00112 void BSP_GYRO_LowPower(uint16_t status)
00113 {
00114   /* Set/Unset component in low-power mode */
00115   if(GyroscopeDrv != NULL)
00116   {
00117     if(GyroscopeDrv->LowPower!= NULL)
00118     {
00119       GyroscopeDrv->LowPower(status);
00120     }
00121   }
00122 }
00123
00124 /**
00125   * @brief  Get XYZ angular acceleration from the Gyroscope.
00126   * @param  pfData: pointer on floating array
00127   */
00128 void BSP_GYRO_GetXYZ(float* pfData)
00129 {
00130   if(GyroscopeDrv != NULL)
00131   {
00132     if(GyroscopeDrv->GetXYZ!= NULL)
00133     {
00134       GyroscopeDrv->GetXYZ(pfData);
00135     }
00136   }
00137 }
00138
00139 /**
00140   * @}
00141   */
00142
00143 /**
00144   * @}
00145   */
00146
00147 /**
00148   * @}
00149   */
00150
00151 /**
00152   * @}
00153   */
00154
00155 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Generated on Thu Nov 28 2019 16:15:09 for B-L475E-IOT01 BSP User Manual by doxygen 1.7.6.1


B-L475E-IOT01 BSP User Manual: stm32l475e_iot01_gyro.h Source File

  • File List
  • Globals
  • Firmware
  • Drivers
  • BSP
  • B-L475E-IOT01
stm32l475e_iot01_gyro.h
Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   * @file    stm32l475e_iot01_gyro.h
00004   * @author  MCD Application Team
00005   * @brief   This file contains definitions for the stm32l475e_iot01_gyro.c
00006   ******************************************************************************
00007   * @attention
00008   *
00009   * <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
00010   * All rights reserved.</center></h2>
00011   *
00012   * This software component is licensed by ST under BSD 3-Clause license,
00013   * the "License"; You may not use this file except in compliance with the
00014   * License. You may obtain a copy of the License at:
00015   *                        opensource.org/licenses/BSD-3-Clause
00016   *
00017   ******************************************************************************
00018   */
00019
00020 /* Define to prevent recursive inclusion -------------------------------------*/
00021 #ifndef __STM32L475E_IOT01_GYRO_H
00022 #define __STM32L475E_IOT01_GYRO_H
00023
00024 #ifdef __cplusplus
00025  extern "C" {
00026 #endif
00027
00028 /* Includes ------------------------------------------------------------------*/
00029 #include "stm32l475e_iot01.h"
00030 /* Include Gyro component driver */
00031 #include "../Components/lsm6dsl/lsm6dsl.h"
00032
00033 /** @addtogroup BSP
00034   * @{
00035   */
00036
00037 /** @addtogroup STM32L475E_IOT01
00038   * @{
00039   */
00040
00041 /** @addtogroup STM32L475E_IOT01_GYROSCOPE
00042   * @{
00043   */
00044
00045 /** @defgroup STM32L475_IOT01_GYROSCOPE_Exported_Constants GYROSCOPE Exported Constants
00046   * @{
00047   */
00048 typedef enum
00049 {
00050   GYRO_OK = 0,
00051   GYRO_ERROR = 1,
00052   GYRO_TIMEOUT = 2
00053 }
00054 GYRO_StatusTypeDef;
00055
00056 /**
00057   * @}
00058   */
00059
00060 /** @defgroup STM32L475E_IOT01_GYROSCOPE_Exported_Functions GYROSCOPE Exported Functions
00061   * @{
00062   */
00063 uint8_t BSP_GYRO_Init(void);
00064 void BSP_GYRO_DeInit(void);
00065 void BSP_GYRO_LowPower(uint16_t status);   /* 0 Means Disable Low Power Mode, otherwise Low Power Mode is enabled */
00066 void BSP_GYRO_GetXYZ(float* pfData);
00067 /**
00068   * @}
00069   */
00070
00071 /**
00072   * @}
00073   */
00074
00075 /**
00076   * @}
00077   */
00078
00079 /**
00080   * @}
00081   */
00082 #ifdef __cplusplus
00083 }
00084 #endif
00085
00086 #endif /* __STM32L475E_IOT01_GYRO_H */
00087
00088 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Generated on Thu Nov 28 2019 16:15:09 for B-L475E-IOT01 BSP User Manual by doxygen 1.7.6.1


B-L475E-IOT01 BSP User Manual: stm32l475e_iot01_hsensor.c Source File

  • File List
  • Globals
  • Firmware
  • Drivers
  • BSP
  • B-L475E-IOT01
stm32l475e_iot01_hsensor.c
Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   * @file    stm32l475e_iot01_hsensor.c
00004   * @author  MCD Application Team
00005   * @brief   This file provides a set of functions needed to manage the humidity sensor
00006   ******************************************************************************
00007   * @attention
00008   *
00009   * <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
00010   * All rights reserved.</center></h2>
00011   *
00012   * This software component is licensed by ST under BSD 3-Clause license,
00013   * the "License"; You may not use this file except in compliance with the
00014   * License. You may obtain a copy of the License at:
00015   *                        opensource.org/licenses/BSD-3-Clause
00016   *
00017   ******************************************************************************
00018   */
00019
00020 /* Includes ------------------------------------------------------------------*/
00021 #include "stm32l475e_iot01_hsensor.h"
00022
00023 /** @addtogroup BSP
00024   * @{
00025   */
00026
00027 /** @addtogroup STM32L475E_IOT01
00028   * @{
00029   */
00030
00031 /** @defgroup STM32L475E_IOT01_HUMIDITY HUMIDITY
00032   * @{
00033   */
00034
00035 /** @defgroup STM32L475E_IOT01_HUMIDITY_Private_Variables HUMIDITY Private Variables
00036   * @{
00037   */
00038 static HSENSOR_DrvTypeDef *Hsensor_drv;
00039 /**
00040   * @}
00041   */
00042
00043 /** @defgroup STM32L475E_IOT01_HUMIDITY_Private_Functions HUMIDITY Private Functions
00044   * @{
00045   */
00046
00047 /**
00048   * @brief  Initializes peripherals used by the I2C Humidity Sensor driver.
00049   * @retval HSENSOR status
00050   */
00051 uint32_t BSP_HSENSOR_Init(void)
00052 {
00053   uint32_t ret;
00054
00055   if(HTS221_H_Drv.ReadID(HTS221_I2C_ADDRESS) != HTS221_WHO_AM_I_VAL)
00056   {
00057     ret = HSENSOR_ERROR;
00058   }
00059   else
00060   {
00061     Hsensor_drv = &HTS221_H_Drv;
00062     /* HSENSOR Init */
00063     Hsensor_drv->Init(HTS221_I2C_ADDRESS);
00064     ret = HSENSOR_OK;
00065   }
00066
00067   return ret;
00068 }
00069
00070 /**
00071   * @brief  Read ID of HTS221.
00072   * @retval HTS221 ID value.
00073   */
00074 uint8_t BSP_HSENSOR_ReadID(void)
00075 {
00076   return Hsensor_drv->ReadID(HTS221_I2C_ADDRESS);
00077 }
00078
00079 /**
00080   * @brief  Read Humidity register of HTS221.
00081   * @retval HTS221 measured humidity value.
00082   */
00083 float BSP_HSENSOR_ReadHumidity(void)
00084 {
00085   return Hsensor_drv->ReadHumidity(HTS221_I2C_ADDRESS);
00086 }
00087 /**
00088   * @}
00089   */
00090
00091 /**
00092   * @}
00093   */
00094
00095 /**
00096   * @}
00097   */
00098
00099 /**
00100   * @}
00101   */
00102 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Generated on Thu Nov 28 2019 16:15:09 for B-L475E-IOT01 BSP User Manual by doxygen 1.7.6.1


B-L475E-IOT01 BSP User Manual: stm32l475e_iot01_hsensor.h Source File

  • File List
  • Globals
  • Firmware
  • Drivers
  • BSP
  • B-L475E-IOT01
stm32l475e_iot01_hsensor.h
Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   * @file    stm32l475e_iot01_hsensor.h
00004   * @author  MCD Application Team
00005   * @brief   This file provides a set of functions needed to manage the humidity sensor
00006   ******************************************************************************
00007   * @attention
00008   *
00009   * <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
00010   * All rights reserved.</center></h2>
00011   *
00012   * This software component is licensed by ST under BSD 3-Clause license,
00013   * the "License"; You may not use this file except in compliance with the
00014   * License. You may obtain a copy of the License at:
00015   *                        opensource.org/licenses/BSD-3-Clause
00016   *
00017   ******************************************************************************
00018   */
00019
00020 /* Define to prevent recursive inclusion -------------------------------------*/
00021 #ifndef __STM32L475E_IOT01_HSENSOR_H
00022 #define __STM32L475E_IOT01_HSENSOR_H
00023
00024 #ifdef __cplusplus
00025  extern "C" {
00026 #endif
00027
00028 /* Includes ------------------------------------------------------------------*/
00029 #include "stm32l475e_iot01.h"
00030 #include "../Components/hts221/hts221.h"
00031
00032 /** @addtogroup BSP
00033   * @{
00034   */
00035
00036 /** @addtogroup STM32L475E_IOT01
00037   * @{
00038   */
00039
00040 /** @addtogroup STM32L475E_IOT01_HUMIDITY
00041   * @{
00042   */
00043
00044 /* Exported types ------------------------------------------------------------*/
00045 /** @defgroup STM32L475E_IOT01_HUMIDITY_Exported_Types HUMIDITY Exported Types
00046   * @{
00047   */
00048
00049 /**
00050   * @brief  HSENSOR Status
00051   */
00052 typedef enum
00053 {
00054   HSENSOR_OK = 0,
00055   HSENSOR_ERROR
00056 }HSENSOR_Status_TypDef;
00057
00058 /**
00059   * @}
00060   */
00061
00062 /** @defgroup STM32L475E_IOT01_HUMIDITY_Exported_Functions HUMIDITY Exported Functions
00063   * @{
00064   */
00065 /* Sensor Configuration Functions */
00066 uint32_t BSP_HSENSOR_Init(void);
00067 uint8_t  BSP_HSENSOR_ReadID(void);
00068 float    BSP_HSENSOR_ReadHumidity(void);
00069 /**
00070   * @}
00071   */
00072
00073 #ifdef __cplusplus
00074 }
00075 #endif
00076
00077 /**
00078   * @}
00079   */
00080
00081 /**
00082   * @}
00083   */
00084
00085 /**
00086   * @}
00087   */
00088
00089 #endif /* __STM32L475E_IOT01_HSENSOR_H */
00090
00091 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Generated on Thu Nov 28 2019 16:15:09 for B-L475E-IOT01 BSP User Manual by doxygen 1.7.6.1


B-L475E-IOT01 BSP User Manual: stm32l475e_iot01_magneto.c Source File

  • File List
  • Globals
  • Firmware
  • Drivers
  • BSP
  • B-L475E-IOT01
stm32l475e_iot01_magneto.c
Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   * @file    stm32l475e_iot01_magneto.c
00004   * @author  MCD Application Team
00005   * @brief   This file provides a set of functions needed to manage the magnetometer sensor
00006   ******************************************************************************
00007   * @attention
00008   *
00009   * <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
00010   * All rights reserved.</center></h2>
00011   *
00012   * This software component is licensed by ST under BSD 3-Clause license,
00013   * the "License"; You may not use this file except in compliance with the
00014   * License. You may obtain a copy of the License at:
00015   *                        opensource.org/licenses/BSD-3-Clause
00016   *
00017   ******************************************************************************
00018   */
00019
00020 /* Includes ------------------------------------------------------------------*/
00021 #include "stm32l475e_iot01_magneto.h"
00022
00023 /** @addtogroup BSP
00024   * @{
00025   */
00026
00027 /** @addtogroup STM32L475E_IOT01
00028   * @{
00029   */
00030
00031 /** @defgroup STM32L475E_IOT01_MAGNETO MAGNETO
00032   * @{
00033   */
00034
00035 /** @defgroup STM32L475E_IOT01_MAGNETO_Private_Variables MAGNETO Private Variables
00036   * @{
00037   */
00038 static MAGNETO_DrvTypeDef  *MagnetoDrv;
00039 /**
00040   * @}
00041   */
00042
00043
00044 /** @defgroup STM32L475E_IOT01_MAGNETO_Private_Functions MAGNETO Private Functions
00045   * @{
00046   */
00047
00048 /**
00049  * @brief Initialize a magnetometer sensor
00050  * @retval COMPONENT_ERROR in case of failure
00051  */
00052 MAGNETO_StatusTypeDef BSP_MAGNETO_Init(void)
00053 {
00054   MAGNETO_StatusTypeDef ret = MAGNETO_OK;
00055   MAGNETO_InitTypeDef LIS3MDL_InitStructureMag;
00056
00057   if(Lis3mdlMagDrv.ReadID() != I_AM_LIS3MDL)
00058   {
00059     ret = MAGNETO_ERROR;
00060   }
00061   else
00062   {
00063     /* Initialize the MAGNETO magnetometer driver structure */
00064     MagnetoDrv = &Lis3mdlMagDrv;
00065
00066     /* MEMS configuration ------------------------------------------------------*/
00067     /* Fill the MAGNETO magnetometer structure */
00068     LIS3MDL_InitStructureMag.Register1 = LIS3MDL_MAG_TEMPSENSOR_DISABLE | LIS3MDL_MAG_OM_XY_HIGH | LIS3MDL_MAG_ODR_40_HZ;
00069     LIS3MDL_InitStructureMag.Register2 = LIS3MDL_MAG_FS_4_GA | LIS3MDL_MAG_REBOOT_DEFAULT | LIS3MDL_MAG_SOFT_RESET_DEFAULT;
00070     LIS3MDL_InitStructureMag.Register3 = LIS3MDL_MAG_CONFIG_NORMAL_MODE | LIS3MDL_MAG_CONTINUOUS_MODE;
00071     LIS3MDL_InitStructureMag.Register4 = LIS3MDL_MAG_OM_Z_HIGH | LIS3MDL_MAG_BLE_LSB;
00072     LIS3MDL_InitStructureMag.Register5 = LIS3MDL_MAG_BDU_MSBLSB;
00073     /* Configure the MAGNETO magnetometer main parameters */
00074     MagnetoDrv->Init(LIS3MDL_InitStructureMag);
00075   }
00076
00077   return ret;
00078 }
00079
00080 /**
00081   * @brief  DeInitialize the MAGNETO.
00082   */
00083 void BSP_MAGNETO_DeInit(void)
00084 {
00085   /* DeInitialize the  magnetometer IO interfaces */
00086   if(MagnetoDrv != NULL)
00087   {
00088     if(MagnetoDrv->DeInit != NULL)
00089     {
00090       MagnetoDrv->DeInit();
00091     }
00092   }
00093 }
00094
00095 /**
00096   * @brief  Set/Unset the MAGNETO in low power mode.
00097   */
00098 void BSP_MAGNETO_LowPower(uint16_t status)
00099 {
00100   /* Put the magnetometer in low power mode */
00101   if(MagnetoDrv != NULL)
00102   {
00103     if(MagnetoDrv->LowPower != NULL)
00104     {
00105       MagnetoDrv->LowPower(status);
00106     }
00107   }
00108 }
00109
00110 /**
00111   * @brief  Get XYZ magnetometer values.
00112   * @param  pDataXYZ Pointer on 3 magnetometer values table with
00113   *                  pDataXYZ[0] = X axis, pDataXYZ[1] = Y axis, pDataXYZ[2] = Z axis
00114   */
00115 void BSP_MAGNETO_GetXYZ(int16_t *pDataXYZ)
00116 {
00117   if(MagnetoDrv != NULL)
00118   {
00119     if(MagnetoDrv->GetXYZ != NULL)
00120     {
00121       MagnetoDrv->GetXYZ(pDataXYZ);
00122     }
00123   }
00124 }
00125
00126 /**
00127   * @}
00128   */
00129
00130 /**
00131   * @}
00132   */
00133
00134 /**
00135   * @}
00136   */
00137
00138 /**
00139   * @}
00140   */
00141 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Generated on Thu Nov 28 2019 16:15:09 for B-L475E-IOT01 BSP User Manual by doxygen 1.7.6.1


B-L475E-IOT01 BSP User Manual: stm32l475e_iot01_magneto.h Source File

  • File List
  • Globals
  • Firmware
  • Drivers
  • BSP
  • B-L475E-IOT01
stm32l475e_iot01_magneto.h
Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   * @file    stm32l475e_iot01_magneto.h
00004   * @author  MCD Application Team
00005   * @brief   This file provides a set of functions needed to manage the magnetometer sensor
00006   ******************************************************************************
00007   * @attention
00008   *
00009   * <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
00010   * All rights reserved.</center></h2>
00011   *
00012   * This software component is licensed by ST under BSD 3-Clause license,
00013   * the "License"; You may not use this file except in compliance with the
00014   * License. You may obtain a copy of the License at:
00015   *                        opensource.org/licenses/BSD-3-Clause
00016   *
00017   ******************************************************************************
00018   */
00019
00020 /* Define to prevent recursive inclusion -------------------------------------*/
00021 #ifndef __STM32L475E_IOT01_MAGNETO_H
00022 #define __STM32L475E_IOT01_MAGNETO_H
00023
00024 #ifdef __cplusplus
00025  extern "C" {
00026 #endif
00027
00028 /* Includes ------------------------------------------------------------------*/
00029 #include "stm32l475e_iot01.h"
00030 /* Include Magnetometer component driver */
00031 #include "../Components/lis3mdl/lis3mdl.h"
00032
00033 /** @addtogroup BSP
00034   * @{
00035   */
00036
00037 /** @addtogroup STM32L475E_IOT01
00038   * @{
00039   */
00040
00041 /** @addtogroup STM32L475E_IOT01_MAGNETO
00042   * @{
00043   */
00044
00045 /** @defgroup STM32L475_IOT01_MAGNETO_Exported_Types MAGNETO Exported Types
00046   * @{
00047   */
00048 /* Exported types ------------------------------------------------------------*/
00049 typedef enum
00050 {
00051   MAGNETO_OK = 0,
00052   MAGNETO_ERROR = 1,
00053   MAGNETO_TIMEOUT = 2
00054 }
00055 MAGNETO_StatusTypeDef;
00056 /**
00057   * @}
00058   */
00059
00060 /** @defgroup STM32L475E_IOT01_MAGNETO_Exported_Functions MAGNETO Exported Functions
00061   * @{
00062   */
00063 MAGNETO_StatusTypeDef BSP_MAGNETO_Init(void);
00064 void BSP_MAGNETO_DeInit(void);
00065 void BSP_MAGNETO_LowPower(uint16_t status); /* 0 Means Disable Low Power Mode, otherwise Low Power Mode is enabled */
00066 void BSP_MAGNETO_GetXYZ(int16_t *pDataXYZ);
00067 /**
00068   * @}
00069   */
00070
00071 /**
00072   * @}
00073   */
00074
00075 /**
00076   * @}
00077   */
00078
00079 /**
00080   * @}
00081   */
00082
00083 #ifdef __cplusplus
00084 }
00085 #endif
00086
00087 #endif /* __STM32L475E_IOT01_MAGNETO_H */
00088
00089 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Generated on Thu Nov 28 2019 16:15:09 for B-L475E-IOT01 BSP User Manual by doxygen 1.7.6.1


B-L475E-IOT01 BSP User Manual: stm32l475e_iot01_psensor.c Source File

  • File List
  • Globals
  • Firmware
  • Drivers
  • BSP
  • B-L475E-IOT01
stm32l475e_iot01_psensor.c
Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   * @file    stm32l475e_iot01_psensor.c
00004   * @author  MCD Application Team
00005   * @brief   This file provides a set of functions needed to manage the pressure sensor
00006   ******************************************************************************
00007   * @attention
00008   *
00009   * <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
00010   * All rights reserved.</center></h2>
00011   *
00012   * This software component is licensed by ST under BSD 3-Clause license,
00013   * the "License"; You may not use this file except in compliance with the
00014   * License. You may obtain a copy of the License at:
00015   *                        opensource.org/licenses/BSD-3-Clause
00016   *
00017   ******************************************************************************
00018   */
00019
00020 /* Includes ------------------------------------------------------------------*/
00021 #include "stm32l475e_iot01_psensor.h"
00022
00023 /** @addtogroup BSP
00024   * @{
00025   */
00026
00027 /** @addtogroup STM32L475E_IOT01
00028   * @{
00029   */
00030
00031 /** @defgroup STM32L475E_IOT01_PRESSURE PRESSURE
00032   * @{
00033   */
00034
00035 /** @defgroup STM32L475E_IOT01_PRESSURE_Private_Variables PRESSURE Private Variables
00036   * @{
00037   */
00038 static PSENSOR_DrvTypeDef *Psensor_drv;
00039 /**
00040   * @}
00041   */
00042
00043 /** @defgroup STM32L475E_IOT01_PRESSURE_Private_Functions PRESSURE Private Functions
00044   * @{
00045   */
00046
00047 /**
00048   * @brief  Initializes peripherals used by the I2C Pressure Sensor driver.
00049   * @retval PSENSOR status
00050   */
00051 uint32_t BSP_PSENSOR_Init(void)
00052 {
00053   uint32_t ret;
00054
00055   if(LPS22HB_P_Drv.ReadID(LPS22HB_I2C_ADDRESS) != LPS22HB_WHO_AM_I_VAL)
00056   {
00057     ret = PSENSOR_ERROR;
00058   }
00059   else
00060   {
00061      Psensor_drv = &LPS22HB_P_Drv;
00062
00063     /* PSENSOR Init */
00064     Psensor_drv->Init(LPS22HB_I2C_ADDRESS);
00065     ret = PSENSOR_OK;
00066   }
00067
00068   return ret;
00069 }
00070
00071 /**
00072   * @brief  Read ID of LPS22HB.
00073   * @retval LPS22HB ID value.
00074   */
00075 uint8_t BSP_PSENSOR_ReadID(void)
00076 {
00077   return Psensor_drv->ReadID(LPS22HB_I2C_ADDRESS);
00078 }
00079
00080 /**
00081   * @brief  Read Pressure register of LPS22HB.
00082   * @retval LPS22HB measured pressure value.
00083   */
00084 float BSP_PSENSOR_ReadPressure(void)
00085 {
00086   return Psensor_drv->ReadPressure(LPS22HB_I2C_ADDRESS);
00087 }
00088 /**
00089   * @}
00090   */
00091
00092 /**
00093   * @}
00094   */
00095
00096 /**
00097   * @}
00098   */
00099
00100 /**
00101   * @}
00102   */
00103 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Generated on Thu Nov 28 2019 16:15:09 for B-L475E-IOT01 BSP User Manual by doxygen 1.7.6.1


B-L475E-IOT01 BSP User Manual: stm32l475e_iot01_psensor.h Source File

  • File List
  • Globals
  • Firmware
  • Drivers
  • BSP
  • B-L475E-IOT01
stm32l475e_iot01_psensor.h
Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   * @file    stm32l475e_iot01_psensor.h
00004   * @author  MCD Application Team
00005   * @brief   This file provides a set of functions needed to manage the pressure sensor
00006   ******************************************************************************
00007   * @attention
00008   *
00009   * <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
00010   * All rights reserved.</center></h2>
00011   *
00012   * This software component is licensed by ST under BSD 3-Clause license,
00013   * the "License"; You may not use this file except in compliance with the
00014   * License. You may obtain a copy of the License at:
00015   *                        opensource.org/licenses/BSD-3-Clause
00016   *
00017   ******************************************************************************
00018   */
00019
00020 /* Define to prevent recursive inclusion -------------------------------------*/
00021 #ifndef __STM32L475E_IOT01_PSENSOR_H
00022 #define __STM32L475E_IOT01_PSENSOR_H
00023
00024 #ifdef __cplusplus
00025  extern "C" {
00026 #endif
00027
00028 /* Includes ------------------------------------------------------------------*/
00029 #include "stm32l475e_iot01.h"
00030 #include "../Components/lps22hb/lps22hb.h"
00031
00032 /** @addtogroup BSP
00033   * @{
00034   */
00035
00036 /** @addtogroup STM32L475E_IOT01
00037   * @{
00038   */
00039
00040 /** @addtogroup STM32L475E_IOT01_PRESSURE
00041   * @{
00042   */
00043
00044 /* Exported types ------------------------------------------------------------*/
00045 /** @defgroup STM32L475E_IOT01_PRESSURE_Exported_Types PRESSURE Exported Types
00046   * @{
00047   */
00048
00049 /**
00050   * @brief  PSENSOR Status
00051   */
00052 typedef enum
00053 {
00054   PSENSOR_OK = 0,
00055   PSENSOR_ERROR
00056 }PSENSOR_Status_TypDef;
00057
00058 /**
00059   * @}
00060   */
00061
00062 /** @defgroup STM32L475E_IOT01_PRESSURE_Exported_Functions PRESSURE Exported Functions
00063   * @{
00064   */
00065 /* Sensor Configuration Functions */
00066 uint32_t BSP_PSENSOR_Init(void);
00067 uint8_t  BSP_PSENSOR_ReadID(void);
00068 float    BSP_PSENSOR_ReadPressure(void);
00069 /**
00070   * @}
00071   */
00072
00073 /**
00074   * @}
00075   */
00076
00077 /**
00078   * @}
00079   */
00080
00081 /**
00082   * @}
00083   */
00084
00085 #ifdef __cplusplus
00086 }
00087 #endif
00088
00089 #endif /* __STM32L475E_IOT01_PSENSOR_H */
00090
00091 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Generated on Thu Nov 28 2019 16:15:09 for B-L475E-IOT01 BSP User Manual by doxygen 1.7.6.1


B-L475E-IOT01 BSP User Manual: stm32l475e_iot01_qspi.c Source File

  • File List
  • Globals
  • Firmware
  • Drivers
  • BSP
  • B-L475E-IOT01
stm32l475e_iot01_qspi.c
Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   * @file    stm32l475e_iot01_qspi.c
00004   * @author  MCD Application Team
00005   * @brief   This file includes a standard driver for the MX25R6435F QSPI
00006   *          memory mounted on STM32L475E IOT01 board.
00007   @verbatim
00008   ==============================================================================
00009                      ##### How to use this driver #####
00010   ==============================================================================
00011   [..]
00012    (#) This driver is used to drive the MX25R6435F QSPI external
00013        memory mounted on STM32L475E IOT01 board.
00014
00015    (#) This driver need a specific component driver (MX25R6435F) to be included with.
00016
00017    (#) Initialization steps:
00018        (++) Initialize the QPSI external memory using the BSP_QSPI_Init() function. This
00019             function includes the MSP layer hardware resources initialization and the
00020             QSPI interface with the external memory. The BSP_QSPI_DeInit() can be used
00021             to deactivate the QSPI interface.
00022
00023    (#) QSPI memory operations
00024        (++) QSPI memory can be accessed with read/write operations once it is
00025             initialized.
00026             Read/write operation can be performed with AHB access using the functions
00027             BSP_QSPI_Read()/BSP_QSPI_Write().
00028        (++) The function to the QSPI memory in memory-mapped mode is possible after
00029             the call of the function BSP_QSPI_EnableMemoryMappedMode().
00030        (++) The function BSP_QSPI_GetInfo() returns the configuration of the QSPI memory.
00031             (see the QSPI memory data sheet)
00032        (++) Perform erase block operation using the function BSP_QSPI_Erase_Block() and by
00033             specifying the block address. You can perform an erase operation of the whole
00034             chip by calling the function BSP_QSPI_Erase_Chip().
00035        (++) The function BSP_QSPI_GetStatus() returns the current status of the QSPI memory.
00036             (see the QSPI memory data sheet)
00037        (++) Perform erase sector operation using the function BSP_QSPI_Erase_Sector()
00038             which is not blocking. So the function BSP_QSPI_GetStatus() should be used
00039             to check if the memory is busy, and the functions BSP_QSPI_SuspendErase()/
00040             BSP_QSPI_ResumeErase() can be used to perform other operations during the
00041             sector erase.
00042        (++) Deep power down of the QSPI memory is managed with the call of the functions
00043             BSP_QSPI_EnterDeepPowerDown()/BSP_QSPI_LeaveDeepPowerDown()
00044   @endverbatim
00045   ******************************************************************************
00046   * @attention
00047   *
00048   * <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
00049   * All rights reserved.</center></h2>
00050   *
00051   * This software component is licensed by ST under BSD 3-Clause license,
00052   * the "License"; You may not use this file except in compliance with the
00053   * License. You may obtain a copy of the License at:
00054   *                        opensource.org/licenses/BSD-3-Clause
00055   *
00056   ******************************************************************************
00057   */
00058
00059 /* Includes ------------------------------------------------------------------*/
00060 #include "stm32l475e_iot01_qspi.h"
00061
00062 /** @addtogroup BSP
00063   * @{
00064   */
00065
00066 /** @addtogroup STM32L475E_IOT01
00067   * @{
00068   */
00069
00070 /** @defgroup STM32L475E_IOT01_QSPI QSPI
00071   * @{
00072   */
00073
00074 /* Private constants --------------------------------------------------------*/
00075 /** @defgroup STM32L475E_IOT01_QSPI_Private_Constants QSPI Private Constants
00076   * @{
00077   */
00078 #define QSPI_QUAD_DISABLE       0x0
00079 #define QSPI_QUAD_ENABLE        0x1
00080
00081 #define QSPI_HIGH_PERF_DISABLE  0x0
00082 #define QSPI_HIGH_PERF_ENABLE   0x1
00083 /**
00084   * @}
00085   */
00086 /* Private variables ---------------------------------------------------------*/
00087
00088 /** @defgroup STM32L475E_IOT01_QSPI_Private_Variables QSPI Private Variables
00089   * @{
00090   */
00091 QSPI_HandleTypeDef QSPIHandle;
00092
00093 /**
00094   * @}
00095   */
00096
00097
00098 /* Private functions ---------------------------------------------------------*/
00099
00100 /** @defgroup STM32L475E_IOT01_QSPI_Private_Functions QSPI Private Functions
00101   * @{
00102   */
00103 static uint8_t QSPI_ResetMemory        (QSPI_HandleTypeDef *hqspi);
00104 static uint8_t QSPI_WriteEnable        (QSPI_HandleTypeDef *hqspi);
00105 static uint8_t QSPI_AutoPollingMemReady(QSPI_HandleTypeDef *hqspi, uint32_t Timeout);
00106 static uint8_t QSPI_QuadMode           (QSPI_HandleTypeDef *hqspi, uint8_t Operation);
00107 static uint8_t QSPI_HighPerfMode       (QSPI_HandleTypeDef *hqspi, uint8_t Operation);
00108
00109 /**
00110   * @}
00111   */
00112
00113 /* Exported functions ---------------------------------------------------------*/
00114
00115 /** @addtogroup STM32L475E_IOT01_QSPI_Exported_Functions
00116   * @{
00117   */
00118
00119 /**
00120   * @brief  Initializes the QSPI interface.
00121   * @retval QSPI memory status
00122   */
00123 uint8_t BSP_QSPI_Init(void)
00124 {
00125   QSPIHandle.Instance = QUADSPI;
00126
00127   /* Call the DeInit function to reset the driver */
00128   if (HAL_QSPI_DeInit(&QSPIHandle) != HAL_OK)
00129   {
00130     return QSPI_ERROR;
00131   }
00132
00133   /* System level initialization */
00134   BSP_QSPI_MspInit();
00135
00136   /* QSPI initialization */
00137   QSPIHandle.Init.ClockPrescaler     = 2; /* QSPI clock = 80MHz / (ClockPrescaler+1) = 26.67MHz */
00138   QSPIHandle.Init.FifoThreshold      = 4;
00139   QSPIHandle.Init.SampleShifting     = QSPI_SAMPLE_SHIFTING_HALFCYCLE;
00140   QSPIHandle.Init.FlashSize          = POSITION_VAL(MX25R6435F_FLASH_SIZE) - 1;
00141   QSPIHandle.Init.ChipSelectHighTime = QSPI_CS_HIGH_TIME_1_CYCLE;
00142   QSPIHandle.Init.ClockMode          = QSPI_CLOCK_MODE_0;
00143
00144   if (HAL_QSPI_Init(&QSPIHandle) != HAL_OK)
00145   {
00146     return QSPI_ERROR;
00147   }
00148
00149   /* QSPI memory reset */
00150   if (QSPI_ResetMemory(&QSPIHandle) != QSPI_OK)
00151   {
00152     return QSPI_NOT_SUPPORTED;
00153   }
00154
00155   /* QSPI quad enable */
00156   if (QSPI_QuadMode(&QSPIHandle, QSPI_QUAD_ENABLE) != QSPI_OK)
00157   {
00158     return QSPI_ERROR;
00159   }
00160
00161   /* High performance mode enable */
00162   if (QSPI_HighPerfMode(&QSPIHandle, QSPI_HIGH_PERF_ENABLE) != QSPI_OK)
00163   {
00164     return QSPI_ERROR;
00165   }
00166
00167   /* Re-configure the clock for the high performance mode */
00168   QSPIHandle.Init.ClockPrescaler = 1; /* QSPI clock = 80MHz / (ClockPrescaler+1) = 40MHz */
00169
00170   if (HAL_QSPI_Init(&QSPIHandle) != HAL_OK)
00171   {
00172     return QSPI_ERROR;
00173   }
00174
00175   return QSPI_OK;
00176 }
00177
00178 /**
00179   * @brief  De-Initializes the QSPI interface.
00180   * @retval QSPI memory status
00181   */
00182 uint8_t BSP_QSPI_DeInit(void)
00183 {
00184   QSPIHandle.Instance = QUADSPI;
00185
00186   /* Call the DeInit function to reset the driver */
00187   if (HAL_QSPI_DeInit(&QSPIHandle) != HAL_OK)
00188   {
00189     return QSPI_ERROR;
00190   }
00191
00192   /* System level De-initialization */
00193   BSP_QSPI_MspDeInit();
00194
00195   return QSPI_OK;
00196 }
00197
00198 /**
00199   * @brief  Reads an amount of data from the QSPI memory.
00200   * @param  pData    : Pointer to data to be read
00201   * @param  ReadAddr : Read start address
00202   * @param  Size     : Size of data to read
00203   * @retval QSPI memory status
00204   */
00205 uint8_t BSP_QSPI_Read(uint8_t* pData, uint32_t ReadAddr, uint32_t Size)
00206 {
00207   QSPI_CommandTypeDef sCommand;
00208
00209   /* Initialize the read command */
00210   sCommand.InstructionMode    = QSPI_INSTRUCTION_1_LINE;
00211   sCommand.Instruction        = QUAD_INOUT_READ_CMD;
00212   sCommand.AddressMode        = QSPI_ADDRESS_4_LINES;
00213   sCommand.AddressSize        = QSPI_ADDRESS_24_BITS;
00214   sCommand.Address            = ReadAddr;
00215   sCommand.AlternateByteMode  = QSPI_ALTERNATE_BYTES_4_LINES;
00216   sCommand.AlternateBytesSize = QSPI_ALTERNATE_BYTES_8_BITS;
00217   sCommand.AlternateBytes     = MX25R6435F_ALT_BYTES_NO_PE_MODE;
00218   sCommand.DataMode           = QSPI_DATA_4_LINES;
00219   sCommand.DummyCycles        = MX25R6435F_DUMMY_CYCLES_READ_QUAD;
00220   sCommand.NbData             = Size;
00221   sCommand.DdrMode            = QSPI_DDR_MODE_DISABLE;
00222   sCommand.DdrHoldHalfCycle   = QSPI_DDR_HHC_ANALOG_DELAY;
00223   sCommand.SIOOMode           = QSPI_SIOO_INST_EVERY_CMD;
00224
00225   /* Configure the command */
00226   if (HAL_QSPI_Command(&QSPIHandle, &sCommand, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK)
00227   {
00228     return QSPI_ERROR;
00229   }
00230
00231   /* Reception of the data */
00232   if (HAL_QSPI_Receive(&QSPIHandle, pData, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK)
00233   {
00234     return QSPI_ERROR;
00235   }
00236
00237   return QSPI_OK;
00238 }
00239
00240 /**
00241   * @brief  Writes an amount of data to the QSPI memory.
00242   * @param  pData     : Pointer to data to be written
00243   * @param  WriteAddr : Write start address
00244   * @param  Size      : Size of data to write
00245   * @retval QSPI memory status
00246   */
00247 uint8_t BSP_QSPI_Write(uint8_t* pData, uint32_t WriteAddr, uint32_t Size)
00248 {
00249   QSPI_CommandTypeDef sCommand;
00250   uint32_t end_addr, current_size, current_addr;
00251
00252   /* Calculation of the size between the write address and the end of the page */
00253   current_size = MX25R6435F_PAGE_SIZE - (WriteAddr % MX25R6435F_PAGE_SIZE);
00254
00255   /* Check if the size of the data is less than the remaining place in the page */
00256   if (current_size > Size)
00257   {
00258     current_size = Size;
00259   }
00260
00261   /* Initialize the adress variables */
00262   current_addr = WriteAddr;
00263   end_addr = WriteAddr + Size;
00264
00265   /* Initialize the program command */
00266   sCommand.InstructionMode   = QSPI_INSTRUCTION_1_LINE;
00267   sCommand.Instruction       = QUAD_PAGE_PROG_CMD;
00268   sCommand.AddressMode       = QSPI_ADDRESS_4_LINES;
00269   sCommand.AddressSize       = QSPI_ADDRESS_24_BITS;
00270   sCommand.AlternateByteMode = QSPI_ALTERNATE_BYTES_NONE;
00271   sCommand.DataMode          = QSPI_DATA_4_LINES;
00272   sCommand.DummyCycles       = 0;
00273   sCommand.DdrMode           = QSPI_DDR_MODE_DISABLE;
00274   sCommand.DdrHoldHalfCycle  = QSPI_DDR_HHC_ANALOG_DELAY;
00275   sCommand.SIOOMode          = QSPI_SIOO_INST_EVERY_CMD;
00276
00277   /* Perform the write page by page */
00278   do
00279   {
00280     sCommand.Address = current_addr;
00281     sCommand.NbData  = current_size;
00282
00283     /* Enable write operations */
00284     if (QSPI_WriteEnable(&QSPIHandle) != QSPI_OK)
00285     {
00286       return QSPI_ERROR;
00287     }
00288
00289     /* Configure the command */
00290     if (HAL_QSPI_Command(&QSPIHandle, &sCommand, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK)
00291     {
00292       return QSPI_ERROR;
00293     }
00294
00295     /* Transmission of the data */
00296     if (HAL_QSPI_Transmit(&QSPIHandle, pData, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK)
00297     {
00298       return QSPI_ERROR;
00299     }
00300
00301     /* Configure automatic polling mode to wait for end of program */
00302     if (QSPI_AutoPollingMemReady(&QSPIHandle, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != QSPI_OK)
00303     {
00304       return QSPI_ERROR;
00305     }
00306
00307     /* Update the address and size variables for next page programming */
00308     current_addr += current_size;
00309     pData += current_size;
00310     current_size = ((current_addr + MX25R6435F_PAGE_SIZE) > end_addr) ? (end_addr - current_addr) : MX25R6435F_PAGE_SIZE;
00311   } while (current_addr < end_addr);
00312
00313   return QSPI_OK;
00314 }
00315
00316 /**
00317   * @brief  Erases the specified block of the QSPI memory.
00318   * @param  BlockAddress : Block address to erase
00319   * @retval QSPI memory status
00320   */
00321 uint8_t BSP_QSPI_Erase_Block(uint32_t BlockAddress)
00322 {
00323   QSPI_CommandTypeDef sCommand;
00324
00325   /* Initialize the erase command */
00326   sCommand.InstructionMode   = QSPI_INSTRUCTION_1_LINE;
00327   sCommand.Instruction       = BLOCK_ERASE_CMD;
00328   sCommand.AddressMode       = QSPI_ADDRESS_1_LINE;
00329   sCommand.AddressSize       = QSPI_ADDRESS_24_BITS;
00330   sCommand.Address           = BlockAddress;
00331   sCommand.AlternateByteMode = QSPI_ALTERNATE_BYTES_NONE;
00332   sCommand.DataMode          = QSPI_DATA_NONE;
00333   sCommand.DummyCycles       = 0;
00334   sCommand.DdrMode           = QSPI_DDR_MODE_DISABLE;
00335   sCommand.DdrHoldHalfCycle  = QSPI_DDR_HHC_ANALOG_DELAY;
00336   sCommand.SIOOMode          = QSPI_SIOO_INST_EVERY_CMD;
00337
00338   /* Enable write operations */
00339   if (QSPI_WriteEnable(&QSPIHandle) != QSPI_OK)
00340   {
00341     return QSPI_ERROR;
00342   }
00343
00344   /* Send the command */
00345   if (HAL_QSPI_Command(&QSPIHandle, &sCommand, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK)
00346   {
00347     return QSPI_ERROR;
00348   }
00349
00350   /* Configure automatic polling mode to wait for end of erase */
00351   if (QSPI_AutoPollingMemReady(&QSPIHandle, MX25R6435F_BLOCK_ERASE_MAX_TIME) != QSPI_OK)
00352   {
00353     return QSPI_ERROR;
00354   }
00355
00356   return QSPI_OK;
00357 }
00358
00359 /**
00360   * @brief  Erases the specified sector of the QSPI memory.
00361   * @param  Sector : Sector address to erase (0 to 255)
00362   * @retval QSPI memory status
00363   * @note This function is non blocking meaning that sector erase
00364   *       operation is started but not completed when the function
00365   *       returns. Application has to call BSP_QSPI_GetStatus()
00366   *       to know when the device is available again (i.e. erase operation
00367   *       completed).
00368   */
00369 uint8_t BSP_QSPI_Erase_Sector(uint32_t Sector)
00370 {
00371   QSPI_CommandTypeDef sCommand;
00372
00373   if (Sector >= (uint32_t)(MX25R6435F_FLASH_SIZE/MX25R6435F_SECTOR_SIZE))
00374   {
00375     return QSPI_ERROR;
00376   }
00377
00378   /* Initialize the erase command */
00379   sCommand.InstructionMode   = QSPI_INSTRUCTION_1_LINE;
00380   sCommand.Instruction       = SECTOR_ERASE_CMD;
00381   sCommand.AddressMode       = QSPI_ADDRESS_1_LINE;
00382   sCommand.AddressSize       = QSPI_ADDRESS_24_BITS;
00383   sCommand.Address           = (Sector * MX25R6435F_SECTOR_SIZE);
00384   sCommand.AlternateByteMode = QSPI_ALTERNATE_BYTES_NONE;
00385   sCommand.DataMode          = QSPI_DATA_NONE;
00386   sCommand.DummyCycles       = 0;
00387   sCommand.DdrMode           = QSPI_DDR_MODE_DISABLE;
00388   sCommand.DdrHoldHalfCycle  = QSPI_DDR_HHC_ANALOG_DELAY;
00389   sCommand.SIOOMode          = QSPI_SIOO_INST_EVERY_CMD;
00390
00391   /* Enable write operations */
00392   if (QSPI_WriteEnable(&QSPIHandle) != QSPI_OK)
00393   {
00394     return QSPI_ERROR;
00395   }
00396
00397   /* Send the command */
00398   if (HAL_QSPI_Command(&QSPIHandle, &sCommand, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK)
00399   {
00400     return QSPI_ERROR;
00401   }
00402
00403   return QSPI_OK;
00404 }
00405
00406 /**
00407   * @brief  Erases the entire QSPI memory.
00408   * @retval QSPI memory status
00409   */
00410 uint8_t BSP_QSPI_Erase_Chip(void)
00411 {
00412   QSPI_CommandTypeDef sCommand;
00413
00414   /* Initialize the erase command */
00415   sCommand.InstructionMode   = QSPI_INSTRUCTION_1_LINE;
00416   sCommand.Instruction       = CHIP_ERASE_CMD;
00417   sCommand.AddressMode       = QSPI_ADDRESS_NONE;
00418   sCommand.AlternateByteMode = QSPI_ALTERNATE_BYTES_NONE;
00419   sCommand.DataMode          = QSPI_DATA_NONE;
00420   sCommand.DummyCycles       = 0;
00421   sCommand.DdrMode           = QSPI_DDR_MODE_DISABLE;
00422   sCommand.DdrHoldHalfCycle  = QSPI_DDR_HHC_ANALOG_DELAY;
00423   sCommand.SIOOMode          = QSPI_SIOO_INST_EVERY_CMD;
00424
00425   /* Enable write operations */
00426   if (QSPI_WriteEnable(&QSPIHandle) != QSPI_OK)
00427   {
00428     return QSPI_ERROR;
00429   }
00430
00431   /* Send the command */
00432   if (HAL_QSPI_Command(&QSPIHandle, &sCommand, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK)
00433   {
00434     return QSPI_ERROR;
00435   }
00436
00437   /* Configure automatic polling mode to wait for end of erase */
00438   if (QSPI_AutoPollingMemReady(&QSPIHandle, MX25R6435F_CHIP_ERASE_MAX_TIME) != QSPI_OK)
00439   {
00440     return QSPI_ERROR;
00441   }
00442
00443   return QSPI_OK;
00444 }
00445
00446 /**
00447   * @brief  Reads current status of the QSPI memory.
00448   * @retval QSPI memory status
00449   */
00450 uint8_t BSP_QSPI_GetStatus(void)
00451 {
00452   QSPI_CommandTypeDef sCommand;
00453   uint8_t reg;
00454
00455   /* Initialize the read security register command */
00456   sCommand.InstructionMode   = QSPI_INSTRUCTION_1_LINE;
00457   sCommand.Instruction       = READ_SEC_REG_CMD;
00458   sCommand.AddressMode       = QSPI_ADDRESS_NONE;
00459   sCommand.AlternateByteMode = QSPI_ALTERNATE_BYTES_NONE;
00460   sCommand.DataMode          = QSPI_DATA_1_LINE;
00461   sCommand.DummyCycles       = 0;
00462   sCommand.NbData            = 1;
00463   sCommand.DdrMode           = QSPI_DDR_MODE_DISABLE;
00464   sCommand.DdrHoldHalfCycle  = QSPI_DDR_HHC_ANALOG_DELAY;
00465   sCommand.SIOOMode          = QSPI_SIOO_INST_EVERY_CMD;
00466
00467   /* Configure the command */
00468   if (HAL_QSPI_Command(&QSPIHandle, &sCommand, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK)
00469   {
00470     return QSPI_ERROR;
00471   }
00472
00473   /* Reception of the data */
00474   if (HAL_QSPI_Receive(&QSPIHandle, &reg, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK)
00475   {
00476     return QSPI_ERROR;
00477   }
00478
00479   /* Check the value of the register */
00480   if ((reg & (MX25R6435F_SECR_P_FAIL | MX25R6435F_SECR_E_FAIL)) != 0)
00481   {
00482     return QSPI_ERROR;
00483   }
00484   else if ((reg & (MX25R6435F_SECR_PSB | MX25R6435F_SECR_ESB)) != 0)
00485   {
00486     return QSPI_SUSPENDED;
00487   }
00488
00489   /* Initialize the read status register command */
00490   sCommand.Instruction       = READ_STATUS_REG_CMD;
00491
00492   /* Configure the command */
00493   if (HAL_QSPI_Command(&QSPIHandle, &sCommand, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK)
00494   {
00495     return QSPI_ERROR;
00496   }
00497
00498   /* Reception of the data */
00499   if (HAL_QSPI_Receive(&QSPIHandle, &reg, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK)
00500   {
00501     return QSPI_ERROR;
00502   }
00503
00504   /* Check the value of the register */
00505   if ((reg & MX25R6435F_SR_WIP) != 0)
00506   {
00507     return QSPI_BUSY;
00508   }
00509   else
00510   {
00511     return QSPI_OK;
00512   }
00513 }
00514
00515 /**
00516   * @brief  Return the configuration of the QSPI memory.
00517   * @param  pInfo : pointer on the configuration structure
00518   * @retval QSPI memory status
00519   */
00520 uint8_t BSP_QSPI_GetInfo(QSPI_Info* pInfo)
00521 {
00522   /* Configure the structure with the memory configuration */
00523   pInfo->FlashSize          = MX25R6435F_FLASH_SIZE;
00524   pInfo->EraseSectorSize    = MX25R6435F_SECTOR_SIZE;
00525   pInfo->EraseSectorsNumber = (MX25R6435F_FLASH_SIZE/MX25R6435F_SECTOR_SIZE);
00526   pInfo->ProgPageSize       = MX25R6435F_PAGE_SIZE;
00527   pInfo->ProgPagesNumber    = (MX25R6435F_FLASH_SIZE/MX25R6435F_PAGE_SIZE);
00528
00529   return QSPI_OK;
00530 }
00531
00532 /**
00533   * @brief  Configure the QSPI in memory-mapped mode
00534   * @retval QSPI memory status
00535   */
00536 uint8_t BSP_QSPI_EnableMemoryMappedMode(void)
00537 {
00538   QSPI_CommandTypeDef      sCommand;
00539   QSPI_MemoryMappedTypeDef sMemMappedCfg;
00540
00541   /* Configure the command for the read instruction */
00542   sCommand.InstructionMode    = QSPI_INSTRUCTION_1_LINE;
00543   sCommand.Instruction        = QUAD_INOUT_READ_CMD;
00544   sCommand.AddressMode        = QSPI_ADDRESS_4_LINES;
00545   sCommand.AddressSize        = QSPI_ADDRESS_24_BITS;
00546   sCommand.AlternateByteMode  = QSPI_ALTERNATE_BYTES_4_LINES;
00547   sCommand.AlternateBytesSize = QSPI_ALTERNATE_BYTES_8_BITS;
00548   sCommand.AlternateBytes     = MX25R6435F_ALT_BYTES_NO_PE_MODE;
00549   sCommand.DataMode           = QSPI_DATA_4_LINES;
00550   sCommand.DummyCycles        = MX25R6435F_DUMMY_CYCLES_READ_QUAD;
00551   sCommand.DdrMode            = QSPI_DDR_MODE_DISABLE;
00552   sCommand.DdrHoldHalfCycle   = QSPI_DDR_HHC_ANALOG_DELAY;
00553   sCommand.SIOOMode           = QSPI_SIOO_INST_EVERY_CMD;
00554
00555   /* Configure the memory mapped mode */
00556   sMemMappedCfg.TimeOutActivation = QSPI_TIMEOUT_COUNTER_DISABLE;
00557
00558   if (HAL_QSPI_MemoryMapped(&QSPIHandle, &sCommand, &sMemMappedCfg) != HAL_OK)
00559   {
00560     return QSPI_ERROR;
00561   }
00562
00563   return QSPI_OK;
00564 }
00565
00566 /**
00567   * @brief  This function suspends an ongoing erase command.
00568   * @retval QSPI memory status
00569   */
00570 uint8_t BSP_QSPI_SuspendErase(void)
00571 {
00572   QSPI_CommandTypeDef sCommand;
00573
00574   /* Check whether the device is busy (erase operation is
00575   in progress).
00576   */
00577   if (BSP_QSPI_GetStatus() == QSPI_BUSY)
00578   {
00579     /* Initialize the erase command */
00580     sCommand.InstructionMode   = QSPI_INSTRUCTION_1_LINE;
00581     sCommand.Instruction       = PROG_ERASE_SUSPEND_CMD;
00582     sCommand.AddressMode       = QSPI_ADDRESS_NONE;
00583     sCommand.AlternateByteMode = QSPI_ALTERNATE_BYTES_NONE;
00584     sCommand.DataMode          = QSPI_DATA_NONE;
00585     sCommand.DummyCycles       = 0;
00586     sCommand.DdrMode           = QSPI_DDR_MODE_DISABLE;
00587     sCommand.DdrHoldHalfCycle  = QSPI_DDR_HHC_ANALOG_DELAY;
00588     sCommand.SIOOMode          = QSPI_SIOO_INST_EVERY_CMD;
00589
00590     /* Send the command */
00591     if (HAL_QSPI_Command(&QSPIHandle, &sCommand, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK)
00592     {
00593       return QSPI_ERROR;
00594     }
00595
00596     if (BSP_QSPI_GetStatus() == QSPI_SUSPENDED)
00597     {
00598       return QSPI_OK;
00599     }
00600
00601     return QSPI_ERROR;
00602   }
00603
00604   return QSPI_OK;
00605 }
00606
00607 /**
00608   * @brief  This function resumes a paused erase command.
00609   * @retval QSPI memory status
00610   */
00611 uint8_t BSP_QSPI_ResumeErase(void)
00612 {
00613   QSPI_CommandTypeDef sCommand;
00614
00615   /* Check whether the device is in suspended state */
00616   if (BSP_QSPI_GetStatus() == QSPI_SUSPENDED)
00617   {
00618     /* Initialize the erase command */
00619     sCommand.InstructionMode   = QSPI_INSTRUCTION_1_LINE;
00620     sCommand.Instruction       = PROG_ERASE_RESUME_CMD;
00621     sCommand.AddressMode       = QSPI_ADDRESS_NONE;
00622     sCommand.AlternateByteMode = QSPI_ALTERNATE_BYTES_NONE;
00623     sCommand.DataMode          = QSPI_DATA_NONE;
00624     sCommand.DummyCycles       = 0;
00625     sCommand.DdrMode           = QSPI_DDR_MODE_DISABLE;
00626     sCommand.DdrHoldHalfCycle  = QSPI_DDR_HHC_ANALOG_DELAY;
00627     sCommand.SIOOMode          = QSPI_SIOO_INST_EVERY_CMD;
00628
00629     /* Send the command */
00630     if (HAL_QSPI_Command(&QSPIHandle, &sCommand, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK)
00631     {
00632       return QSPI_ERROR;
00633     }
00634
00635     /*
00636     When this command is executed, the status register write in progress bit is set to 1, and
00637     the flag status register program erase controller bit is set to 0. This command is ignored
00638     if the device is not in a suspended state.
00639     */
00640
00641     if (BSP_QSPI_GetStatus() == QSPI_BUSY)
00642     {
00643       return QSPI_OK;
00644     }
00645
00646     return QSPI_ERROR;
00647   }
00648
00649   return QSPI_OK;
00650 }
00651
00652 /**
00653   * @brief  This function enter the QSPI memory in deep power down mode.
00654   * @retval QSPI memory status
00655   */
00656 uint8_t BSP_QSPI_EnterDeepPowerDown(void)
00657 {
00658   QSPI_CommandTypeDef sCommand;
00659
00660   /* Initialize the deep power down command */
00661   sCommand.InstructionMode   = QSPI_INSTRUCTION_1_LINE;
00662   sCommand.Instruction       = DEEP_POWER_DOWN_CMD;
00663   sCommand.AddressMode       = QSPI_ADDRESS_NONE;
00664   sCommand.AlternateByteMode = QSPI_ALTERNATE_BYTES_NONE;
00665   sCommand.DataMode          = QSPI_DATA_NONE;
00666   sCommand.DummyCycles       = 0;
00667   sCommand.DdrMode           = QSPI_DDR_MODE_DISABLE;
00668   sCommand.DdrHoldHalfCycle  = QSPI_DDR_HHC_ANALOG_DELAY;
00669   sCommand.SIOOMode          = QSPI_SIOO_INST_EVERY_CMD;
00670
00671   /* Send the command */
00672   if (HAL_QSPI_Command(&QSPIHandle, &sCommand, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK)
00673   {
00674     return QSPI_ERROR;
00675   }
00676
00677   /* ---          Memory takes 10us max to enter deep power down          --- */
00678   /* --- At least 30us should be respected before leaving deep power down --- */
00679
00680   return QSPI_OK;
00681 }
00682
00683 /**
00684   * @brief  This function leave the QSPI memory from deep power down mode.
00685   * @retval QSPI memory status
00686   */
00687 uint8_t BSP_QSPI_LeaveDeepPowerDown(void)
00688 {
00689   QSPI_CommandTypeDef sCommand;
00690
00691   /* Initialize the erase command */
00692   sCommand.InstructionMode   = QSPI_INSTRUCTION_1_LINE;
00693   sCommand.Instruction       = NO_OPERATION_CMD;
00694   sCommand.AddressMode       = QSPI_ADDRESS_NONE;
00695   sCommand.AlternateByteMode = QSPI_ALTERNATE_BYTES_NONE;
00696   sCommand.DataMode          = QSPI_DATA_NONE;
00697   sCommand.DummyCycles       = 0;
00698   sCommand.DdrMode           = QSPI_DDR_MODE_DISABLE;
00699   sCommand.DdrHoldHalfCycle  = QSPI_DDR_HHC_ANALOG_DELAY;
00700   sCommand.SIOOMode          = QSPI_SIOO_INST_EVERY_CMD;
00701
00702   /* Send the command */
00703   if (HAL_QSPI_Command(&QSPIHandle, &sCommand, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK)
00704   {
00705     return QSPI_ERROR;
00706   }
00707
00708   /* --- A NOP command is sent to the memory, as the nCS should be low for at least 20 ns --- */
00709   /* ---                  Memory takes 35us min to leave deep power down                  --- */
00710
00711   return QSPI_OK;
00712 }
00713
00714 /**
00715   * @brief  Initializes the QSPI MSP.
00716   * @retval None
00717   */
00718 __weak void BSP_QSPI_MspInit(void)
00719 {
00720   GPIO_InitTypeDef GPIO_InitStruct;
00721
00722   /* Enable the QuadSPI memory interface clock */
00723   __HAL_RCC_QSPI_CLK_ENABLE();
00724
00725   /* Reset the QuadSPI memory interface */
00726   __HAL_RCC_QSPI_FORCE_RESET();
00727   __HAL_RCC_QSPI_RELEASE_RESET();
00728
00729   /* Enable GPIO clocks */
00730   __HAL_RCC_GPIOE_CLK_ENABLE();
00731
00732   /* QSPI CLK, CS, D0, D1, D2 and D3 GPIO pins configuration  */
00733   GPIO_InitStruct.Pin       = GPIO_PIN_10 | GPIO_PIN_11 | GPIO_PIN_12 |\
00734                               GPIO_PIN_13 | GPIO_PIN_14 | GPIO_PIN_15;
00735   GPIO_InitStruct.Mode      = GPIO_MODE_AF_PP;
00736   GPIO_InitStruct.Pull      = GPIO_NOPULL;
00737   GPIO_InitStruct.Speed     = GPIO_SPEED_FREQ_VERY_HIGH;
00738   GPIO_InitStruct.Alternate = GPIO_AF10_QUADSPI;
00739   HAL_GPIO_Init(GPIOE, &GPIO_InitStruct);
00740 }
00741
00742 /**
00743   * @brief  De-Initializes the QSPI MSP.
00744   * @retval None
00745   */
00746 __weak void BSP_QSPI_MspDeInit(void)
00747 {
00748   GPIO_InitTypeDef GPIO_InitStruct;
00749
00750   /* QSPI CLK, CS, D0-D3 GPIO pins de-configuration  */
00751   __HAL_RCC_GPIOE_CLK_ENABLE();
00752   GPIO_InitStruct.Pin       = GPIO_PIN_10 | GPIO_PIN_11 | GPIO_PIN_12 |\
00753                               GPIO_PIN_13 | GPIO_PIN_14 | GPIO_PIN_15;
00754
00755   HAL_GPIO_DeInit(GPIOE, GPIO_InitStruct.Pin);
00756
00757   /* Reset the QuadSPI memory interface */
00758   __HAL_RCC_QSPI_FORCE_RESET();
00759   __HAL_RCC_QSPI_RELEASE_RESET();
00760
00761   /* Disable the QuadSPI memory interface clock */
00762   __HAL_RCC_QSPI_CLK_DISABLE();
00763 }
00764
00765 /**
00766   * @}
00767   */
00768
00769 /** @addtogroup STM32L475E_IOT01_QSPI_Private_Functions
00770   * @{
00771   */
00772
00773 /**
00774   * @brief  This function reset the QSPI memory.
00775   * @param  hqspi : QSPI handle
00776   * @retval None
00777   */
00778 static uint8_t QSPI_ResetMemory(QSPI_HandleTypeDef *hqspi)
00779 {
00780   QSPI_CommandTypeDef sCommand;
00781
00782   /* Initialize the reset enable command */
00783   sCommand.InstructionMode   = QSPI_INSTRUCTION_1_LINE;
00784   sCommand.Instruction       = RESET_ENABLE_CMD;
00785   sCommand.AddressMode       = QSPI_ADDRESS_NONE;
00786   sCommand.AlternateByteMode = QSPI_ALTERNATE_BYTES_NONE;
00787   sCommand.DataMode          = QSPI_DATA_NONE;
00788   sCommand.DummyCycles       = 0;
00789   sCommand.DdrMode           = QSPI_DDR_MODE_DISABLE;
00790   sCommand.DdrHoldHalfCycle  = QSPI_DDR_HHC_ANALOG_DELAY;
00791   sCommand.SIOOMode          = QSPI_SIOO_INST_EVERY_CMD;
00792
00793   /* Send the command */
00794   if (HAL_QSPI_Command(&QSPIHandle, &sCommand, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK)
00795   {
00796     return QSPI_ERROR;
00797   }
00798
00799   /* Send the reset memory command */
00800   sCommand.Instruction = RESET_MEMORY_CMD;
00801   if (HAL_QSPI_Command(&QSPIHandle, &sCommand, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK)
00802   {
00803     return QSPI_ERROR;
00804   }
00805
00806   /* Configure automatic polling mode to wait the memory is ready */
00807   if (QSPI_AutoPollingMemReady(&QSPIHandle, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != QSPI_OK)
00808   {
00809     return QSPI_ERROR;
00810   }
00811
00812   return QSPI_OK;
00813 }
00814
00815 /**
00816   * @brief  This function send a Write Enable and wait it is effective.
00817   * @param  hqspi : QSPI handle
00818   * @retval None
00819   */
00820 static uint8_t QSPI_WriteEnable(QSPI_HandleTypeDef *hqspi)
00821 {
00822   QSPI_CommandTypeDef     sCommand;
00823   QSPI_AutoPollingTypeDef sConfig;
00824
00825   /* Enable write operations */
00826   sCommand.InstructionMode   = QSPI_INSTRUCTION_1_LINE;
00827   sCommand.Instruction       = WRITE_ENABLE_CMD;
00828   sCommand.AddressMode       = QSPI_ADDRESS_NONE;
00829   sCommand.AlternateByteMode = QSPI_ALTERNATE_BYTES_NONE;
00830   sCommand.DataMode          = QSPI_DATA_NONE;
00831   sCommand.DummyCycles       = 0;
00832   sCommand.DdrMode           = QSPI_DDR_MODE_DISABLE;
00833   sCommand.DdrHoldHalfCycle  = QSPI_DDR_HHC_ANALOG_DELAY;
00834   sCommand.SIOOMode          = QSPI_SIOO_INST_EVERY_CMD;
00835
00836   if (HAL_QSPI_Command(&QSPIHandle, &sCommand, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK)
00837   {
00838     return QSPI_ERROR;
00839   }
00840
00841   /* Configure automatic polling mode to wait for write enabling */
00842   sConfig.Match           = MX25R6435F_SR_WEL;
00843   sConfig.Mask            = MX25R6435F_SR_WEL;
00844   sConfig.MatchMode       = QSPI_MATCH_MODE_AND;
00845   sConfig.StatusBytesSize = 1;
00846   sConfig.Interval        = 0x10;
00847   sConfig.AutomaticStop   = QSPI_AUTOMATIC_STOP_ENABLE;
00848
00849   sCommand.Instruction    = READ_STATUS_REG_CMD;
00850   sCommand.DataMode       = QSPI_DATA_1_LINE;
00851
00852   if (HAL_QSPI_AutoPolling(&QSPIHandle, &sCommand, &sConfig, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK)
00853   {
00854     return QSPI_ERROR;
00855   }
00856
00857   return QSPI_OK;
00858 }
00859
00860 /**
00861   * @brief  This function read the SR of the memory and wait the EOP.
00862   * @param  hqspi   : QSPI handle
00863   * @param  Timeout : Timeout for auto-polling
00864   * @retval None
00865   */
00866 static uint8_t QSPI_AutoPollingMemReady(QSPI_HandleTypeDef *hqspi, uint32_t Timeout)
00867 {
00868   QSPI_CommandTypeDef     sCommand;
00869   QSPI_AutoPollingTypeDef sConfig;
00870
00871   /* Configure automatic polling mode to wait for memory ready */
00872   sCommand.InstructionMode   = QSPI_INSTRUCTION_1_LINE;
00873   sCommand.Instruction       = READ_STATUS_REG_CMD;
00874   sCommand.AddressMode       = QSPI_ADDRESS_NONE;
00875   sCommand.AlternateByteMode = QSPI_ALTERNATE_BYTES_NONE;
00876   sCommand.DataMode          = QSPI_DATA_1_LINE;
00877   sCommand.DummyCycles       = 0;
00878   sCommand.DdrMode           = QSPI_DDR_MODE_DISABLE;
00879   sCommand.DdrHoldHalfCycle  = QSPI_DDR_HHC_ANALOG_DELAY;
00880   sCommand.SIOOMode          = QSPI_SIOO_INST_EVERY_CMD;
00881
00882   sConfig.Match           = 0;
00883   sConfig.Mask            = MX25R6435F_SR_WIP;
00884   sConfig.MatchMode       = QSPI_MATCH_MODE_AND;
00885   sConfig.StatusBytesSize = 1;
00886   sConfig.Interval        = 0x10;
00887   sConfig.AutomaticStop   = QSPI_AUTOMATIC_STOP_ENABLE;
00888
00889   if (HAL_QSPI_AutoPolling(&QSPIHandle, &sCommand, &sConfig, Timeout) != HAL_OK)
00890   {
00891     return QSPI_ERROR;
00892   }
00893
00894   return QSPI_OK;
00895 }
00896
00897 /**
00898   * @brief  This function enables/disables the Quad mode of the memory.
00899   * @param  hqspi     : QSPI handle
00900   * @param  Operation : QSPI_QUAD_ENABLE or QSPI_QUAD_DISABLE mode
00901   * @retval None
00902   */
00903 static uint8_t QSPI_QuadMode(QSPI_HandleTypeDef *hqspi, uint8_t Operation)
00904 {
00905   QSPI_CommandTypeDef sCommand;
00906   uint8_t reg;
00907
00908   /* Read status register */
00909   sCommand.InstructionMode   = QSPI_INSTRUCTION_1_LINE;
00910   sCommand.Instruction       = READ_STATUS_REG_CMD;
00911   sCommand.AddressMode       = QSPI_ADDRESS_NONE;
00912   sCommand.AlternateByteMode = QSPI_ALTERNATE_BYTES_NONE;
00913   sCommand.DataMode          = QSPI_DATA_1_LINE;
00914   sCommand.DummyCycles       = 0;
00915   sCommand.NbData            = 1;
00916   sCommand.DdrMode           = QSPI_DDR_MODE_DISABLE;
00917   sCommand.DdrHoldHalfCycle  = QSPI_DDR_HHC_ANALOG_DELAY;
00918   sCommand.SIOOMode          = QSPI_SIOO_INST_EVERY_CMD;
00919
00920   if (HAL_QSPI_Command(&QSPIHandle, &sCommand, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK)
00921   {
00922     return QSPI_ERROR;
00923   }
00924
00925   if (HAL_QSPI_Receive(&QSPIHandle, &reg, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK)
00926   {
00927     return QSPI_ERROR;
00928   }
00929
00930   /* Enable write operations */
00931   if (QSPI_WriteEnable(&QSPIHandle) != QSPI_OK)
00932   {
00933     return QSPI_ERROR;
00934   }
00935
00936   /* Activate/deactivate the Quad mode */
00937   if (Operation == QSPI_QUAD_ENABLE)
00938   {
00939     SET_BIT(reg, MX25R6435F_SR_QE);
00940   }
00941   else
00942   {
00943     CLEAR_BIT(reg, MX25R6435F_SR_QE);
00944   }
00945
00946   sCommand.Instruction = WRITE_STATUS_CFG_REG_CMD;
00947
00948   if (HAL_QSPI_Command(&QSPIHandle, &sCommand, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK)
00949   {
00950     return QSPI_ERROR;
00951   }
00952
00953   if (HAL_QSPI_Transmit(&QSPIHandle, &reg, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK)
00954   {
00955     return QSPI_ERROR;
00956   }
00957
00958   /* Wait that memory is ready */
00959   if (QSPI_AutoPollingMemReady(&QSPIHandle, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != QSPI_OK)
00960   {
00961     return QSPI_ERROR;
00962   }
00963
00964   /* Check the configuration has been correctly done */
00965   sCommand.Instruction = READ_STATUS_REG_CMD;
00966
00967   if (HAL_QSPI_Command(&QSPIHandle, &sCommand, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK)
00968   {
00969     return QSPI_ERROR;
00970   }
00971
00972   if (HAL_QSPI_Receive(&QSPIHandle, &reg, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK)
00973   {
00974     return QSPI_ERROR;
00975   }
00976
00977   if ((((reg & MX25R6435F_SR_QE) == 0) && (Operation == QSPI_QUAD_ENABLE)) ||
00978       (((reg & MX25R6435F_SR_QE) != 0) && (Operation == QSPI_QUAD_DISABLE)))
00979   {
00980     return QSPI_ERROR;
00981   }
00982
00983   return QSPI_OK;
00984 }
00985
00986 /**
00987   * @brief  This function enables/disables the high performance mode of the memory.
00988   * @param  hqspi     : QSPI handle
00989   * @param  Operation : QSPI_HIGH_PERF_ENABLE or QSPI_HIGH_PERF_DISABLE high performance mode
00990   * @retval None
00991   */
00992 static uint8_t QSPI_HighPerfMode(QSPI_HandleTypeDef *hqspi, uint8_t Operation)
00993 {
00994   QSPI_CommandTypeDef sCommand;
00995   uint8_t reg[3];
00996
00997   /* Read status register */
00998   sCommand.InstructionMode   = QSPI_INSTRUCTION_1_LINE;
00999   sCommand.Instruction       = READ_STATUS_REG_CMD;
01000   sCommand.AddressMode       = QSPI_ADDRESS_NONE;
01001   sCommand.AlternateByteMode = QSPI_ALTERNATE_BYTES_NONE;
01002   sCommand.DataMode          = QSPI_DATA_1_LINE;
01003   sCommand.DummyCycles       = 0;
01004   sCommand.NbData            = 1;
01005   sCommand.DdrMode           = QSPI_DDR_MODE_DISABLE;
01006   sCommand.DdrHoldHalfCycle  = QSPI_DDR_HHC_ANALOG_DELAY;
01007   sCommand.SIOOMode          = QSPI_SIOO_INST_EVERY_CMD;
01008
01009   if (HAL_QSPI_Command(&QSPIHandle, &sCommand, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK)
01010   {
01011     return QSPI_ERROR;
01012   }
01013
01014   if (HAL_QSPI_Receive(&QSPIHandle, &(reg[0]), HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK)
01015   {
01016     return QSPI_ERROR;
01017   }
01018
01019   /* Read configuration registers */
01020   sCommand.Instruction = READ_CFG_REG_CMD;
01021   sCommand.NbData      = 2;
01022
01023   if (HAL_QSPI_Command(&QSPIHandle, &sCommand, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK)
01024   {
01025     return QSPI_ERROR;
01026   }
01027
01028   if (HAL_QSPI_Receive(&QSPIHandle, &(reg[1]), HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK)
01029   {
01030     return QSPI_ERROR;
01031   }
01032
01033   /* Enable write operations */
01034   if (QSPI_WriteEnable(&QSPIHandle) != QSPI_OK)
01035   {
01036     return QSPI_ERROR;
01037   }
01038
01039   /* Activate/deactivate the Quad mode */
01040   if (Operation == QSPI_HIGH_PERF_ENABLE)
01041   {
01042     SET_BIT(reg[2], MX25R6435F_CR2_LH_SWITCH);
01043   }
01044   else
01045   {
01046     CLEAR_BIT(reg[2], MX25R6435F_CR2_LH_SWITCH);
01047   }
01048
01049   sCommand.Instruction = WRITE_STATUS_CFG_REG_CMD;
01050   sCommand.NbData      = 3;
01051
01052   if (HAL_QSPI_Command(&QSPIHandle, &sCommand, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK)
01053   {
01054     return QSPI_ERROR;
01055   }
01056
01057   if (HAL_QSPI_Transmit(&QSPIHandle, &(reg[0]), HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK)
01058   {
01059     return QSPI_ERROR;
01060   }
01061
01062   /* Wait that memory is ready */
01063   if (QSPI_AutoPollingMemReady(&QSPIHandle, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != QSPI_OK)
01064   {
01065     return QSPI_ERROR;
01066   }
01067
01068   /* Check the configuration has been correctly done */
01069   sCommand.Instruction = READ_CFG_REG_CMD;
01070   sCommand.NbData      = 2;
01071
01072   if (HAL_QSPI_Command(&QSPIHandle, &sCommand, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK)
01073   {
01074     return QSPI_ERROR;
01075   }
01076
01077   if (HAL_QSPI_Receive(&QSPIHandle, &(reg[0]), HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK)
01078   {
01079     return QSPI_ERROR;
01080   }
01081
01082   if ((((reg[1] & MX25R6435F_CR2_LH_SWITCH) == 0) && (Operation == QSPI_HIGH_PERF_ENABLE)) ||
01083       (((reg[1] & MX25R6435F_CR2_LH_SWITCH) != 0) && (Operation == QSPI_HIGH_PERF_DISABLE)))
01084   {
01085     return QSPI_ERROR;
01086   }
01087
01088   return QSPI_OK;
01089 }
01090
01091 /**
01092   * @}
01093   */
01094
01095 /**
01096   * @}
01097   */
01098
01099 /**
01100   * @}
01101   */
01102
01103 /**
01104   * @}
01105   */
01106
01107 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
01108
Generated on Thu Nov 28 2019 16:15:09 for B-L475E-IOT01 BSP User Manual by doxygen 1.7.6.1


B-L475E-IOT01 BSP User Manual: stm32l475e_iot01_qspi.h Source File

  • File List
  • Globals
  • Firmware
  • Drivers
  • BSP
  • B-L475E-IOT01
stm32l475e_iot01_qspi.h
Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   * @file    stm32l475e_iot01_qspi.h
00004   * @author  MCD Application Team
00005   * @brief   This file contains the common defines and functions prototypes for
00006   *          the stm32l475e_iot01_qspi.c driver.
00007   ******************************************************************************
00008   * @attention
00009   *
00010   * <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
00011   * All rights reserved.</center></h2>
00012   *
00013   * This software component is licensed by ST under BSD 3-Clause license,
00014   * the "License"; You may not use this file except in compliance with the
00015   * License. You may obtain a copy of the License at:
00016   *                        opensource.org/licenses/BSD-3-Clause
00017   *
00018   ******************************************************************************
00019   */
00020
00021 /* Define to prevent recursive inclusion -------------------------------------*/
00022 #ifndef __STM32L475E_IOT01_QSPI_H
00023 #define __STM32L475E_IOT01_QSPI_H
00024
00025 #ifdef __cplusplus
00026  extern "C" {
00027 #endif
00028
00029 /* Includes ------------------------------------------------------------------*/
00030 #include "stm32l4xx_hal.h"
00031 #include "../Components/mx25r6435f/mx25r6435f.h"
00032
00033 /** @addtogroup BSP
00034   * @{
00035   */
00036
00037 /** @addtogroup STM32L475E_IOT01
00038   * @{
00039   */
00040
00041 /** @addtogroup STM32L475E_IOT01_QSPI
00042   * @{
00043   */
00044
00045 /* Exported constants --------------------------------------------------------*/
00046 /** @defgroup STM32L475E_IOT01_QSPI_Exported_Constants QSPI Exported Constants
00047   * @{
00048   */
00049 /* QSPI Error codes */
00050 #define QSPI_OK            ((uint8_t)0x00)
00051 #define QSPI_ERROR         ((uint8_t)0x01)
00052 #define QSPI_BUSY          ((uint8_t)0x02)
00053 #define QSPI_NOT_SUPPORTED ((uint8_t)0x04)
00054 #define QSPI_SUSPENDED     ((uint8_t)0x08)
00055
00056 /**
00057   * @}
00058   */
00059
00060 /* Exported types ------------------------------------------------------------*/
00061 /** @defgroup STM32L475E_IOT01_QSPI_Exported_Types QSPI Exported Types
00062   * @{
00063   */
00064 /* QSPI Info */
00065 typedef struct {
00066   uint32_t FlashSize;          /*!< Size of the flash */
00067   uint32_t EraseSectorSize;    /*!< Size of sectors for the erase operation */
00068   uint32_t EraseSectorsNumber; /*!< Number of sectors for the erase operation */
00069   uint32_t ProgPageSize;       /*!< Size of pages for the program operation */
00070   uint32_t ProgPagesNumber;    /*!< Number of pages for the program operation */
00071 } QSPI_Info;
00072
00073 /**
00074   * @}
00075   */
00076
00077 /* Exported functions --------------------------------------------------------*/
00078 /** @defgroup STM32L475E_IOT01_QSPI_Exported_Functions QSPI Exported Functions
00079   * @{
00080   */
00081 uint8_t BSP_QSPI_Init                  (void);
00082 uint8_t BSP_QSPI_DeInit                (void);
00083 uint8_t BSP_QSPI_Read                  (uint8_t* pData, uint32_t ReadAddr, uint32_t Size);
00084 uint8_t BSP_QSPI_Write                 (uint8_t* pData, uint32_t WriteAddr, uint32_t Size);
00085 uint8_t BSP_QSPI_Erase_Block           (uint32_t BlockAddress);
00086 uint8_t BSP_QSPI_Erase_Sector          (uint32_t Sector);
00087 uint8_t BSP_QSPI_Erase_Chip            (void);
00088 uint8_t BSP_QSPI_GetStatus             (void);
00089 uint8_t BSP_QSPI_GetInfo               (QSPI_Info* pInfo);
00090 uint8_t BSP_QSPI_EnableMemoryMappedMode(void);
00091 uint8_t BSP_QSPI_SuspendErase          (void);
00092 uint8_t BSP_QSPI_ResumeErase           (void);
00093 uint8_t BSP_QSPI_EnterDeepPowerDown    (void);
00094 uint8_t BSP_QSPI_LeaveDeepPowerDown    (void);
00095
00096 void BSP_QSPI_MspInit(void);
00097 void BSP_QSPI_MspDeInit(void);
00098 /**
00099   * @}
00100   */
00101
00102 /**
00103   * @}
00104   */
00105
00106 /**
00107   * @}
00108   */
00109
00110 /**
00111   * @}
00112   */
00113
00114 #ifdef __cplusplus
00115 }
00116 #endif
00117
00118 #endif /* __STM32L475E_IOT01_QSPI_H */
00119
00120 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Generated on Thu Nov 28 2019 16:15:09 for B-L475E-IOT01 BSP User Manual by doxygen 1.7.6.1


B-L475E-IOT01 BSP User Manual: stm32l475e_iot01_tsensor.c Source File

  • File List
  • Globals
  • Firmware
  • Drivers
  • BSP
  • B-L475E-IOT01
stm32l475e_iot01_tsensor.c
Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   * @file    stm32l475e_iot01_tsensor.c
00004   * @author  MCD Application Team
00005   * @brief   This file provides a set of functions needed to manage the temperature sensor
00006   ******************************************************************************
00007   * @attention
00008   *
00009   * <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
00010   * All rights reserved.</center></h2>
00011   *
00012   * This software component is licensed by ST under BSD 3-Clause license,
00013   * the "License"; You may not use this file except in compliance with the
00014   * License. You may obtain a copy of the License at:
00015   *                        opensource.org/licenses/BSD-3-Clause
00016   *
00017   ******************************************************************************
00018   */
00019
00020 /* Includes ------------------------------------------------------------------*/
00021 #include "stm32l475e_iot01_tsensor.h"
00022
00023 /** @addtogroup BSP
00024   * @{
00025   */
00026
00027 /** @addtogroup STM32L475E_IOT01
00028   * @{
00029   */
00030
00031 /** @defgroup STM32L475E_IOT01_TEMPERATURE TEMPERATURE
00032   * @{
00033   */
00034
00035 /** @defgroup STM32L475E_IOT01_TEMPERATURE_Private_Variables TEMPERATURE Private Variables
00036   * @{
00037   */
00038 static TSENSOR_DrvTypeDef *tsensor_drv;
00039 /**
00040   * @}
00041   */
00042
00043 /** @defgroup STM32L475E_IOT01_TEMPERATURE_Private_Functions TEMPERATURE Private Functions
00044   * @{
00045   */
00046
00047 /**
00048   * @brief  Initializes peripherals used by the I2C Temperature Sensor driver.
00049   * @retval TSENSOR status
00050   */
00051 uint32_t BSP_TSENSOR_Init(void)
00052 {
00053   uint8_t ret = TSENSOR_ERROR;
00054
00055 #ifdef USE_LPS22HB_TEMP
00056   tsensor_drv = &LPS22HB_T_Drv;
00057 #else /* USE_HTS221_TEMP */
00058   tsensor_drv = &HTS221_T_Drv;
00059 #endif
00060
00061   /* Low level init */
00062   SENSOR_IO_Init();
00063
00064   /* TSENSOR Init */
00065   tsensor_drv->Init(TSENSOR_I2C_ADDRESS, NULL);
00066
00067   ret = TSENSOR_OK;
00068
00069   return ret;
00070 }
00071
00072 /**
00073   * @brief  Read Temperature register of TS751.
00074   * @retval STTS751 measured temperature value.
00075   */
00076 float BSP_TSENSOR_ReadTemp(void)
00077 {
00078   return tsensor_drv->ReadTemp(TSENSOR_I2C_ADDRESS);
00079 }
00080
00081 /**
00082   * @}
00083   */
00084
00085 /**
00086   * @}
00087   */
00088
00089 /**
00090   * @}
00091   */
00092
00093 /**
00094   * @}
00095   */
00096 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Generated on Thu Nov 28 2019 16:15:09 for B-L475E-IOT01 BSP User Manual by doxygen 1.7.6.1


B-L475E-IOT01 BSP User Manual: stm32l475e_iot01_tsensor.h Source File

  • File List
  • Globals
  • Firmware
  • Drivers
  • BSP
  • B-L475E-IOT01
stm32l475e_iot01_tsensor.h
Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   * @file    stm32l475e_iot01_tsensor.h
00004   * @author  MCD Application Team
00005   * @brief   This file provides a set of functions needed to manage the temperature sensor
00006   ******************************************************************************
00007   * @attention
00008   *
00009   * <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
00010   * All rights reserved.</center></h2>
00011   *
00012   * This software component is licensed by ST under BSD 3-Clause license,
00013   * the "License"; You may not use this file except in compliance with the
00014   * License. You may obtain a copy of the License at:
00015   *                        opensource.org/licenses/BSD-3-Clause
00016   *
00017   ******************************************************************************
00018   */
00019
00020 /* Define to prevent recursive inclusion -------------------------------------*/
00021 #ifndef __STM32L475E_IOT01_TSENSOR_H
00022 #define __STM32L475E_IOT01_TSENSOR_H
00023
00024 #ifdef __cplusplus
00025  extern "C" {
00026 #endif
00027
00028 /* Includes ------------------------------------------------------------------*/
00029 #include "stm32l475e_iot01.h"
00030 #ifdef USE_LPS22HB_TEMP
00031 #include "../Components/lps22hb/lps22hb.h"
00032 #else /* USE_HTS221_TEMP */
00033 #include "../Components/hts221/hts221.h"
00034 #endif
00035
00036 /** @addtogroup BSP
00037   * @{
00038   */
00039
00040 /** @addtogroup STM32L475E_IOT01
00041   * @{
00042   */
00043
00044 /** @addtogroup STM32L475E_IOT01_TEMPERATURE
00045   * @{
00046   */
00047
00048 /** @defgroup STM32L475E_IOT01_TEMPERATURE_Exported_Types TEMPERATURE Exported Types
00049   * @{
00050   */
00051
00052 /**
00053   * @brief  TSENSOR Status
00054   */
00055 typedef enum
00056 {
00057   TSENSOR_OK = 0,
00058   TSENSOR_ERROR
00059 }TSENSOR_Status_TypDef;
00060
00061 /**
00062   * @}
00063   */
00064
00065
00066 /** @defgroup STM32L475E_IOT01_TEMPERATURE_Exported_Functions TEMPERATURE Exported Constants
00067   * @{
00068   */
00069 /* Exported macros -----------------------------------------------------------*/
00070 /* Private macros ------------------------------------------------------------*/
00071 /* Exported functions --------------------------------------------------------*/
00072 /* Sensor Configuration Functions */
00073 uint32_t BSP_TSENSOR_Init(void);
00074 float BSP_TSENSOR_ReadTemp(void);
00075 /**
00076   * @}
00077   */
00078
00079 #ifdef __cplusplus
00080 }
00081 #endif
00082
00083 /**
00084   * @}
00085   */
00086
00087 /**
00088   * @}
00089   */
00090
00091 /**
00092   * @}
00093   */
00094
00095 #endif /* __STM32L475E_IOT01_TSENSOR_H */
00096
00097 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/


B-L475E-IOT01 BSP User Manual: userManualMainpage.txt File Reference

  • File List
  • Globals
userManualMainpage.txt File Reference