LIS3DSH SPI returning only 0s
I am working in a project with the LIS3DSH accelerometer. I have been working with it for some months and had no problems.
void LIS3DSH_Class::enableAcc(byte _speed, byte _antialiasingFilter){
digitalWrite(CS_LIS3DSH, LOW);
SPI1.transfer(CTRL_REG4 | WRITE_MODE);
SPI1.transfer((_speed<<4) | 0x7);
digitalWrite(CS_LIS3DSH, HIGH);
delay(1);
digitalWrite(CS_LIS3DSH, LOW);
SPI1.transfer(CTRL_REG3 | WRITE_MODE);
SPI1.transfer(0xC8);
digitalWrite(CS_LIS3DSH, HIGH);
delay(1);
digitalWrite(CS_LIS3DSH, LOW);
SPI1.transfer(CTRL_REG5 | WRITE_MODE);
SPI1.transfer(_antialiasingFilter<<6);
digitalWrite(CS_LIS3DSH, HIGH);
delay(1);
digitalWrite(CS_LIS3DSH, LOW);
SPI1.transfer(FIFO_CTRL_REG | WRITE_MODE);
SPI1.transfer( 0 );
digitalWrite(CS_LIS3DSH, HIGH);
}
void LIS3DSH_Class::readRawAcc(int16_t *x, int16_t *y, int16_t *z){
digitalWrite(CS_LIS3DSH, LOW);
SPI1.transfer(OUT_X_L | READ_MODE);
*x = (SPI1.transfer(0)) | (SPI1.transfer(0)<<8);
*y = (SPI1.transfer(0)) | (SPI1.transfer(0)<<8);
*z = (SPI1.transfer(0)) | (SPI1.transfer(0)<<8);
digitalWrite(CS_LIS3DSH, HIGH);
}A month ago I made a new order to Mouser with more of this components, the component reference was exactly the same.
However, the accelerometers received in the last order don't seem to be working.
At first I supposed it was a soldering issue, so I soldered one in an empty PCB and checked for the internal diodes. This way I ensured it was not this problem.
Then I connected the oscilloscope to the CLK, MOSI and MISO lines to check the SPI communication. The CLK and MOSI lines seem normal, but MISO only gives 0s.
I have tried reading every LIS3DSH's register in all four SPI modes and none of them returns anything apart from 0s.

Top channel is CLK and bottom channel is MISO.
The LIS3DSHs I have from older orders are working correctly in the same circuit with the same code. The only difference I can see is in the top letters. Old one is, if I can read ir correctly, 2804 DSH6 UOHM; while new one is 2903 DSHT XJDT.
