Part Number:BQ35100
Hello,
I am working on BQ35100 to get battery level.
I have bq35100 integrated with stm32l071 on a board. I am NOT USING BQ STUDIO to calibrate bq35100.
In order to get battery level I need to calibrate the device and for calibration I have to write commands in UNSEALEDMODE.
This is the code I am trying - (Ref - slua640b)
void enterCalibrationMode(void) { printf("Entering Calibration Mode.\n"); send_subCommand(0x00, 0x2D); //Enable Calibration mode send_subCommand(0x00, 0x81); //Enter Calibration mode send_subCommand(0x00, 0x00); send_Command(0x00); unsigned char buffer[2] = { 0x00, 0x00 }; _delay_cycles(10000); I2C_read(buffer, 2); do { printf("%x\n", buffer[1]); printf("Gauge is not in Calibration mode.\n"); } while ((buffer[1] & 0x10) != 0x10); printf("Gauge is in Calibration mode.\n"); }
These steps always return "Gauge is not in Calibration mode".
I am not sure that the device is in UNSEALED MODE.
So, I want to know -
1. How to check BQ35100 is currently in which mode i.e. SEALED/UNSEALED/FULL ACCESS?
2. How to switch between different modes? Are there some keys to switch between them? If Yes, then how can I get them?