BluePill crashes but keeps output pins in their last state
Posted: Tue Apr 02, 2024 4:26 pm
I am using a Blue Pill STM32103FC8T6 for flight control of a drone and an MPU6050 as an IMU connected to the I2C2 port (PB10-SCL and PB11-SDA).
With this code everything works normally:
With this code the Blue Pill crashes after about 15 seconds:
Effects of the crash:
Is there any way to make sure that if the BluePill crashes, it turns off all its outputs instead of keeping them active? Any firmware modification?
PS: I don't know if it helps but I am using Arduino IDE 1.8.3 with the following configurations. I upload the code using an FTDI but I also have a ST-Link V2
With this code everything works normally:
Code: Select all
#include <SoftWire.h>
SoftWire HWire(PB10, PB11, I2C_FAST_MODE);
Code: Select all
#include <Wire.h>
TwoWire HWire (2, I2C_FAST_MODE);
- LED PC13 flashes.
- Any type of communication is lost (both UART and I2C).
- The control outputs of the ESCs are not turned off but maintain their last state.
- The only way to reverse the crash is to press the reset button.
Is there any way to make sure that if the BluePill crashes, it turns off all its outputs instead of keeping them active? Any firmware modification?
PS: I don't know if it helps but I am using Arduino IDE 1.8.3 with the following configurations. I upload the code using an FTDI but I also have a ST-Link V2