Spark Core Dead? Running >160F

After several months of no issues, I’m back with an overheating Spark Core (see previous issue here: Spark Core running really hot). I’ve reset the firmware, given the Core lots of rest, but as soon as I plug it in to USB the whole board (just my Spark Core, nothing else connected) starts heating up - it reaches 170F on the top of the board in about 3-4 minutes and shuts off. It seems to be the STM that is generating most of the heat - after shutting down, blowing over it, and waiting maybe 20-30sec, the temperature of the STM is still 170F (rest of the board has by then cooled down to ~130F).
I’ve measured voltages - VIN is at 3.4V, 3V3 and 3V3* are at 3.1V. The low VIN reading seems to indicate the onboard LDO is not working right, though that component is not the hottest part around. Plugging the Spark Core into an external LDO via the VIN pin makes the external LDO overheat - so somewhere my Spark Core is pulling an excessive amount of Amps (is my guess).
I’m looking for advice on how to proceed here - is my trusty Spark Core dead or can I do something to fix her? Is there a way I could bypass the LDO (I’m typically running my Spark Core off of my own LDO anyways, connected to VIN).
Separate but related question - I’m using an LM7805 Regulator and am powering a LEGO train motor (with a choke on each motor line) - is there anything I could/should do to prevent the Particle Photon I’m using right now from dying a similar death? I have a simple 10nF cap across VIN and GND right now - do I need something else to filter out any ripples coming from the motor or the LDO? Any advice is much appreciated.

Actually - the STM32 hits 220F/110C - I just measured it. Really freakin’ hot.

Ho @PhilB,

I have blown one of my cores by applying wrong input voltages, and yes it get really hot and stops functioning after a couple of seconds. I declared her deceased.

About the motor connection, I think you need to apply a motor driver interface, I hope you did not connect the output pins of the core directly to the motor to switch it on or off. To kill unwanted spikes on the power lines I would suggest to place a diode, a 1n4148 with the Cathode connected to the positive supply of the motor and the anode to the negative supply rail. This will stop high voltage pulses. Those might be the reason off the dead of your core.
If you want to control a motor with the core, look up a motor driver circuit and put that in between the motor and the core.

@marcus - I don’t mention this in this post, but do so in my other post - my motor is connected to the Spark Core via a DRV8838 motor driver board. So that is not an issue. Would you still recommend using a diode if I already have a motor driver board?

Okay, I was a bit worried. Do you have a oscilloscope? Than you can monitor everything. It is possible that the motor generates sparks which transcend into your electronics. this noise should be less than 50mV or so
7805’s occasionally will oscillate, I assume you have 100nf’s over the input and output, to gnd?

Yes correct, I have 100nF caps across all VINs and GNDs on my breadboard (Spark Core, my motor driver, and an RFID reader). Additionally, I have the LM7805 wired up as per the datasheet with 2 caps, one across input, one across output (I believe 100nF and 33nF respectively - but might be wrong on the values - I used what was spec-ed on the datasheet)