I know this question has been already asked, but the answers have not been found and the posts closed.
Whenever I try to read register 0x00 or 0x01, I get respectively 0xA0 and 0x10 as answers from the ADXL362. I should be getting 0xAD and 0x1D. Here are the logic analyzer and scope outputs for trying to read register 0x00 (green is CS, pink is CLK, purple is MISO and red is MOSI; scope shows MISO):
For some reason, when I read register 0x02, I get the expected answer of 0xF2, as shown below (scope shows MISO):
One weird thing is the level of some of the MISO answer bits. The last bit seems to be half way up to VDD (3.3V). That is odd. Why would the other bits before be OK?
So as you can see, the bits get read at the clock rising edge as specified. I also made sure the chip powers up from a voltage of 0V, as specified in the TDS. I tried 125kHz, 1MHz, 4MHz speeds, all gave the same results. I also checked the timing specifications and they are OK. I tried with 3 different ADXL362 units and got the same result.
I also tried with and without a soft reset at boot up by sending 0x52 to 0x1F as shown below (scope shows MOSI):
I am out of ideas. Can you help me troubleshoot this?
I tried several ADXL362 ( 5 ADXL362 to be exact) here in my setup and I can't replicate the problem you are seeing.
The SPI CLK setting is 2MHZ. Would you mind if you try to have or put some delay of about 160uS after power up before reading or writing any registers in adxl362.
Let me know of the outcome, if the problem still persist.
I already have a 2sec wait time at boot up. I am using Sparkfun's breakout board. I tried changing the decoupling capacitor from a 0.1uF to a 2.2uF, and I still have the same outcome. I am using fairly long wires, but that should not be an issue when I try 125KHz, but it still gives this weird voltage level.
To isolate the issue in long wires, may I know how long the wire is?
Then could you please use a much shorter wires, let say about 1 feet.
SPI clock rate of 125KHZ is not recommended, please use 1MHZ - 8MHZ, this range of clock rate is the recommended as per datasheet.
Also, may I know the processor or microcontroller you are using? This might help me to understand your setup.
The wires are 2-3 inches long. I tried all speed settings.
I am using a STM32L4 MCU.
It is weird that only the MSB seem to be sent well, but not the LSB.
The accelerometer is responding correctly based on your graphs, however you got wrong IDs. But I have noticed on your first graph that there is a significant gap between clocks of byte 1 and byte 2, shown below image, as compared to reading register 2. With this, could you try to read the register 0 and register 1 after reading the register 2 and see if the clocks timing still the same. This could be the possible cause of the problem you have.
Thank you for these investigations. I tried removing the delay you circled in red and I still get the same behavior. I think I figured out why though. I am tested the devices with a 3.5V nominal voltage. I tried 3V3 afterwards, but I might have busted all my devices here... I will have to order more.
For now I have just switched to LIS3DSH which is pin compatible. This one can whitstand 3.6V so I am good now.