Resolved! lis2mdl driver computes the wrong hard iron offsets
lis2mdl_reg.c has an error in the function int32_t lis2mdl_mag_user_offset_set(stmdev_ctx_t *ctx, int16_t *val).The function incorrectly calculates the OFFSET_X_REG_H, OFFSET_Y_REG_H, and the OFFSET_Z_REG_H registers because it converts val[0] to an ...