FC bricked after firmware change

Type of FC: MatekH743
PX4 version 1.15.2 (stable)

Today I bricked an FC after a transistor got to hot. I am pretty sure that I can rule out a short circuit and I assume that it is a firmware issue.

I compiled the PX4 code for target matek_h743 first with the current main branch (1.16.0-alpha2) with the following changes:

boards/matek/h743/init/rc.board_sensors

qmc5883l -X start -a 13

changed to

ist8310 -X -b 1 -R 10 start

boards/matek/h743/src/hw_config.h

#define BOARD_TYPE 139

changed to

#define BOARD_TYPE 1013

src/drivers/pwm_out/module.yaml

    default: 400

changed from PWM 400 Hz to DSHOT300

    default: -4

The code seemed to work fine on the Matek board and I was able to start the configuration in QGC. I got stuck with assigning the motors, only Motor 1&2 would spin (while testing I had to plug in the battery a couple times). After I while I noticed that I couldn’t safe params anymore and later I noticed a 100€ smell. The FC got bricked. I repeated the process for the exact same FC with PX4 v1.15.2 and same changes and I had to safe it before it got too hot again.

Is it my changes or is there a bug in the rest of the code that could have caused this failure?