Quantcast
Channel: Power management forum - Recent Threads
Viewing all articles
Browse latest Browse all 35901

BQ27542-G1: Flash Update Params

$
0
0

Part Number:BQ27542-G1

Hello, 

I am using BQ27542-G1 and STM32L4+ microcontroler using I2C to manage my Li-Polymer Battery, 

I have to update Some BQ parameters according to my Battery settings, theses parameters are : 

#define BQ27542G1_DESIGN_CAPACITY_VALUE           (0x0960) /* 2400 mAh */
#define BQ27542G1_DESIGN_ENERGY_VALUE             (0x2198) /* 8600 mWh */
#define BQ27542G1_DESIGN_VOLTAGE_VALUE            (0x0E74) /* 3700 mV */
#define BQ27542G1_V_AT_CHG_TERM_VALUE             (0x1068) /* 4200 mV */
#define BQ27542G1_TERMINATE_VOLTAGE_VALUE     (0x0BB8) /* 3000 mV */
#define BQ27542G1_CHARGING_VOLTAGE_VALUE      (0x1068) /* 4200 mV */
#define BQ27542G1_OT_CHG_VALUE                             (0x01C2) /* 450 0.1°C */
#define BQ27542G1_OT_DSG_VALUE                             (0x0258) /* 600 0.1°C */

Based on linux drivers available under this link ( http://www.ti.com/tool/bq27xxxsw-linux) I have developed my own code source that allows me to: 

- UnSeal Data Flash memory and Verify Control Status register

- Read Data memory Block (using DataFlashClas, DataFlashBlock, DataFlashData and DataFlashChecksum Commands) 

- Verify Checksum value 

- Update data Buffer with my proper value

- Write Data memory Block  (using DataFlashClas, DataFlashBlock, DataFlashData and DataFlashChecksum Commands) 

- Seal Data Flash memory and Verify Control status register 

- Soft reset the BQ. 

To verify that parameters are correctly stored into my BQ, I read only data memory flash (in Unseal access Mode) and It was equal to what I wrote. 

Then, When acquiring BQ data, such as Remaining Capacity (command 0x10) or Full Charge Capacity (command 0x12 ),some acquired data are wrong, like : 

RAAC(0 mAh) , VOLT(4116 mV),  RARC(0 %), TEMP(26.1 *C) , AS(0 %), FULL, (0 mAh),  IAVG(-45 mA)

Note that, after modification registers, when reading the control status registers, all these bits are set to '1': [QEN], [RUP_DIS] and [LDMD] 

After that, I modified my defines declared above in order to reset the default configuration as described in the User manual, and the problem still persist! 

Finally, I compared the whole data block that I modified (Subclass ID 48, 82, 80, 34, 02) in two different BQs, the first with modified parameters and the second without any block modification, and data blocks are not similar ! there are another fields that are not the same, and not modified using my code source. 

Note that I Have to update these parameters using STM32 through I2C and not using BqStudio

So, My questions are: 

- Apart from steps that I described previously, Is there a missing step for writing data flash?

- Is it normal that I found some Data Block fields changed that I didn't set ? 

- Is these dependencies between parameters that I have to Set? Did I miss some parameter that I have to update ? 

Best Regards, 

Ghada, 


Viewing all articles
Browse latest Browse all 35901

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>