XDK API  3.6.0
Documentation
Macros | Functions | Variables
BSP_Board.c File Reference

Implementation of Board BSP functions. More...

#include "BCDS_BSP.h"
#include "BSP_BoardType.h"
#include "BSP_BoardExtSettings.h"
#include "BSP_BoardShared.h"
#include "BCDS_BSP_Board.h"
#include "BCDS_USB.h"
#include "usbconfig.h"
#include "BCDS_MCU_Timer.h"
#include "BCDS_MCU_Timer_Handle.h"
#include "BSP_IrqHandler.h"
#include "BSP_DMA.h"
+ Include dependency graph for BSP_Board.c:

Macros

#define BCDS_FEATURE_TRACEPORT   0
 
#define BCDS_MODULE_ID   BCDS_BSP_MODULE_ID_BOARD
 

Functions

Retcode_T Board_ADC_Init (void)
 Initialize the ADC interface for the analog measurements. More...
 
Retcode_T Board_BURTC_Init (void)
 Initializes the Board part of the BURTC peripheral. More...
 
void Board_Delay (uint32_t delay)
 Provide a delay in millisecond. More...
 
void Board_DisablePowerSupply3V3 (Peripherals_T peripheral)
 Disables the 3V3 power rail. More...
 
void Board_EnablePowerSupply3V3 (Peripherals_T peripheral)
 Enables the 3V3 power rail. More...
 
uint32_t Board_GetTick (void)
 Provide a tick value in millisecond. More...
 
void Board_GPIO_Init (void)
 Initialization of critical GPIO pins. More...
 
void Board_GPIOInterruptDispatch (uint32_t iflags)
 Function calls users callback for registered pin interrupts. More...
 
GPIOINT_IrqCallbackPtr_t Board_GPIOInterruptGetCallback (uint8_t pin)
 Returns the callback pointer. More...
 
void Board_GPIOInterruptInit (void)
 Initialization of GPIO Interrupts. More...
 
void Board_GPIOInterruptRegisterCallback (uint8_t pin, GPIOINT_IrqCallbackPtr_t callbackPtr)
 Registers user callback for given pin number. More...
 
Retcode_T Board_I2C0_Init (void)
 Initialize the I2C interface for the sensor node. More...
 
Retcode_T Board_I2C1_Init (void)
 Initialize the I2C interface to the default values for the extension board. More...
 
void Board_IncTick (void)
 This function is called to increment a global variable "BSP_Tick" used as application time base. More...
 
Retcode_T Board_RTC_Init (void)
 Initializes the Board part of the RTC peripheral. More...
 
void Board_SnoozePowerSupply2V5 (Peripherals_T peripheral)
 Puts the 2V5 power rail on low power mode(snooze). More...
 
Retcode_T Board_UART0_UART_Init (void)
 Initialize the UART interface for the bluetooth module. More...
 
Retcode_T Board_UART1_UART_Init (void)
 Initialize the UART interface to the default values for the extension board. More...
 
Retcode_T Board_USART0_SPI_Init (void)
 Initialize the USART interface at default SPI mode for the wifi module. More...
 
Retcode_T Board_USART1_SPI_Init (void)
 Initialize the USART interface at the default values for the for the SD_Card. More...
 
Retcode_T Board_USB_Init (void)
 Initialize the USB interface. More...
 
void Board_WakeupPowerSupply2V5 (Peripherals_T peripheral)
 Performs operations prior to SysTick count increment. More...
 
Retcode_T BSP_Board_ControlPowerRail (uint32_t control)
 Controls the on-board power rails. More...
 
void BSP_Board_Delay (uint32_t delayMs)
 Provide accurate delay based on variable incremented. More...
 
uint32_t BSP_Board_DetectPowerSupply (void)
 Returns the power-supply mode. More...
 
void BSP_Board_DisableSysTick (void)
 Disable the Core SysTick. More...
 
Retcode_T BSP_Board_EnableSysTick (void)
 Enable the Core SysTick. More...
 
uint32_t BSP_Board_GetBoardRevision (void)
 Returns the BSP Revision. More...
 
uint32_t BSP_Board_GetWakeupSource (void)
 Returns the last wake-up source. More...
 
Retcode_T BSP_Board_Initialize (uint32_t param1, void *param2)
 Initializes the entire board. More...
 
void BSP_Board_OSTickInitialize (BSP_Systick_Callback_T PreCallback, BSP_Systick_Callback_T PostCallback)
 Initializes pre/post tick increment processing in OS based applications. More...
 
void BSP_Board_SetOStoBSPDelayFunc (OStoBSPDelayFunc_T delayFunc)
 Passes delay function from OS to BSP. More...
 
void BSP_Board_SoftReset (void)
 Invoke Board Soft Reset. This puts the MCU registers to appropriate state applicable for soft reset. Please note this is not equivalent to hard reset. More...
 
Retcode_T BSP_Board_SwitchPowerMode (uint32_t powerMode)
 Switches between different power modes. More...
 
void PowerSupply2V5UpdateRegister (Peripherals_T peripheral, uint32_t updateValue)
 
void PowerSupply3V3UpdateRegister (Peripherals_T peripheral, uint32_t updateValue)
 

Variables

BSPLock_T ADCLock = BSP_UNLOCKED
 
PowerSupply2V5Register_T BSP_PowerSupply2V5
 
PowerSupply3V3Register_T BSP_PowerSupply3V3
 
static volatile uint32_t BSP_Tick
 
static USART_InitAsync_TypeDef BSP_UART0InitStruct
 
USB_lineCoding_t BSP_USBHandle
 
static GPIOINT_IrqCallbackPtr_t gpioCallbacks [16] = { 0 }
 
OStoBSPDelayFunc_T OStoBSPdelayFunc
 

Macro Definition Documentation

#define BCDS_FEATURE_TRACEPORT   0
#define BCDS_MODULE_ID   BCDS_BSP_MODULE_ID_BOARD

Function Documentation

Retcode_T Board_ADC_Init ( void  )
Returns

+ Here is the caller graph for this function:

Retcode_T Board_BURTC_Init ( void  )

+ Here is the caller graph for this function:

void Board_Delay ( uint32_t  delay)
Parameters
delaydelay time in ms;

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Board_DisablePowerSupply3V3 ( Peripherals_T  Peripheral)

This function holds a register of the connected peripherals to the power supply and if a peripheral requests disabling it, the corresponding bit field is Reset and the register and if this register equals zero then the power rail is safe to be disabled.

Parameters
Peripheral: enumerated value representing the peripheral requesting the Disabling of the power supply
Returns
RETCODE_OK in case of success error code otherwise.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Board_EnablePowerSupply3V3 ( Peripherals_T  Peripheral)

This function holds a register of the connected peripherals to the power supply and if a peripheral requests enabling it, the MCU output enabling the Power rail is Set its and the corresponding peripheral bit field is Set

Parameters
Peripheral: enumerated value representing the peripheral requesting the Enabling of the power supply
Returns
RETCODE_OK in case of success error code otherwise.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uint32_t Board_GetTick ( void  )
Return values
tickvalue

+ Here is the caller graph for this function:

void Board_GPIO_Init ( void  )

+ Here is the caller graph for this function:

void Board_GPIOInterruptDispatch ( uint32_t  iflags)

This function is called when GPIO interrupts are handled by the dispatcher. Function gets even or odd interrupt flags and calls user callback registered for that pin. Function iterates on flags starting from MSB.

Parameters
iflagsInterrupt flags which shall be handled by the dispatcher.

+ Here is the caller graph for this function:

GPIOINT_IrqCallbackPtr_t Board_GPIOInterruptGetCallback ( uint8_t  pin)

This function is used to query the callback function registered for the requested pin.

Parameters
pinThe pin number.
Returns
The callback pointer.

+ Here is the caller graph for this function:

void Board_GPIOInterruptInit ( void  )

+ Here is the caller graph for this function:

void Board_GPIOInterruptRegisterCallback ( uint8_t  pin,
GPIOINT_IrqCallbackPtr_t  callbackPtr 
)

Use this function to register a callback which shall be called upon interrupt generated from given pin number (port is irrelevant). Interrupt itself must be configured externally. Function overwrites previously registered callback.

Parameters
[in]pinPin number for the callback.
[in]callbackPtrA pointer to callback function.

+ Here is the caller graph for this function:

Retcode_T Board_I2C0_Init ( void  )
Returns
RETCODE_OK in case of success error code otherwise.

+ Here is the caller graph for this function:

Retcode_T Board_I2C1_Init ( void  )
Returns
RETCODE_OK in case of success error code otherwise.

+ Here is the caller graph for this function:

void Board_IncTick ( void  )
Note
In the default implementation, this variable is incremented each 1ms in SysTick ISR.
Return values
None
Retcode_T Board_RTC_Init ( void  )

+ Here is the caller graph for this function:

void Board_SnoozePowerSupply2V5 ( Peripherals_T  Peripheral)

This function holds a register of the connected peripherals to the power supply and if a peripheral requests disabling it, the corresponding bit field is Reset and the register and if this register equals zero then the power rail is safe to be scaled down.

Parameters
Peripheral: enumerated value representing the peripheral requesting the Snoozing of the power supply
Returns
RETCODE_OK in case of success error code otherwise.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Retcode_T Board_UART0_UART_Init ( void  )
Returns
RETCODE_OK in case of success error code otherwise.

+ Here is the caller graph for this function:

Retcode_T Board_UART1_UART_Init ( void  )

The default values for the UART1 interface mapped to the extension board depending on which extension board is used this UART gets its configuration values from BoardExtSettings.h file. 115200baud

Returns
RETCODE_OK in case of success error code otherwise.

+ Here is the caller graph for this function:

Retcode_T Board_USART0_SPI_Init ( void  )
Returns
RETCODE_OK in case of success error code otherwise.

+ Here is the caller graph for this function:

Retcode_T Board_USART1_SPI_Init ( void  )
Returns
RETCODE_OK in case of success error code otherwise.

+ Here is the caller graph for this function:

Retcode_T Board_USB_Init ( void  )
Returns

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Board_WakeupPowerSupply2V5 ( Peripherals_T  Peripheral)

This function is initialized during BSP_Board_OSTickInitialize() and makes it possible for the application to perform some operations before the SysTick counter is incremented (e.g. context switching in OS based applications)

  • This function is called in SysTick_Handler() function in IrqHandler.c file Wakes up the 2V5 power rail

This function holds a register of the connected peripherals to the power supply and if a peripheral requests enabling it, the MCU output enabling the Power rail is Set its and the corresponding peripheral bit field is Set

Parameters
Peripheral: enumerated value representing the peripheral requesting the Enabling of the power supply

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void PowerSupply2V5UpdateRegister ( Peripherals_T  peripheral,
uint32_t  updateValue 
)

+ Here is the caller graph for this function:

void PowerSupply3V3UpdateRegister ( Peripherals_T  peripheral,
uint32_t  updateValue 
)

+ Here is the caller graph for this function:

Variable Documentation

PowerSupply2V5Register_T BSP_PowerSupply2V5

power supply 2v5 register

PowerSupply3V3Register_T BSP_PowerSupply3V3

power supply 3v3 register

volatile uint32_t BSP_Tick
static
USART_InitAsync_TypeDef BSP_UART0InitStruct
static
USB_lineCoding_t BSP_USBHandle
GPIOINT_IrqCallbackPtr_t gpioCallbacks[16] = { 0 }
static
OStoBSPDelayFunc_T OStoBSPdelayFunc

All rights reserved. The use is subject to the XDK SDK EULA by Bosch Connected Devices and Solutions GmbH.
This documentation file has been automatically generated on Thu Mar 14 2019 19:12:48 by doxygen 1.8.8