I was thinking of this thread earlier
I was working on my Li-Ion charging routines, using buck/boost hardware - and I choose to unplug my PK4 from the board. Immediately things started to go 'funny', and I wondered what I'd done to the code to 'break it' as it was fine previously. The PK4 is set to power the PIC during programming, and afterwards - as sometimes I work without the buck/boost board been powered.
Anyway, I was fairly busy, so I thought - I'll look at it later, and check that thread on the forum.
One of the things I was 'busy' with was assembling another buck/boost board - so once finished, I hooked it to a different (but identical PIC board) and a different battery, and all worked fine. So I thought I'd try unplugging the PK4 - and all still worked fine.
After a couple of seconds I realised why - the batteries were different - the failing one was a 16.8V 4S1P pack, and the working one just a 4.2V 1S1P pack - in both cases charging current was set to 1.040A. So the 16.8V battery was taking a LOT more current from the supply feeding it, and obviously hitting the current limit it was set to - and the resultant dip was resetting the PIC - leaving the PK4 connected kept the PIC supply from dipping, so no issues.
So a slightly different reason, but a very similar situation to the one in this thread - so PSU is well worth checking in such cases.