cancel
Showing results for 
Search instead for 
Did you mean: 

M41T62 driver error

GWitt
Associate

The M41T62 driver provided in STSW-M41T62 appears to have an error related to calibration of positive adjustments. Refer to the code below from line 750 of M41T62.c

The sign parameter is 0 or 1. To program the M41T62 for positive compensation requires programming the control register bit 5 with a logical 1. The code does not do this as it effects only bit 0 of the control register.

I suggest adding the following code at line 758:

sign = sign <<5;

M41T62_Error_et M41T62_Set_SignForCalibration(M41T62_SignCalibrationStatus_et sign)

{

 uint8_t tmp;

 M41T62_assert_param(IS_M41T62_CALIBRATION_SIGN(sign));

 if(M41T62_ReadRegs(M41T62_CALIBRATIONREG, 1, &tmp))

  return M41T62_ERROR;

 tmp &= ~M41T62_SIGN_CALIBRATION_MASK;

 tmp |= ((uint8_t)sign);

 if(M41T62_WriteRegs(M41T62_CALIBRATIONREG, 1, &tmp))

  return M41T62_ERROR;

 return M41T62_OK;

}

This discussion has been locked for participation. If you have a question, please start a new topic in order to ask your question
2 REPLIES 2
Imen.D
ST Employee

Hello @GWitt​ and welcome to the Community :)

Thanks for pointing out this issue.

I added the right topics "Analog and Audio" to your post in order to increase its chance to be reviewed by our Analog experts.

I will try to contact expert internally and I will come back to you with details.

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
Imen.D
ST Employee

Hi @GWitt​ ,

 I've heard back from the Analog team, and they said that the M41T62 driver has been discontinued and is unfortunately no longer supported by ST.

Thank you for your understanding.

Imen 

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen