2025-09-21 9:25 PM
Thank you for your continued support.
From your responses, I have made the following initialization procedure for ASM330LHH.
POWER ON
CTRL3_C <- 0x42(BDU,IF_INC)
CTRL1_XL <- 0x9C(3333Hz,8G)
CTRL2_G <- 0x92(3333Hz,125dps)
INT1_CTRL <- 0x01(Accelerometer data-ready interrupt)
Read STATUS_REG every 0.5ms to check if TDA is 1.
Some units do not set TDA to 1. This is a problem.
Is the ASM330LHH initialization procedure correct?
Do I need to wait, etc.?
Solved! Go to Solution.
2025-10-01 7:15 PM
Sorry for the late reply.
I followed the sample and your instructions, and corrected the procedure. So far, I have only been able to test it once, but I did confirm that the TDA bit was set. Thank you for that.
However, since I have not yet been able to confirm this with a larger number of cases, I decided to treat the system as normal if the TDA bit is not set but the temperature value can still be read and is within the specified range. (Even in cases where the TDA bit was not observed, I confirmed that the temperature sensor value changed according to the ambient temperature afterward.)
Thank you very much for your support—it has been a great help.
2025-09-22 2:58 AM
Hi @ggob ,
Your initialization is correct.
Can you follow our official PID examples and let me know if, in that case, the TDA bit is set to 1?
Thanks.
2025-09-23 1:34 AM
Thank you for your always accurate and quick advice.
Please tell me about the discrepancies between your previous answers and the sample code.
1. You mentioned that the software reset in CTRL3_C is used when the sensor is ON, but in the sample code, the software reset is performed when the sensor is not ON.
Which is correct?
2. You mentioned that if software reset of CTRL3_C is used, it is necessary to reload the settings with the boot bit of CTRL3_C, but this is not done in the sample code.
Which is correct?
3. You said that the DEVICE_CONF bit in CTRL9_XL in the sample code should be cleared to 0 at the end of setting, but it is not cleared in the sample code.
Is it necessary to clear it?
4. You said that the TDA bit in STATUS_REG is cleared by simply reading STATUS_REG, but in the sample code, STATUS_REG is read 3 times separately.
Which is correct?
Thank you in advance.
2025-10-01 7:15 PM
Sorry for the late reply.
I followed the sample and your instructions, and corrected the procedure. So far, I have only been able to test it once, but I did confirm that the TDA bit was set. Thank you for that.
However, since I have not yet been able to confirm this with a larger number of cases, I decided to treat the system as normal if the TDA bit is not set but the temperature value can still be read and is within the specified range. (Even in cases where the TDA bit was not observed, I confirmed that the temperature sensor value changed according to the ambient temperature afterward.)
Thank you very much for your support—it has been a great help.
2025-10-05 6:25 PM
Unfortunately, the problem has returned. So, I modified the source code to follow the same procedure as the sample you gave us.
However, it seems to stop at “WHO AM I”. How long does it take for the SPI to start communicating?
I have taken 10ms waiting time for BOOT.
The SPI communication speed is 5Mbps.