Both sensors now run over interrupts in pulse mode. This still needs

tweaking as its buggy but works for now on full speed for both sensors.
This commit is contained in:
2026-09-20 19:55:57 +02:00
parent 7ee381de58
commit 5e3dd3128b
25 changed files with 51334 additions and 49390 deletions
+10 -4
View File
@@ -64,7 +64,9 @@ typedef enum {
ICM45686_ACCEL_DATA = 0x00,
ICM45686_GYRO_DATA = 0x06,
ICM45686_FIFO_COUNT = 0x12,
ICM45686_FIFO_DATA = 0x14
ICM45686_FIFO_DATA = 0x14,
ICM45686_INT1_CONFIG2 = 0x18,
ICM45686_INT1_CONFIG0 = 0x16
} ICM45686_registers;
typedef enum {
@@ -138,13 +140,16 @@ void HAL_SPI_TxRxCpltCallback(SPI_HandleTypeDef *hspi);
void HAL_I2C_MemRxCpltCallback(I2C_HandleTypeDef *I2C_address);
void HAL_I2C_MemTxCpltCallback(I2C_HandleTypeDef *I2C_address);
void HAL_I2C_ErrorCallback(I2C_HandleTypeDef *hi2c);
void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin);
// ICM45686
void init_icm(ICM45686_HandleTypeDef *imu);
HAL_StatusTypeDef read_icm (ICM45686_HandleTypeDef *imu, uint8_t tx[], uint8_t rx[]);
HAL_StatusTypeDef read_icm_dma (ICM45686_HandleTypeDef *imu, uint8_t tx[], uint8_t rx[]);
HAL_StatusTypeDef write_icm (ICM45686_HandleTypeDef *imu, uint8_t tx[]);
HAL_StatusTypeDef read_icm (ICM45686_HandleTypeDef *imu, uint8_t tx[], uint8_t rx[], uint16_t len_tx);
HAL_StatusTypeDef read_icm_dma (ICM45686_HandleTypeDef *imu, uint8_t tx[], uint8_t rx[], uint16_t len_tx);
HAL_StatusTypeDef write_icm (ICM45686_HandleTypeDef *imu, uint8_t tx[], uint16_t len_tx);
void calibrate_icm (ICM45686_HandleTypeDef * imu, int samples);
void enable_interrupt_icm(ICM45686_HandleTypeDef *imu);
void configure_interrupt_icm (ICM45686_HandleTypeDef *imu);
// BMM350 - Declarations of read/write/delay functions for the BMM350 API
void bmm_init_DWT(void);
@@ -152,6 +157,7 @@ BMM350_INTF_RET_TYPE bmm350_i2c_read(uint8_t reg_addr, uint8_t *reg_data, uint32
BMM350_INTF_RET_TYPE bmm350_i2c_write(uint8_t reg_addr, const uint8_t *reg_data, uint32_t length, void *intf_ptr);
void bmm350_delay(uint32_t period_us, void *intf_ptr);
int8_t init_bmm(struct bmm350_dev *dev);
int8_t bmm_configure_interrupt (struct bmm350_dev *dev);
// structs that hold the sensor data
typedef struct {