XDK API  3.6.0
Documentation
Files | Typedefs | Functions
Board

Generic interface to the Board API. More...

+ Collaboration diagram for Board:

Files

file  BCDS_BSP_Board.h
 

Typedefs

typedef void(* BSP_Systick_Callback_T )(void)
 
typedef void(* OStoBSPDelayFunc_T )(uint32_t)
 

Functions

Retcode_T BSP_Board_ControlPowerRail (uint32_t control)
 Controls the on-board power rails. More...
 
void BSP_Board_Delay (uint32_t delay)
 Provide accurate delay based on variable incremented. More...
 
void BSP_Board_DelayUs (uint32_t delayInUs)
 Provide accurate delay based on variable incremented in mikro seconds. 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...
 
uint64_t BSP_Board_GetTick (void)
 Provide a timestamp based on variable incremented in milli seconds. 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...
 

Detailed Description

The following taxonomy has been adopted:

After the MCU has executed its startup sequence and pointed to the main function the application shall call directly BSP_Board_Initialize(param1, param2).

Typedef Documentation

typedef void(* BSP_Systick_Callback_T)(void)

Type definition for the SysTick callback

Note
If an operating system is in use it may needs to perform some operations each system clock tick, this callback has to be provided by the application through BSP_Board_OSTickInitialize() function.
typedef void(* OStoBSPDelayFunc_T)(uint32_t)

Type definition for the delay function which is passed from the OS to the BSP in order to replace the blocking delay function.

Parameters
uint32_texpected delay parameter type.

Function Documentation

Retcode_T BSP_Board_ControlPowerRail ( uint32_t  control)

: provided that there are controllable power rails on the board, the BSP will provide the necessary commands that are possible to have in order to control them safely.

Parameters
controlthe desired power rail command implemented by the BSP.
Return values
RETCODE_OKin the case of success or an error code otherwise.
void BSP_Board_Delay ( uint32_t  delay)
Parameters
delayspecifies the delay time
Note
Refer to your implementation for time granularity details.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void BSP_Board_DelayUs ( uint32_t  delayInUs)
Parameters
[in]delayInUsspecifies the delay time in us
Note
Refer to your implementation for time granularity details.
uint32_t BSP_Board_DetectPowerSupply ( void  )

This function detects whether the MCU is being supplied using a battery or using an external power supply.

Returns
the current power supply type.
void BSP_Board_DisableSysTick ( void  )
Retcode_T BSP_Board_EnableSysTick ( void  )
Return values
RETCODE_OKif success
RETCODE_FAILUREif failure

+ Here is the caller graph for this function:

uint32_t BSP_Board_GetBoardRevision ( void  )
Returns
BSP Revision.
uint64_t BSP_Board_GetTick ( void  )
Note
Refer to your implementation for time granularity details.
uint32_t BSP_Board_GetWakeupSource ( void  )

This function will return the last event that resulted in the wake-up of the MCU from a sleep/deep-sleep state.

Returns
The latest wake-up event source.
Retcode_T BSP_Board_Initialize ( uint32_t  param1,
void *  param2 
)

This function is responsible of setting the initial configuration at the MCU and board level in order to establish a running state and perform basic operations.

The MCU resources are at this time configured according to their use cases and shut-down in order to maintain a low power consumption. As an example for a UART interface the BSP_Board_Initialize(param1, param2) will set the baudrate, the parity, the number of data bits, the number of stop bits, etc. and then disables the UART and turns off its clock.

Parameters
param1: Initialization parameter depending on the implementation, can be used to indicate type of param2.
param2: Initialization parameter depending on the implementation.
Return values
RETCODE_OKin the case of success or an error code otherwise.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void BSP_Board_OSTickInitialize ( BSP_Systick_Callback_T  preCallback,
BSP_Systick_Callback_T  postCallback 
)

If an operating system needs to perform some operations before and/or after the system tick count is incremented the application needs to call this function and provide the callbacks which are called before and after the tick increment.

Parameters
preCallbackA pointer to the function which the system needs to execute before incrementing the tick count of the system tick.
Note
If no pre-processing is needed provide NULL.
Parameters
postCallbackA pointer that points to the function which the system needs to execute after incrementing the tick count of the system tick.
Note
If no post-processing is needed provide NULL.

+ Here is the caller graph for this function:

void BSP_Board_SetOStoBSPDelayFunc ( OStoBSPDelayFunc_T  delayFunc)

If the application needs to replace the blocking delays greater than 50ms with non blocking delays it has to assign the delay function to this function pointer.

In general the delays implemented have 1 ms granularity.

Parameters
delayFuncdelay function.

+ Here is the caller graph for this function:

void BSP_Board_SoftReset ( void  )

+ Here is the caller graph for this function:

Retcode_T BSP_Board_SwitchPowerMode ( uint32_t  powerMode)

This function is responsible of preparing switching between the available MCU power modes if the transition from the current mode to the next mode is allowed. Depending on the selected mode this function implements the recovery routines in order to bring the system to the state before it switched to that power mode.

Parameters
powerMode32 bit value designating the desired power mode according to what is specified in the implementation under BSP_BoardType.h
Return values
RETCODE_OKin the case of success or an error code otherwise.

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:53 by doxygen 1.8.8