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.

TMAG3001: Wake on Change (Angle) While in Wake and Sleep Mode

Part Number: TMAG3001

Tool/software:

Greetings,

I've gotten my TMAG3001 part working to the point where in Continuous Mode I can read the Angle Result register and get real angle measurements (i.e. the result changes accurately as I rotate the magnet I am monitoring).  I can also put the TMAG3001 into Wake and Sleep mode (confirmed by monitoring the device power consumption - spikes can be seen at the specified sleep intervals where the device is waking up).

Ultimately, I'd like for this part to only issue interrupts to host controller when it detects that the angle of the magnet being monitored has changed more than ANG_HYS - which is the definition of "Wake on Change" feature.  I have tried to setup the Wake on Change feature configured for angle mode; however, it doesn't seem to work.  That is, I get no interrupts from the TMAG3001 when in Wake on Change mode - this is true regardless of operating mode (continuous, standby, or wake-and-sleep).  Please find my register settings below and let me know if I am missing something.  Thank you.

I'll also note, before it comes up, that I write register 0x01 LAST.  This is to ensure that I don't wake the device with more I2C writes after I've set it into wake-and-sleep mode.

Register

Value

Intent

0x00

0x00

0x01

0x13

Set for Low Noise mode and Wake-and-Sleep mode

0x02

0x37

Turns on X,Y channels and sets Sleep interval to 100ms

0x03

0x04

Turns on Angle measurement of X,Y

0x07

0x5C

Wake on change of Angle, sets the thresholds to be angular, sets the angular hysteresis to be 8°

0x09

0x00

0x0A

0x00

0x0B

0x00

0x04

0x00

0x05

0x00

0x06

0x00

0x08

0x68

Sets Threshold interrupt, pulsed interrupt, the interrupt should drive the INT pin 

  • Ha! I kept poking around and figured out my problem.  Seems when you engage "Wake on Change" mode, you should NOT also engage the THR_SEL - setting the THR_SEL to 01b seems to override the "Wake on Change" selection and sets the device comparing against the A_THR_REF and A_THR_BAND registers.  The datasheet indicates as much, however, I got confused reading the ANGLE_HYS field which seemed to state that the ANGLE_HYS would only be applied if the THR_SEL were set to 01b.

    For anyone else reading this - just treat "Wake on Change" and ANGLE_HYS as their own function that operate independent of the other Threshold setting registers.  My new register values are below:

    Register

    Value

    0x00

    0x00

    0x01

    0x13

    0x02

    0x37

    0x03

    0x04

    0x07

    0x4C

    0x09

    0x00

    0x0A

    0x00

    0x0B

    0x00

    0x04

    0x00

    0x05

    0x00

    0x06

    0x00

    0x08

    0x24

  • Thanks, man. It's a great help.

    edulicki@yahoo.com