cancel
Showing results for 
Search instead for 
Did you mean: 

ISM330DLC 3-wire mode

GnR
Associate II

Hi ST,
I have an custom board using the ISM330DLC but I'm having difficulty configuring it's primary bus for 3-wire SPI operation.
According to the ISM330DLC datasheet register CTRL3_C (0x12) must set to 0xC for 3-wire primary bus SPI mode to be enabled.
As can be seen from the following scope trace 0x0C is written to 0x12.

1.jpg

But when the 'Who Am I' register (0x0F) is read back 0x00 is received.
2.jpg
From the above I'm assuming that the CTRL3_C (0x12) command is not being received by the ISM330DLC as the SPI clock is not being pulled high as per the datasheet.
Before I replace the ISM330DLC can you please sanity check on the above?

Many thanks for your assistance
GnR

8 REPLIES 8
niccolò
ST Employee

Hi @GnR ,
a few questions to try to better understand the problem:

first of all, can you confirm that the CS pin moves how it should?
just to be sure, do you perform some other operations between the write and the read functions?
have you the possibility of confirming with I2C if the sensor is working?

Niccolò

 

GnR
Associate II

Hi Niccolo,
Many thanks for the response.

Find below the CS / Clock trace from the 'Who Am I' (0x0F) register read operation.
3.jpg
My SPI Register Read code is below which has no additional operations between the write and read function.
4.jpg

Due to the PCB layout I unfortunately do not have the means of controlling the I2C interface.

Many thanks
GnR 


Hi @GnR ,

the CS is ok, the thing I imagine is that the sensor did not received the command to go in 3wire SPI, so it is sending the response on SDA, instead of SDO. (if you could check with the oscilloscope that pin we can try to confirm that the sensor is alive)

then, another issue that I can think of is the power to the sensor, so could you double check it? how much is Vdd?
I would check that before replacing the sensor, but just to answer your question, on the microcontroller side, I really don't see any issue with the communication =)

Niccolò

GnR
Associate II

Hi Niccolo,

As SDA is not connected on my PCB it is very hard to guarantee a oscilloscope prob connection but I'm not seeing activity on SDA.
As for your other question Vdd = 1.8V and Vdd_IO = 3.3V.

Many thanks for the sanity check but it looks like I'm going to have to change the chip.

Regards
GnR

Hi @GnR ,

It is really strange, but let me know if changing the chip solves the issue.
otherwise there should be problems with the board, we can check the schematic, if you want

Niccolò

Hi Niccolo,

I removed the chip and confirmed that the PCB layout compared to the following schematic.
5.jpg

A brand new chip was then fitted but the results were exactly the same as before i.e. no response from the chip.
My end goal is to run the chip in Mode 4 but at this moment in time the MEMS_AUX lines are open circuit.


Regards
GnR

GnR
Associate II

Hi Niccolo,

I have spent the weekend confirming the above but I did not find any discrepancies.
The following was tried but nothing had an effect:
     - Connected SDx / SCx to ground.
     - Connected SDx / SCx to VDD_IO.
     - SDx / SCx open circuit and configured for mode 4.
Can you please confirm that the ISM330DLC has been proven to work in 3-wire mode?

Regards
GnR

GnR
Associate II

Hi Niccolo,
I managed to access to the SDO pin and i have made some progress.
Set register 0x12 to 0x08 to enable SPI 3-wire mode.
TEK00000.BMP
Then read register 0x12 and observed contents (0x08) on SDO.
TEK00001.BMP
ISM330DLC did not entre SPI 3-wire mode.
Experimented and discovered that if register 0x12 was set to 0x10 that SPI 3-wire mode was enabled.
TEK00002.BMP
Read register 0x12 and observed 0x10 on SDA, SPI 3-wire mode enabled. TEK00003.BMP
Question, is this a datasheet error or have I misinterpreted something?
Read register 0x0f (Who Am I) and observed 0xD4 on SDA.
TEK00004.BMP
Was expecting 0x6A as per datasheet, if 0x6A is shifted 1 bit left you get 0xD4.
The reading of registers must be correct as when 0x12 is read it is correct (see above) assuming datasheet error.


Regards
GnR