This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

BQ25703A: Would not accept charge commands!

Part Number: BQ25703A
Other Parts Discussed in Thread: BQ25703

Hi,
I have designed a sample board to play with the BQ25703A, the problem is that I can read and write every register, but when I try to write these commands,
ChargeCurrent,MinSystemVoltage,

 BQ25703A  seems to reset and do not accept the commands.

Also when the battery pack is disconnected the ChargeOption0 command would take effect, but when I connect the battery pack it would not get the values.

Here is some parts of my code

int status;
	//ChargeOption3 Reset All Registers to default
	BQ25703WriteReg(0x34,0x6000);


	//ChargeOption0 			
	BQ25703WriteReg(0,0x060E);
	status=BQ25703ReadReg(0x0);
	//ChargeOption1
	BQ25703WriteReg(0x30,0x9211);
	status=BQ25703ReadReg(0x30);
	//ChargeOption2
	BQ25703WriteReg(0x32,0x02BF);
	status=BQ25703ReadReg(0x32);
	//ChargeOption3
	BQ25703WriteReg(0x34,0x0000);
	status=BQ25703ReadReg(0x34);
	//ProchotOption0
	BQ25703WriteReg(0x36,0x4A54);
	status=BQ25703ReadReg(0x36);
	//ProchotOption1
	BQ25703WriteReg(0x38,0x1000);
	status=BQ25703ReadReg(0x38);
	//ADCOption
	BQ25703WriteReg(0x3A,0xE0FF);
	status=BQ25703ReadReg(0x3A);
	//MaxChargeVoltage
	BQ25703WriteReg(0x04,0x41A0);
	status=BQ25703ReadReg(0x04);
	//ChargeCurrent @1A
	BQ25703WriteReg(0x02,0x0400);
	status=BQ25703ReadReg(0x02);
	//MinSystemVoltage @14.336V
	BQ25703WriteReg(0x0C,0x3800);
	status=BQ25703ReadReg(0x0C);
	//IIN_HOST @1A
	BQ25703WriteReg(0x0E,0x1400);
	status=BQ25703ReadReg(0x0E);
	//InputVoltage @8.192
	BQ25703WriteReg(0x0A,0x2000);
	status=BQ25703ReadReg(0x0A);
	//OTGVoltage @12.67V
	BQ25703WriteReg(0x06,0x2000);
	status=BQ25703ReadReg(0x06);
	//OTGCurrent @1.6A
	BQ25703WriteReg(0x08,0x2000);
	status=BQ25703ReadReg(0x08);

read and write functions

 

void BQ25703WriteReg(int add,int data)
{
	static HAL_StatusTypeDef mySTs;
	unsigned char write_message[3];
	write_message[0]=add;
	write_message[1]=data;
	write_message[2]=data>>8;
	mySTs=HAL_I2C_Master_Transmit(&hi2c1,BQ25703_ADD,write_message,3,1000);


}

int BQ25703ReadReg(int add)
{
	int res=0;
	
	unsigned char write_message[1];
	
	write_message[0]=add;
	
	unsigned char read_data[2]={0};
	HAL_I2C_Master_Transmit(&hi2c1,BQ25703_ADD,write_message,1,1000);
	
	//start to read RTC Data
	HAL_I2C_Master_Receive(&hi2c1,BQ25703_ADD,read_data,2,1000);

	res=(read_data[1]<<8) | read_data[0];
	return res;
}

Do you have any idea?

 

  • Ali,

    "I can read and write every register" Which register do you read and write? What do you write and what do you get?

    "but when I try to write these commands, ChargeCurrent,MinSystemVoltage, BQ25703A seems to reset and do not accept the commands."
    What do you write and what do you read back?

    When the battery pack is disconnected, why do you think the ChargeOption0 should be changed?
  • Dear Wang Li
    Thanks for the support, I have attached the code in the previous post and I have told in what registers, I have written what.

    for example in the ChargeOption0 reg I have written 0x060E
    in ChargeOption1 written 0x9211
    in ChargeOption2 written 0x02BF
    in ChargeOption3 written 0x0000
    in ProchotOption0 written 0x4A54
    in ProchotOption1 written 0x1000
    in ADCOption written 0xE0FF
    in MaxChargeVoltage written 0x41A0

    And when I write ChargeCurrent reg with 0x0400 which menas charge @ 1A, the charge OK led would blink, I mean the system voltage would disconnect and reconnect and every setting goes to default, also when I read back the ChargeCurrent reg at this stage I would get 0x0080 which is not zero!
  • Ali,

    In original email, you said, " BQ25703A seems to reset and do not accept the commands.". This issue was fixed, right?

    On your 2nd post, you said, "when I write ChargeCurrent reg with 0x0400 which menas charge @ 1A, the charge OK led would blink". CHRG_OK signal reports VBUS status and fault condition. So, please monitor VBUS voltage to see if it drops below UVLO threshold. That can cause some registers value reset.

    "also when I read back the ChargeCurrent reg at this stage I would get 0x0080 which is not zero!" This may further prove the VBUS voltage drop. Also, there is no battery at output. So, BQ25703A's auto wakeup function provides 128mA wakeup current until VSRN reaches Vsys_min setting.
  • Dear wang Li
    Thanks for your help, I have connected a 4S battery pack at the output, also I have used a 12v voltage from a 400w PC power supply to power up the BQ25703, but I still got the same results
  • CHRG_OK signal reports VBUS status and fault condition. So, please monitor VBUS voltage to see if it drops below UVLO threshold. That can cause some registers value reset. Would you share your test waveform here?

  • Hi Ali,
    One idea.
    Try write/read small current value 64mA. Not 1A.
    If it working, then possible problem with schematic or plate layout.
    Darius
  • Dear Wang Li

    Hi,

    Thanks for the update, I have only an analog scope, but I try to capture that, also I would share my Schematic and PCB files in here, maybe you could find something in it too.Main Controller.rar

  • Hi Darius
    Thanks for the TIP, I have corrected the problem, it was the lack of Polygon plane in the PCB, I have attached a tick wire to the bottom of the IC to the ground and now every thing works as expected, the new problem for now is that my Chip would heat up a lot, in the order of 60-70 degree with 1A charge setting, Also I have measured the charge current, it's not exactly 1A' it's about 500mA, what could cause the chip to heat up and not charging @ 1A?

    when there is no battery installed in the system and when I power the board with 12V, the board would draw about 100mA, and the chip would heat about 50 degree. do you have any Idea?
  • Ali,

    Do you want to review the schematic and layout for "Would not accept charge commands" issue or "it's not exactly 1A' it's about 500mA" issue?
    After you correct "the lack of Polygon plane in the PCB", is the "not accept charge commands" still there?

  • Dear Wang Li
    Hi, thanks for your support. the accepting charge commands is now Ok, and every command would get executed, the problem for now is the issue of "it's not exactly 1A' it's about 500mA" and the chip would get hot in stand by when it's charging or not charging, when it's charging it would get hotter. would you please check the schematic and PCB to see if there is any issue there? or is there something else?
  • Please help me verify and close this communication issue. We can review and schematic and layout for "it's not exactly 1A' it's about 500mA" issue.