Skip to main content
ssena.1514
Associate III
September 14, 2023
Solved

Battery charger using stm32 & ltc4015

  • September 14, 2023
  • 2 replies
  • 2258 views

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

 

 

 

 

This topic has been closed for replies.
Best answer by ssena.1514

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.

 

2 replies

Peter BENSCH
Technical Moderator
September 14, 2023

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.
ssena.1514
Associate III
September 14, 2023

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
Technical Moderator
September 14, 2023

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.
ssena.1514
Associate III
September 14, 2023

ok sir thanks for the information.

 

ssena.1514
ssena.1514AuthorBest answer
Associate III
October 6, 2023

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.