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.