foxBMS  1.6.0
The foxBMS Battery Management System API Documentation
adi_ades183x_initialization.c File Reference

Implementation of some software. More...

#include "adi_ades183x_initialization.h"
#include "adi_ades183x_buffers.h"
#include "adi_ades183x_commands.h"
#include "adi_ades183x_defs.h"
#include "adi_ades183x_helpers.h"
#include <stdbool.h>
#include <stdint.h>
Include dependency graph for adi_ades183x_initialization.c:

Go to the source code of this file.

Macros

#define ADI_AFE_WAKEUP_TIME   ((ADI_DAISY_CHAIN_WAKE_UP_TIME_us / ADI_COEFFICIENT_US_TO_MS) + 1u)
 
#define ADI_ISO_SPI_WAKEUP_TIME   ((ADI_DAISY_CHAIN_READY_TIME_us / ADI_COEFFICIENT_US_TO_MS) + 1u)
 

Functions

static void ADI_ClearAllFlagsInStatusRegisterGroupC (ADI_STATE_s *adiState)
 TODO. More...
 
static void ADI_DisableBalancingOnStartup (ADI_STATE_s *adiState)
 Disable balancing. More...
 
static void ADI_GetSerialIdsOfAllIcsInString (ADI_STATE_s *adiState)
 TODO. More...
 
static void ADI_GetRevisionOfAllIcsInString (ADI_STATE_s *adiState)
 TODO. More...
 
static void ADI_InitializeConfiguration (ADI_STATE_s *adiState)
 Initialize the driver configuration. More...
 
static void ADI_ResetErrorTable (ADI_STATE_s *adiState)
 Resets the error table. More...
 
static void ADI_ResetIirFilterOnStartup (ADI_STATE_s *adiState)
 Reset TODO. More...
 
static void ADI_StartContinuousCellVoltageMeasurements (ADI_STATE_s *adiState)
 Start cell voltage measurement. More...
 
static void ADI_WakeUpDaisyChain (ADI_STATE_s *adiState)
 Wake up the AFE. More...
 
void ADI_InitializeMeasurement (ADI_STATE_s *adiState)
 Implements the initialization for the ades183x driver. More...
 

Detailed Description

Implementation of some software.

SPDX-License-Identifier: BSD-3-Clause

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

We kindly request you to use one or more of the following phrases to refer to foxBMS in your hardware, software, documentation or advertising materials:

  • ″This product uses parts of foxBMS®″
  • ″This product includes parts of foxBMS®″
  • ″This product is derived from foxBMS®″
Author
foxBMS Team
Date
2019-08-27 (date of creation)
Updated
2023-10-12 (date of last update)
Version
v1.6.0
Prefix
ADI

Definition in file adi_ades183x_initialization.c.

Macro Definition Documentation

◆ ADI_AFE_WAKEUP_TIME

#define ADI_AFE_WAKEUP_TIME   ((ADI_DAISY_CHAIN_WAKE_UP_TIME_us / ADI_COEFFICIENT_US_TO_MS) + 1u)

Definition at line 69 of file adi_ades183x_initialization.c.

◆ ADI_ISO_SPI_WAKEUP_TIME

#define ADI_ISO_SPI_WAKEUP_TIME   ((ADI_DAISY_CHAIN_READY_TIME_us / ADI_COEFFICIENT_US_TO_MS) + 1u)

Definition at line 70 of file adi_ades183x_initialization.c.

Function Documentation

◆ ADI_ClearAllFlagsInStatusRegisterGroupC()

static void ADI_ClearAllFlagsInStatusRegisterGroupC ( ADI_STATE_s adiState)
static

TODO.

TODO

Parameters
adiStatestate of the driver

Definition at line 145 of file adi_ades183x_initialization.c.

Here is the call graph for this function:

◆ ADI_DisableBalancingOnStartup()

static void ADI_DisableBalancingOnStartup ( ADI_STATE_s adiState)
static

Disable balancing.

TODO

Parameters
adiStatestate of the driver

Definition at line 187 of file adi_ades183x_initialization.c.

Here is the call graph for this function:

◆ ADI_GetRevisionOfAllIcsInString()

static void ADI_GetRevisionOfAllIcsInString ( ADI_STATE_s adiState)
static

TODO.

TODO

Parameters
adiStatestate of the driver

Definition at line 215 of file adi_ades183x_initialization.c.

Here is the call graph for this function:

◆ ADI_GetSerialIdsOfAllIcsInString()

static void ADI_GetSerialIdsOfAllIcsInString ( ADI_STATE_s adiState)
static

TODO.

TODO

Parameters
adiStatestate of the driver

Definition at line 201 of file adi_ades183x_initialization.c.

Here is the call graph for this function:

◆ ADI_InitializeConfiguration()

static void ADI_InitializeConfiguration ( ADI_STATE_s adiState)
static

Initialize the driver configuration.

TODO

Parameters
adiStatestate of the driver

SM_VCELL_RED: Cell Voltage Measurement Redundancy CTH[2:0]=0b010 -> S-ADC comparison threshold set to 9 mV

Definition at line 229 of file adi_ades183x_initialization.c.

Here is the call graph for this function:

◆ ADI_InitializeMeasurement()

void ADI_InitializeMeasurement ( ADI_STATE_s adiState)

Implements the initialization for the ades183x driver.

This function contains the sequence of events

Parameters
adiStatestate of the driver

Definition at line 512 of file adi_ades183x_initialization.c.

Here is the call graph for this function:

◆ ADI_ResetErrorTable()

static void ADI_ResetErrorTable ( ADI_STATE_s adiState)
static

Resets the error table.

This function should be called during initialization or before starting a new measurement cycle

Parameters
adiStatestate of the driver

Definition at line 402 of file adi_ades183x_initialization.c.

◆ ADI_ResetIirFilterOnStartup()

static void ADI_ResetIirFilterOnStartup ( ADI_STATE_s adiState)
static

Reset TODO.

TODO

Parameters
adiStatestate of the driver

Definition at line 458 of file adi_ades183x_initialization.c.

Here is the call graph for this function:

◆ ADI_StartContinuousCellVoltageMeasurements()

static void ADI_StartContinuousCellVoltageMeasurements ( ADI_STATE_s adiState)
static

Start cell voltage measurement.

This function should be called during initialization or before starting a new measurement cycle

Parameters
adiStatestate of the driver

SM_VCELL_RED: Cell Voltage Measurement Redundancy Set RD bit to enable redundant cell voltage measurements

Definition at line 472 of file adi_ades183x_initialization.c.

Here is the call graph for this function:

◆ ADI_WakeUpDaisyChain()

static void ADI_WakeUpDaisyChain ( ADI_STATE_s adiState)
static

Wake up the AFE.

TODO

Parameters
adiStatestate of the driver

Definition at line 493 of file adi_ades183x_initialization.c.

Here is the call graph for this function: