Because of the Thanksgiving holiday in the U.S., TI E2E design support forum responses may be delayed the week of Nov. 21. Thank you for your patience.

This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMAG5273: Threshold Value Setting

Part Number: TMAG5273

Hello, I am trying to set the threshold value and bit confused about the equation listed in the datasheet. For example for A2 variance the equation for the threshold in mT is 133(1+X_Y_RANGE)/128)*X_THR_CONFIG. Assuming we kept the default range of +/-133mT and assuming am I supposed to replace X_Y_RANGE with the absolute value in mT then the equation become (133*134/128)*X_THR_CONFIG but this translates to a very high number. I think I am misunderstanding something here and I appreciate it if you can shed more light and give an example of how to set the threshold to 5mT. Thank you.  

  • Hi Mustafa,

    Thank you for posting to the Sensing Forum!

    Regarding the given formula, (133(1 + X_Y_RANGE)/128)*X_THR_CONFIG, the value that you are supposed to substitute in for X_Y_RANGE is the bit value for what you chose for the X_Y_RANGE field in register SENSOR_CONFIG_2 shown in the image below. Additionally, X_THR_CONFIG would be substituted for the 8 bit, 2's complement binary value that gets stored in the X_THR_CONFIG register.

    For example, since you are using the default range +/-133mT, the bit value would be 0, giving you the following equation:

    (133(1 + 0)/128)*X_THR_CONFIG = (133/128)*X_THR_CONFIG

    If, for example, you were using the range +/-266mT, the bit value would be 1, giving you:

    (133(1 + 1)/128)*X_THR_CONFIG = (133(2)/128)*X_THR_CONFIG = (266/128)*X_THR_CONFIG

    So, to set a threshold to 5mT, you would need to solve for X_THR_CONFIG to get the 2's complement binary number to insert into the register:

    X_THR_CONFIG = (Threshold_in_mT * 128) / (133(1 + X_Y_RANGE))

    Once you get a value for X_THR_CONFIG, you will need to round to the nearest integer and convert it to the 2's complement binary value.

    Best,

    ~Alicia