Fixed DMA and INT bugs
- Fixed indexed task notifications for INT and DMAf for both sensors - Fixed the INT debugger startup freeze (added != NULL check in callbacks) - Fixed DMA notifications not being read properly/too early - Changed IMU INT configure/enable function as one - Added proper DMA checking in IMU calibration
This commit is contained in:
1 parent
5daac77a37
commit
1409bad40b
67 files changed
+52921
-51367
No files matched your search
+12
-4
@@ -10,10 +10,17 @@
|
||||
// I2C Handle
|
||||
extern I2C_HandleTypeDef hi2c1;
|
||||
extern osThreadId_t defaultTaskHandle;
|
||||
extern osThreadId_t xIMU_Task;
|
||||
extern osThreadId_t xMagn_Task;
|
||||
extern volatile osThreadId_t xIMU_Task;
|
||||
extern volatile osThreadId_t xMagn_Task;
|
||||
//extern osThreadId_t xData_Task;
|
||||
|
||||
typedef enum {
|
||||
ICM_NOTIFY_INT_DRDY = 0,
|
||||
ICM_NOTIFY_DMA = 1,
|
||||
BMM_NOTIFY_INT_DRDY = 0,
|
||||
BMM_NOTIFY_DMA = 1
|
||||
} SENSOR_NOTIFY_INDEX;
|
||||
|
||||
// ICM45686
|
||||
typedef struct {
|
||||
SPI_HandleTypeDef *hspi;
|
||||
@@ -66,7 +73,8 @@ typedef enum {
|
||||
ICM45686_FIFO_COUNT = 0x12,
|
||||
ICM45686_FIFO_DATA = 0x14,
|
||||
ICM45686_INT1_CONFIG2 = 0x18,
|
||||
ICM45686_INT1_CONFIG0 = 0x16
|
||||
ICM45686_INT1_CONFIG0 = 0x16,
|
||||
ICM45686_INT1_STATUS0 = 0x19
|
||||
} ICM45686_registers;
|
||||
|
||||
typedef enum {
|
||||
@@ -149,7 +157,7 @@ HAL_StatusTypeDef read_icm_dma (ICM45686_HandleTypeDef *imu, uint8_t tx[], uint8
|
||||
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);
|
||||
void configure_and_enable_int_icm (ICM45686_HandleTypeDef *imu);
|
||||
|
||||
// BMM350 - Declarations of read/write/delay functions for the BMM350 API
|
||||
void bmm_init_DWT(void);
|
||||
|
||||
Reference in new issue
Block a user