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.

TMAG5170: Can't trigger conversion via SPI command

Part Number: TMAG5170

Dears,

I'm in progress of writing SPI driver for TMAG5170 sensor. So far I created part with the automatic triggers (continuous conversion & duty-cycled modes) and they are working fine. Now I want to move to manual trigger modes (standby, active trigger & configuration). Here my problem begins.

I setup my sensor like this:

0F 00 04 07 - Packet to disable CRC

00 00 00 00 - Enter configuration mode

01 01 C0 00 - Enable all magnetic channels

02 00 00 00 - Explicit set trigger at SPI command (this is the default value of the register anyway)

Now I send the SPI trigger conversion command by setting CMD0 to 1:

And after 50ms I read all the magnetic registers:

However, as you can see, they are all zero. Can you tell me what is wrong with my setup?

What I've tried so far:

- Different TMAG sensor (I'm using TMAG5170UEVM, so I have two of them)

- Different SPI clock frequency

- Trying to issue the SPI command by writing/reading other registers

- Tried in different modes (configuration, standby & active trigger)

- Set TRIGGER_MODE in SYSTEM_CONFIG to 1 (conversion start at CS pulse) -> this actually works, but I want to trigger it with SPI command.

  • Hey Michals,

    Thanks for considering to use Texas Instruments.  When you read other registers, did you check to see if all of the configuration registers had the values you wrote or intended to write?  Did you verify that the signals looked clean with an oscilloscope?

  • Hey Patrick,

    Yes, when I read the register that I written to moment ago, I can see the desired value being outputted.

    Here is the screen (I experimented with some other settings, so the configuration values differ from those posted in the first post):

    The device is now in stand-by mode. As you can see I also enabled CRC calculations. Regarding your second question, no, I did not check it with an oscilloscope yet, however please look below. This is the frame that is intended to trigger the conversion:

    As you can see, at the end of this frame there is CRC. The next read request has got the first byte equal to 0x40, which means most significant bit is not set and thus PREV_CRC_STAT is not present, which means CRC for the trigger frame was correct. If there was some noise on the bus, I think the CRC would be wrong (of course, there is a low probability that both, data bits and crc were distorted and then thanks to some luck the CRC is correct even for wrong data, but I also tried to trigger the conversion by reading & writing to other registers, TMAG never returned CRC error for any of those operations)

  • Hey Michals,

    Could you try increasing your hold time? The time between the last SCK falling edge and the CS rising edge looks rather short, perhaps there is some internal logic not getting latched before your CS goes high.

  • Hey Patrick,

    thanks for help. I can confirm, after I increased the hold time to 100us, the conversion is now properly triggered.