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.

LM358: Current limit by LM358 in buck-boost circuit

Genius 3300 points
Part Number: LM358

1. I have a buck-boost IC, where input is 12V or higher and output I need is 12.6V to charge a lithium -ion battery 3 cells series

2. Need to limit charge current of battery to 0.650A, so according to datasheet I have selected 0.150ohm resistor.

3. If I dont connect D4, and connect battery to charge, it start taking 4Amps of current. But when I connect D4, current starts falling but it falls at very slow rate. Takes rough around 10 min to fall, meantime IC gets super hot and sometimes shut down itself.
What I am doing wrong here?

4. Also IC temperature goes to 98C sometimes, I placed a sensor on top of IC, Tj max allowed is 125C as per datasheet so very close operating I am.