If I run debug, I always got hardfault.
Here is source codes that cause hardfault.
flight_data.imu0_accel = imu0.getRawAccel();
flight_data.imu0_gyro = imu0.getRawGyro();
flight_data.imu1_accel = imu1.getRawAccel();
flight_data.imu1_gy...
Actually, there's no problems when I use this style on nRF52 series.The weirdest thing is that it works fine when I execute it in running mode.The problem is only occured in dubgging mode.
I got it from sensors that connected through I2C.I'm using HAL_I2C_Mem_Read to get raw data from sensors. Here is functions that the struct members takes.int16_t *ICM42670::getRawAccel(){
static int16_t output[3] = {0};
uint8_t regAddr = ICM42670_A...
Sorry for unclear explain.My problem is "Reading struct data cause hardfault only in debug running"When I got data and save it from sensor through I2C interface, there's no problems.My MCU is STM32H503RBT6. This code cause hardfaultflight_data.accel[...