I had some Ryobi batteries spontaneously stop working so I went down the rabbit hole of reverse engineering them, down to the component level and creating a full schematic. I did a bunch of testing and discovered that the firmware had a lockout triggered even though the batteries were healthy. I then figured out a way to clear the lockout and recover almost 40 dead batteries.
More details can be found in my Youtube video and Blog post.