cancel
Showing results for 
Search instead for 
Did you mean: 

The ID value read by ism330dhcx chip is always 0

6June.1
Associate II

Hi, st

The MCU platform I use is nrf52840. The sensor uses steval-mki207v1. The hardware connection method is mode 1. The SPI mode of MCU is mode0, the frequency is 8MHz, and the bit order is MSB first.

On this premise, no matter how many times I read the chip ID, the value is 0.What is the problem?

1 ACCEPTED SOLUTION

Accepted Solutions
6June.1
Associate II

Is the MCU platform SPI operation error problem, now has solved, Thanks�?

View solution in original post

5 REPLIES 5
6June.1
Associate II

Is the MCU platform SPI operation error problem, now has solved, Thanks�?

Eleon BORLINI
ST Employee

Hi @6June.1​ ,

glad to hear it and happy you reported you found the solution!

-Eleon

Hi, Eleon BORLINI

Now I've found some new problems.

Sometimes the value read from who AMI register will be 0x48. After finding this problem, I suspect that the connecting wire is unstable. After replacing the DuPont wire, the value read back to normal (0x6b). I want to ask what is the reason for this strange phenomenon.

In addition, I found that the accelerometer data rate can only be set at 833hz or below. If the accelerometer data rate is set above 1667hz (16673hz,3333hz,6667hz), the value read from the register is still the previous value, that is, the data setting above 1667hz always fails.

So I updated the driver file to the version of 5 days ago (ism330dhcx: fixed examples # 107) in Git library.

A step was added to the driver calling routine of this version(ism330dhcx_device_conf_set), but this step didn't seem to succeed.

After execution, I also read the value of this register(ism330dhcx_device_conf_get(&dev_ctx, &rst)), and the returned value is 0(rst == 0).

In other words, the device_conf bit is not really set to 1 and remains in the default state after the set is executed.

But according to the datasheet, it seems that this bit must be set to 1 to write the new configuration normally?

Now I'm a little confused, can you help me answer the three questions of appeal?

Hi @6June.1​ ,

I saw you added a new question here.

I'll respond to that one and close this thread.

-Eleon

OK, Thanks​