I think this will be helpful with some adjustments.https://github.com/ScarsFun/STM32_I2C_ScannerIt is designed for the STM32F103C8T6 board and scans I2C devices, outputting the addresses via USB CDC. To use external pull-ups at 1.8V, you will need to...
When an EXTI interrupt occurs, it will wake up the MCU from STOP2 mode. If the EXTI interrupt happens every 20 seconds, this frequent wake-up can prevent the MCU from entering or staying in STOP2 mode for longer periods. Keep the EXTI ISR as short as...
SPI mode set in the STM32 matches the mode expected by the LSM6DS3. If necessary, try switching to CPOL=0, CPHA=0 (Mode 0) and see if that resolves the issue. If you fear that your sensor itself is faulty, you can cross-check the sensor with an Ardui...
Check the stability of your power supply. Sudden drops or fluctuations in voltage could cause the microcontroller to behave erratically or peripherals to malfunction. If you have made a custom board with the stm32f407VGT, you must check if your PCB h...