ISL49212 standalone interfacing to RA2A1

I downloaded the sample code of ISL94212  and i successfully build the code in e2 studio . I am able to build in debugging it in MCU RA2A1 .  here i am using the console tera term and also follow all settings according to the documents .

but when i run the code i got on console  "cant process the error FAULT Detected "  even i chnage the stack size becuase i am using only one 

setting accroding to the single device in  "r_bfe_cfg.h" file 

/** Number of devices in a stack (14 max). Please, refer to ISL94212 Datasheet! */
#define BFE_CFG_STA_DEV (1U)//3

/** BFE enable pin is '1' - connected / '0' - Not connected (Recommended). */
#define BFE_CFG_USE_ENBL_PIN (1)//0

/** BFE go to sleep using watchdog timeout '1' - enabled/ '0' - disabled (Recommended). */
#define BFE_CFG_WDT_SLEEP_EN (0)

/** '1' - Enable (Recommended)/ '0' - Disable input parameters checking of functions. */
#define BFE_CFG_PARAM_CHECKING_EN (1)

/** '1' - Enable (Recommended)/ '0' - Disable register verification after write command. */
#define BFE_CFG_REG_WRITE_VERIFY_EN (1)

/** '1' - Enable (Recommended)/ '0' - Disable scan command verification. */
#define BFE_CFG_SCAN_CMND_VERIFY_EN (1)

/** Maximal attempts for stack identification. */
#define BFE_CFG_STACK_IDENT_MAX (3U)//3

/** Data Ready pin. */
#define BFE_DAT_RDY_PIN (BSP_IO_PORT_01_PIN_01)

/** Fault pin. */
#define BFE_FAULT_PIN (BSP_IO_PORT_02_PIN_04)

/** Enable pin. */
#define BFE_ENBL_PIN (BSP_IO_PORT_04_PIN_02)

and i also changes in "bal_data.c" file

4 * DISCLAIMER
* This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products. No
* other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all
* applicable laws, including copyright laws.
* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED. TO THE MAXIMUM
* EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES
* SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO
* THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
* Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability of
* this software. By using this software, you agree to the additional terms and conditions found by accessing the
* following link:
* www.renesas.com/disclaimer
*
* Copyright (C) 2021 Renesas Electronics Corporation. All rights reserved.
*********************************************************************************************************************/
/******************************************************************************************************************//**
* @file bal_data.c
* @version 1.00
* @brief Contains declaration of global structures.
*********************************************************************************************************************/
/**********************************************************************************************************************
* History : DD.MM.YYYY Version Description
* : 16.08.2021 1.00 First Release
* : 12.11.2021 1.01 Data structures are modified.
*********************************************************************************************************************/

/**********************************************************************************************************************
Includes <System Includes> , "Project Includes"
*********************************************************************************************************************/
/* Generic headers */
#include <stdint.h>
#include <stdbool.h>

/* BFE related headers */
#include "bal_data.h"

/**********************************************************************************************************************
Macro definitions
*********************************************************************************************************************/

/**********************************************************************************************************************
Local Typedef definitions
*********************************************************************************************************************/

/**********************************************************************************************************************
Exported global variables
*********************************************************************************************************************/

/* BFE configuration */
st_bfe_ctrl_t g_bfe0_ctrl =
{
.bal_pattern = BFE_REG_BAL_MASK_NO_CELL,
.balance_cell_sel =
{
BFE_REG_BAL_MASK_NO_CELL,
//BFE_REG_BAL_MASK_NO_CELL,
//BFE_REG_BAL_MASK_NO_CELL,

/* Add more if stack size is bigger */
},

#if BFE_CFG_STA_DEV > 1U // Daisy chain operation
.wd_time = BFE_WDT_128MIN,
#else // Stand-alone operation
.wd_time = BFE_WDT_DSBL,
#endif // BFE_CFG_DCH_OPERATION

.status =
{
.initialized = BFE_UNINITILIZED,
.in_sleep_mode = false,
.balancing = false,

.identify_ctr = 0
},

.setup =
{
.overvoltage_limit = BFE_CFG_OVP_LIMIT,
.undervoltage_limit = BFE_CFG_UVP_LIMIT,
.ext_temp_limit = BFE_CFG_ETP_LIMIT,

.i_wire_scan = BFE_WIRE_I_SCAN_1M,

.flt_tot_samples = BFE_TOT_4_SMPL,
.balance_mode = BFE_BALANCE_MODE_MANUAL,

/* Configure cell inputs for each device. */
.cells_cfg = {
/* Device 1 */
( BFE_REG_MASK_CELL_1
| BFE_REG_MASK_CELL_2
| BFE_REG_MASK_CELL_3
| BFE_REG_MASK_CELL_4
| BFE_REG_MASK_CELL_5
| BFE_REG_MASK_CELL_6
| BFE_REG_MASK_CELL_7
| BFE_REG_MASK_CELL_8
| BFE_REG_MASK_CELL_9
| BFE_REG_MASK_CELL_10
| BFE_REG_MASK_CELL_11
| BFE_REG_MASK_CELL_12),

/* Device 2
( BFE_REG_MASK_CELL_1
| BFE_REG_MASK_CELL_2
| BFE_REG_MASK_CELL_3
| BFE_REG_MASK_CELL_4
| BFE_REG_MASK_CELL_5
| BFE_REG_MASK_CELL_6
| BFE_REG_MASK_CELL_7
| BFE_REG_MASK_CELL_8
| BFE_REG_MASK_CELL_9
| BFE_REG_MASK_CELL_10
| BFE_REG_MASK_CELL_11
| BFE_REG_MASK_CELL_12),*/

/* Device 3
( BFE_REG_MASK_CELL_1
| BFE_REG_MASK_CELL_2
| BFE_REG_MASK_CELL_3
| BFE_REG_MASK_CELL_4
| BFE_REG_MASK_CELL_5
| BFE_REG_MASK_CELL_6
| BFE_REG_MASK_CELL_7
| BFE_REG_MASK_CELL_8
| BFE_REG_MASK_CELL_9
| BFE_REG_MASK_CELL_10
| BFE_REG_MASK_CELL_11
| BFE_REG_MASK_CELL_12),*/

/* Add more if stack size is bigger */
},

/* Configure temperature inputs for each device. */
.temps_cfg = {
/* Device 1 */
( BFE_REG_MASK_TEMP_IC
| BFE_REG_MASK_TEMP_EXT1
| BFE_REG_MASK_TEMP_EXT2
| BFE_REG_MASK_TEMP_EXT3
| BFE_REG_MASK_TEMP_EXT4),

/* Device 2
( BFE_REG_MASK_TEMP_IC
| BFE_REG_MASK_TEMP_EXT1
| BFE_REG_MASK_TEMP_EXT2
| BFE_REG_MASK_TEMP_EXT3
| BFE_REG_MASK_TEMP_EXT4),*/

/* Device 3
( BFE_REG_MASK_TEMP_IC
| BFE_REG_MASK_TEMP_EXT1
| BFE_REG_MASK_TEMP_EXT2
| BFE_REG_MASK_TEMP_EXT3
| BFE_REG_MASK_TEMP_EXT4),*/

/* Add more if stack size is bigger */
},

/* Configure temperatures to be fault monitored. */
.temp_flt_mon = {
/* Device 1 */
( BFE_REG_MASK_TEMP_IC),

/* Device 2 */
// ( BFE_REG_MASK_TEMP_IC),

/* Device 3 */
// ( BFE_REG_MASK_TEMP_IC),

/* Add more if stack size is bigger */
}
}
};

const st_bfe_cfg_t g_bfe0_cfg =
{
#if BFE_CFG_STA_DEV > 1U
.mode = BFE_CONFIG_DAISY_CHAIN,
.d_rate_dch = BFE_D_RT_250_KHZ
#else
.mode = BFE_CONFIG_STANDALONE
#endif // BFE_CFG_DCH_OPERATION
};

/* Instance structure to use BFE module. */
const bfe_instance_t g_bfe0 =
{ .p_ctrl = &g_bfe0_ctrl, .p_cfg = &g_bfe0_cfg, .p_api = &g_bfe_on_bfe };

/**********************************************************************************************************************
Private (static) variables and functions

according to the document i should get the 

here i attached the document of sample code and source code please give me solution if any setting mismatch other any issue please suggesst me why i am not getting this type information on console

this is the link of the sample code document

https://www.renesas.com/us/en/document/mas/isl94212-software-manual?language=en&r=1167776

and in this link, you can get sample code 

www.renesas.com/.../isl94212evkit1z-multi-cell-li-ion-battery-manager-evaluation-kit

Parents
  • Hi There,

    1. Please, check if SW1, SW2 and SW3 are in the position described on Figure 17 in the ISL94212 Sample Code Software Manual!
    2. Please, recheck connection between EK-RA2A1 eval board and ISL94212EV1Z to be like Table 2 from the ISL94212 Sample Code Software Manual!
    3. Using the setting #define BFE_CFG_USE_ENBL_PIN (1) in r_bfe_cfg.h which is not the recommended one, requires adding an additional jumper wire. Please, do the following:
    • Remove the two jumpers from ENR and EN.
    • Connect J1-CTS9 pin of the EK-RA2A1 eval board to ISL94212 EN pin as shown on the picture.

     Do you see any warnings after building the project in e2studio?

    BR JE_REN

Reply
  • Hi There,

    1. Please, check if SW1, SW2 and SW3 are in the position described on Figure 17 in the ISL94212 Sample Code Software Manual!
    2. Please, recheck connection between EK-RA2A1 eval board and ISL94212EV1Z to be like Table 2 from the ISL94212 Sample Code Software Manual!
    3. Using the setting #define BFE_CFG_USE_ENBL_PIN (1) in r_bfe_cfg.h which is not the recommended one, requires adding an additional jumper wire. Please, do the following:
    • Remove the two jumpers from ENR and EN.
    • Connect J1-CTS9 pin of the EK-RA2A1 eval board to ISL94212 EN pin as shown on the picture.

     Do you see any warnings after building the project in e2studio?

    BR JE_REN

Children