eLooM for STM32 application  v3.3.0
A framework for multitasking low power embedded applications powerd by STM32
Loading...
Searching...
No Matches
sysinit.h File Reference

System global initialization. More...

+ Include dependency graph for sysinit.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  _APIVersion
 

Typedefs

typedef struct _APIVersion APIVersion
 

Functions

sys_error_code_t SysInit (boolean_t bEnableBootIF)
 
void SysPreSleepProcessing (uint32_t *ulExpectedIdleTime)
 
void SysPostSleepProcessing (uint32_t *ulExpectedIdleTime)
 
sys_error_code_t SysLoadApplicationContext (ApplicationContext *pAppContext)
 
sys_error_code_t SysOnStartApplication (ApplicationContext *pAppContext)
 
sys_error_code_t SysTaskErrorHandler (AManagedTask *pxTask)
 
boolean_t SysEventsPending (void)
 
IApplicationErrorDelegateSysGetErrorDelegate (void)
 
IBootSysGetBootIF (void)
 
IAppPowerModeHelperSysGetPowerModeHelper (void)
 
APIVersion SysGetAPIVersion ()
 

Detailed Description

System global initialization.

Author
STMicroelectronics - ST-Korea - MCD Team
Version
3.0.0
Date
Sep 6, 2016

This file declare the SysInit() API function that initializes the minimum set of resources, hardware and software, in order to start the scheduler. It creates the INIT task, that is the first task running in the minimum initialized environment, and it is responsible for the application startup. INIT implements the sequence diagram displayed in Fig.2

Fig.2 - System initialization diagram

For each managed task ...

Attention

Copyright (c) 2017 STMicroelectronics. All rights reserved.

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

Typedef Documentation

◆ APIVersion

typedef struct _APIVersion APIVersion

Create a type name for struct _APIVersion

Function Documentation

◆ SysEventsPending()

boolean_t SysEventsPending ( void  )

Check if there are pending SysEvent.

Returns
TRUE if there are SysEvent pending (that means to be served by the INIT task), FALSE otherwise.

◆ SysGetAPIVersion()

APIVersion SysGetAPIVersion ( )

Get the API version of the framework.

Returns
the API version of eLooM framework.

◆ SysGetBootIF()

IBoot * SysGetBootIF ( void  )

Get the Application defined Boot interface. A boot loader application should implement this interface. The default implementation is defined as weak so the application can provide its specific implementation. The default implementation does nothing.

Returns
a pointer to an IBoot object.

◆ SysGetErrorDelegate()

IApplicationErrorDelegate * SysGetErrorDelegate ( void  )

Get the Application manager error delegate. This function is used by the system during the application startup in order to get an application specific object that implements the IApplicationErrorDelegate. The default implementation is defined as weak so the application can provide its specific implementation. The default implementation does nothing.

Returns
a pointer to an IApplicationErrorDelegate object.
+ Here is the call graph for this function:

◆ SysGetPowerModeHelper()

IAppPowerModeHelper * SysGetPowerModeHelper ( void  )

Get the Application Power Mode Helper. This function is used by the system during the application startup in order to get an application specific object that implements the IAppPowerModeHelper. The default implementation is defined as weak so the application can provide its specific implementation. For more information about the default implementation see TODO: STF ...

Returns
a pointer to an IAppPowerModeHelper object.
+ Here is the call graph for this function:

◆ SysInit()

sys_error_code_t SysInit ( boolean_t  bEnableBootIF)

It initialize the minimum set of resources, hardware and software, in order to start the scheduler, and create the INIT task. If bEnableBootIF == TRUE the system enable the Boot Interface. It is useful to develop a bootloader.

Parameters
bEnableBootIFspecifies if the system has to enable the Boot Interface.
Returns
SYS_NO_ERROR_CODE if success, SYS_OUT_OF_MEMORY_ERROR_CODE if it is not possible to instantiate the INIT task.
+ Here is the call graph for this function:

◆ SysLoadApplicationContext()

sys_error_code_t SysLoadApplicationContext ( ApplicationContext pAppContext)

This function is used by the system in order to add all the managed tasks to the application context. It is defined as weak in order to allow the user application to redefine it.

Parameters
pAppContext[IN] specifies a pointer to the application context to load with the application specific managed tasks.
Returns
SYS_NO_ERROR_CODE if success, an error code otherwise.

◆ SysOnStartApplication()

sys_error_code_t SysOnStartApplication ( ApplicationContext pAppContext)

This function is called by the framework at the end of the initialization process and before the Init task releases the control to the application tasks. At this point all managed task has been created and the hardware is initialized. The application has a chance to execute some other initialization code before the scheduler runs the first application task.

Parameters
pAppContext[IN] specifies a pointer to the application context to load with the application specific managed tasks.
Returns
SYS_NO_ERROR_CODE if success, an error code otherwise.

◆ SysPostSleepProcessing()

void SysPostSleepProcessing ( uint32_t *  ulExpectedIdleTime)

Post Sleep Processing. Called by the kernel when the MCU exits a sleep mode because configPOST_SLEEP_PROCESSING is defined to SysPostSleepProcessing().

Parameters
ulExpectedIdleTimeNot used

◆ SysPreSleepProcessing()

void SysPreSleepProcessing ( uint32_t *  ulExpectedIdleTime)

Pre Sleep Processing. Called by the kernel before it places the MCU into a sleep mode because configPRE_SLEEP_PROCESSING() is defined to SysPreSleepProcessing().

Parameters
ulExpectedIdleTime[OUT] Expected time in idle state. It is set to 0 to indicate that SysPreSleepProcessing contains its own wait for interrupt or wait for event instruction and so the kernel vPortSuppressTicksAndSleep function does not need to execute the wfi instruction.

◆ SysTaskErrorHandler()

sys_error_code_t SysTaskErrorHandler ( AManagedTask pxTask)

Not used yet.

Parameters
pxTask
Returns