DEENESPTFRRUARHIKOZHNL

Bulk NvData Manager (BndM)

ModulBndM (Bulk NvData Manager)
BSW-Modul-ID23
Standard-Header#include "BndM.h"
SWS-SpezifikationAUTOSAR_CP_SWS_BulkNvDataManager.pdf, AUTOSAR_SWS_BulkNvDataManager.pdf
Umfang26 Records · 1 Snippets
ClusterSpeicher-Stack (Memory)

Bulk NvData Manager (BndM)

AUTOSAR Classic Memory Services-Modul Bulk NvData Manager (BndM, Spezifikation: AUTOSAR_CP_SWS_BulkNvDataManager.pdf, AUTOSAR_SWS_BulkNvDataManager.pdf).

Funktionen — Übersicht

Typen — Übersicht

Anforderungen — Übersicht

Funktionen & Typen — Detailansicht

function BndM_Init [SWS_BNDM_01004] 📄 PDF

void BndM_Init(const BndM_ConfigType* ConfigPtr);

Initializes or reinitializes this module.

function BndM_JobEndNotification [SWS_BNDM_01011] 📄 PDF

void BndM_JobEndNotification(void);

This callback function is called when a FLS job has been finished with positive result.

function BndM_JobErrorNotification [SWS_BNDM_01012] 📄 PDF

void BndM_JobErrorNotification(void);

This callback function is called when a FLS job has been canceled or finished with negative result.

function BndM_MainFunction [SWS_BNDM_01013] 📄 PDF

void BndM_MainFunction(void);

Schedule function for the background processing.

type BndM_ConfigType [SWS_BNDM_01001] 📄 PDF

This type of the external data structure shall contain the post build initialization data for the BndM.

type BndM_BlockIdType [SWS_BNDM_01002] 📄 PDF

Unique identification of an bulk nv block. The BndM_BlockId is assigned by the BndM.

type BndM_Block{BlockId.Shortname}Type [SWS_BNDM_01003] 📄 PDF

The elements of this structure data type is the C-structured representation of the configured ImplementationDataPrototype.

requirement SWS_BNDM_00001 [SWS_BNDM_00001] 📄 PDF

The BndM shall manage its BndM blocks ( BndMBlockDe- scriptor ) in the direct accessible memory (i.e. via pointer).

requirement SWS_BNDM_00002 [SWS_BNDM_00002] 📄 PDF

A call of BndM_GetBlockPtr shall deliver the base pointer to the corresponding BndM block ( BndMBlockDescriptor ) in the currently active partition.

requirement SWS_BNDM_00003 [SWS_BNDM_00003] 📄 PDF

A call of BndM_WriteStart shall trigger the preparation of the 2nd (free) partition.

requirement SWS_BNDM_00004 [SWS_BNDM_00004] 📄 PDF

A call of BndM_WriteBlock shall trigger the writing of the data to the 2nd (unused) partition. The data (ImplementationDataType) shall be not modified to allow a pointer access.

requirement SWS_BNDM_00005 [SWS_BNDM_00005] 📄 PDF

A call of BndM_WriteFinalize shall trigger the finalization of the 2nd (unused) partition. In background the BndM shall make the 2nd (unused) parti- tion consistent by coping all unchanged BndMBlockDescriptor to the 2nd (unused) partition. If the finalization is successful the BndM shall make the 2nd (unused) partition to the active partition and trigger the callback Xxx_BndMWriteFinalizeFinish with the result set to E_OK .

requirement SWS_BNDM_00006 [SWS_BNDM_00006] 📄 PDF

Type of error Related error code Error value API service called with wrong parameter BNDM_E_PARAM 0x01 API called in wrong sequence BNDM_E_WRONG_SEQUENCE 0x02

requirement SWS_BNDM_00007 [SWS_BNDM_00007] 📄 PDF

After preparation of the 2nd (free) partition [SWS_BndM_00003] is successfully finished (writing to the 2nd partition is pos- sible) the callback Xxx_BndMWriteStartFinish with the result set to E_OK shall be triggered in the context of the BndM_MainFunction .

requirement SWS_BNDM_00008 [SWS_BNDM_00008] 📄 PDF

After writing of [SWS_BndM_00004] the 2nd (free) partition is finished the callback Xxx_BndMWriteBlockFinish with the result set to E_OK shall be triggered in the context of the BndM_MainFunction .

requirement SWS_BNDM_00009 [SWS_BNDM_00009] 📄 PDF

If the finalization is NOT successful (the 2nd partition is not con- sistent and could therefore not be used) the BndM shall keep the current active parti- tion as the active partition and trigger the callback Xxx_BndMWriteFinalizeFinish with the result set to E_NOT_OK .

requirement SWS_BNDM_00010 [SWS_BNDM_00010] 📄 PDF

A call of BndM_WriteFinalize without a previously called BndM_WriteStart or within the finalization mode of the BndM the DET BndM_E_- WRONG_SEQUENCE error shall be thrown.

requirement SWS_BNDM_00011 [SWS_BNDM_00011] 📄 PDF

A call of BndM_WriteBlock shall be rejected with the error- Code E_NOT_OK , if the call is done without a previous call of BndM_WriteStart . or while another writing of the same or another block is ongoing or the call is done within the finalization mode of the BndM.

requirement SWS_BNDM_00012 [SWS_BNDM_00012] 📄 PDF

A call of BndM_WriteBlock shall be rejected with the error- Code E_NOT_OK , if the call is done while another writing of the same or another block is ongoing.

requirement SWS_BNDM_00013 [SWS_BNDM_00013] 📄 PDF

A call of BndM_WriteBlock shall be rejected with the error- Code E_NOT_OK , if the call is done within or after the finalization mode of the BndM.

requirement SWS_BNDM_00014 [SWS_BNDM_00014] 📄 PDF

A call of BndM_WriteStart shall be rejected with the error- Code E_NOT_OK , if the call is done within an active writing phase (phase between BndM_WriteStart and BndM_WriteFinalize ).

requirement SWS_BNDM_01020 [SWS_BNDM_01020] 📄 PDF

Det_ReportRuntimeError Det.h Service to report runtime errors. If a callout has been configured then this callout shall be called. Fls_Cancel Fls.h Cancels an ongoing job. Fls_Compare Fls_Com.h Compares the contents of an area of flash memory with that of an application data buffer. Fls_Erase Fls.h Erases flash sector(s). Fls_GetJobResult Fls.h Returns the result of the last job. Fls_GetStatus Fls.h Returns the driver state. Fls_Read Fls.h Reads from flash memory. Fls_SetMode Fls.h Sets the flash driver's operation mode. Fls_Write Fls.h Writes one or more complete flash pages.

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/CP_MOD_BndM
Status
unspecified
Version
AUTOSAR/AP/record/CP_MOD_BndM@rel:R20-11#f53e5538
Content hash
f53e5538
Source
https://www.autosar.org/fileadmin/standards/R20-11/CP/AUTOSAR_SWS_BulkNvDataManager.pdf#nameddest=SWS_BNDM_01004

Initialization and status

BndM_Init function

Initializes or reinitializes this module.

void BndM_Init(const BndM_ConfigType* ConfigPtr);

Services

This callback function is called when a FLS job has been finished with positive result.

void BndM_JobEndNotification(void);

This callback function is called when a FLS job has been canceled or finished with negative result.

void BndM_JobErrorNotification(void);

Cancels the writing

void BndM_WriteCancel(void);

Cyclic

Schedule function for the background processing.

void BndM_MainFunction(void);

Types

Unique identification of an bulk nv block. The BndM_BlockId is assigned by the BndM.

The elements of this structure data type is the C-structured representation of the configured ImplementationDataPrototype.

This type of the external data structure shall contain the post build initialization data for the BndM.

Result of the asynchronous job finish notifications

Requirements

SWS_BNDM_00001 requirement

The BndM shall manage its BndM blocks ( BndMBlockDe- scriptor ) in the direct accessible memory (i.e. via pointer).

SWS_BNDM_00002 requirement

A call of BndM_GetBlockPtr shall deliver the base pointer to the corresponding BndM block ( BndMBlockDescriptor ) in the currently active partition.

SWS_BNDM_00003 requirement

A call of BndM_WriteStart shall trigger the preparation of the 2nd (free) partition.

SWS_BNDM_00004 requirement

A call of BndM_WriteBlock shall trigger the writing of the data to the 2nd (unused) partition. The data (ImplementationDataType) shall be not modified to allow a pointer access.

SWS_BNDM_00005 requirement

A call of BndM_WriteFinalize shall trigger the finalization of the 2nd (unused) partition. In background the BndM shall make the 2nd (unused) parti- tion consistent by coping all unchanged BndMBlockDescriptor to the 2nd (unused) partition. If the finalization is successful the BndM shall make the 2nd (unused) partition to the active partition and trigger the callback Xxx_BndMWriteFinalizeFinish with the result set to E_OK .

SWS_BNDM_00006 requirement

Type of error Related error code Error value API service called with wrong parameter BNDM_E_PARAM 0x01 API called in wrong sequence BNDM_E_WRONG_SEQUENCE 0x02

SWS_BNDM_00007 requirement

After preparation of the 2nd (free) partition [SWS_BndM_00003] is successfully finished (writing to the 2nd partition is pos- sible) the callback Xxx_BndMWriteStartFinish with the result set to E_OK shall be triggered in the context of the BndM_MainFunction .

SWS_BNDM_00008 requirement

After writing of [SWS_BndM_00004] the 2nd (free) partition is finished the callback Xxx_BndMWriteBlockFinish with the result set to E_OK shall be triggered in the context of the BndM_MainFunction .

SWS_BNDM_00009 requirement

If the finalization is NOT successful (the 2nd partition is not con- sistent and could therefore not be used) the BndM shall keep the current active parti- tion as the active partition and trigger the callback Xxx_BndMWriteFinalizeFinish with the result set to E_NOT_OK .

SWS_BNDM_00010 requirement

A call of BndM_WriteFinalize without a previously called BndM_WriteStart or within the finalization mode of the BndM the DET BndM_E_- WRONG_SEQUENCE error shall be thrown.

SWS_BNDM_00011 requirement

A call of BndM_WriteBlock shall be rejected with the error- Code E_NOT_OK , if the call is done without a previous call of BndM_WriteStart . or while another writing of the same or another block is ongoing or the call is done within the finalization mode of the BndM.

SWS_BNDM_00012 requirement

A call of BndM_WriteBlock shall be rejected with the error- Code E_NOT_OK , if the call is done while another writing of the same or another block is ongoing.

SWS_BNDM_00013 requirement

A call of BndM_WriteBlock shall be rejected with the error- Code E_NOT_OK , if the call is done within or after the finalization mode of the BndM.

SWS_BNDM_00014 requirement

A call of BndM_WriteStart shall be rejected with the error- Code E_NOT_OK , if the call is done within an active writing phase (phase between BndM_WriteStart and BndM_WriteFinalize ).

SWS_BndM_00999 requirement

These requirements are not applicable to this specification.

SWS_BNDM_01019 requirement

There are no mandatory interfaces.

SWS_BNDM_01020 requirement

Det_ReportRuntimeError Det.h Service to report runtime errors. If a callout has been configured then this callout shall be called. Fls_Cancel Fls.h Cancels an ongoing job. Fls_Compare Fls_Com.h Compares the contents of an area of flash memory with that of an application data buffer. Fls_Erase Fls.h Erases flash sector(s). Fls_GetJobResult Fls.h Returns the result of the last job. Fls_GetStatus Fls.h Returns the driver state. Fls_Read Fls.h Reads from flash memory. Fls_SetMode Fls.h Sets the flash driver's operation mode. Fls_Write Fls.h Writes one or more complete flash pages.