cancel
Showing results for 
Search instead for 
Did you mean: 

Battery charger using stm32 & ltc4015

ssena.1514
Associate III

Hi currently I am implementing a smart battery charger using stm32 & ltc4015.

But i could not understand how to perfectly configure ltc4015 through i2c protocol.

So could you please inform me how to write the i2c sequences to safely charge the battery.

Thanks & Regards

Satyabrata Senapati

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

sorry 

After reading datasheet I got the solution as follows:-

//Enable limit alerts

//first send lower byte then send higher byte

uint8_t dataBuffer0[2] = {0xF0,0xBF};

ret = HAL_I2C_Mem_Write(&hi2c1, LTC4015_DEVICE_ADDRESS_WRITE, 0x0D, I2C_MEMADD_SIZE_8BIT, dataBuffer0, 2, HAL_MAX_DELAY);

if (ret != HAL_OK)

{

Error_Handler();

}

 

ret = HAL_I2C_Mem_Read(&hi2c1,LTC4015_DEVICE_ADDRESS_READ,0x0D,I2C_MEMADD_SIZE_8BIT,(uint16_t*)(&register_value2), 2, HAL_MAX_DELAY);

if (ret != HAL_OK)

{

Error_Handler();

}

 

Best Regards

Satyabrata Senapati

Vasmed Health Sciences Pvt Ltd.

 

View solution in original post

5 REPLIES 5
Peter BENSCH
ST Employee

Your question is essentially identical to this one and should therefore be answered.

Hope that helps?

Regards
/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Hello sir I have already followed the answer to the question.

But I am not getting clear configuration results. Kindly give me clear tips how to perfectly configure the ltc4015.

so that it will charge the battery(RRC3570) in safe mode.

I mean the command sequence.

Thanks & Regards

Satyabrata Senapati

Peter BENSCH
ST Employee

Well, the LTC4015 is from a different manufacturer, I can only speak for the STM32. The user in the other thread had the same problem. So you would have to talk to Analog Devices or ask in their forum.

Good luck!
/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

ok sir thanks for the information.

 

sorry 

After reading datasheet I got the solution as follows:-

//Enable limit alerts

//first send lower byte then send higher byte

uint8_t dataBuffer0[2] = {0xF0,0xBF};

ret = HAL_I2C_Mem_Write(&hi2c1, LTC4015_DEVICE_ADDRESS_WRITE, 0x0D, I2C_MEMADD_SIZE_8BIT, dataBuffer0, 2, HAL_MAX_DELAY);

if (ret != HAL_OK)

{

Error_Handler();

}

 

ret = HAL_I2C_Mem_Read(&hi2c1,LTC4015_DEVICE_ADDRESS_READ,0x0D,I2C_MEMADD_SIZE_8BIT,(uint16_t*)(&register_value2), 2, HAL_MAX_DELAY);

if (ret != HAL_OK)

{

Error_Handler();

}

 

Best Regards

Satyabrata Senapati

Vasmed Health Sciences Pvt Ltd.