foxBMS  1.5.0
The foxBMS Battery Management System API Documentation
nxp_mc33775a.h File Reference

Headers for the driver for the MC33775A analog front-end. More...

#include "nxp_mc33775a_cfg.h"
#include <stdint.h>
Include dependency graph for nxp_mc33775a.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void N775_Meas (N775_STATE_s *n775_state)
 trigger function for the N775 driver state machine. More...
 
bool N775_IsFirstMeasurementCycleFinished (N775_STATE_s *n775_state)
 gets the measurement initialization status. More...
 
STD_RETURN_TYPE_e N775_I2cWrite (uint8_t module, uint8_t deviceAddress, uint8_t *pData, uint8_t dataLength)
 trigger a write on the I2C bus of the slave. More...
 
STD_RETURN_TYPE_e N775_I2cWriteRead (uint8_t module, uint8_t deviceAddress, uint8_t *pDataWrite, uint8_t writeDataLength, uint8_t *pDataRead, uint8_t readDataLength)
 trigger a read on the I2C bus of the slave, first write address of register to read. More...
 
STD_RETURN_TYPE_e N775_I2cRead (uint8_t module, uint8_t deviceAddress, uint8_t *pData, uint8_t dataLength)
 trigger a read on the I2C bus of the slave. More...
 

Variables

N775_STATE_s n775_stateBase
 

Detailed Description

Headers for the driver for the MC33775A analog front-end.

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
2020-05-08 (date of creation)
Updated
2023-02-03 (date of last update)
Version
v1.5.0
Prefix
N775

Definition in file nxp_mc33775a.h.

Function Documentation

◆ N775_I2cRead()

STD_RETURN_TYPE_e N775_I2cRead ( uint8_t  module,
uint8_t  deviceAddress,
uint8_t *  pData,
uint8_t  dataLength 
)

trigger a read on the I2C bus of the slave.

Parameters
modulemodule number to address in the daisy-chain
deviceAddressaddress of the I2C device addressed
pDatadata read on I2C bus
dataLengthnumber of bytes to read

Definition at line 337 of file nxp_mc33775a.c.

Here is the call graph for this function:

◆ N775_I2cWrite()

STD_RETURN_TYPE_e N775_I2cWrite ( uint8_t  module,
uint8_t  deviceAddress,
uint8_t *  pData,
uint8_t  dataLength 
)

trigger a write on the I2C bus of the slave.

Parameters
modulemodule number to address in the daisy-chain
deviceAddressaddress of the I2C device addressed
pDatadata to write on I2C bus
dataLengthnumber of bytes to write

Definition at line 266 of file nxp_mc33775a.c.

Here is the call graph for this function:

◆ N775_I2cWriteRead()

STD_RETURN_TYPE_e N775_I2cWriteRead ( uint8_t  module,
uint8_t  deviceAddress,
uint8_t *  pDataWrite,
uint8_t  writeDataLength,
uint8_t *  pDataRead,
uint8_t  readDataLength 
)

trigger a read on the I2C bus of the slave, first write address of register to read.

Parameters
modulemodule number to address in the daisy-chain
deviceAddressaddress of the I2C device addressed
pDataWritedata written on I2C bus
writeDataLengthnumber of bytes to write
pDataReaddata read on I2C bus
readDataLengthnumber of bytes to read

Definition at line 295 of file nxp_mc33775a.c.

Here is the call graph for this function:

◆ N775_IsFirstMeasurementCycleFinished()

bool N775_IsFirstMeasurementCycleFinished ( N775_STATE_s n775_state)

gets the measurement initialization status.

Parameters
n775_statestate of the N775A driver
Returns
true if a first measurement cycle was made, false otherwise

Definition at line 1255 of file nxp_mc33775a.c.

Here is the call graph for this function:

◆ N775_Meas()

void N775_Meas ( N775_STATE_s n775_state)

trigger function for the N775 driver state machine.

This function contains the sequence of events in the N775 state machine. It must be called time-triggered, every 1ms.

Parameters
n775_statestate of the N775A driver

Definition at line 209 of file nxp_mc33775a.c.

Here is the call graph for this function:

Variable Documentation

◆ n775_stateBase

N775_STATE_s n775_stateBase
extern

Variable containing the state machine state for the MC33775A driver.

Definition at line 104 of file nxp_mc33775a.c.