Skip to main content
Visitor II
October 10, 2025
Solved

AIS2120 Accelerometer Sensor

  • October 10, 2025
  • 2 replies
  • 384 views

I'm encountering many issues while using the AIS2120 accelerometer sensor and would greatly appreciate your assistance. Thank you very much!

  1. After the sensor is powered on, a series of initializations (default configuration) are performed, then it enters normal mode, and then the corresponding acceleration data is read. Are these actions performed automatically by the sensor?Do I need to perform any operations to make the sensor enter normal mode?
  2. If I need to set it to 1600Hz, how should I operate? (I tried setting a soft reset and then writing to the configuration register, but it didn't work).
  3. I keep having communication issues, especially I'm not sure if the CRC check is correct. The manual is very vague. Attached is my CRC check function.
  4. I'm also unsure how to fill in the position indicating whether it is sensor data in the SDI frame.
uint8_t AIS1120SX_ubCrcVal(int32u ulCrcVal) {
 uint8_t crc = 0x00;
 uint8_t poly = 0x97;

 for (uint8_t i = 0; i < 4; i++)
 {
 crc ^= (uint8_t) ((ulCrcVal >> (i * 8)));

 for (uint8_t b = 0; b < 8; b++)
 {
 if (crc & 0x80)
 {
 crc = (uint8_t) ((crc << 1) ^ poly);
 }
 else
 {
 crc <<= 1;
 }
 }
 }

 return crc;
}​

微信图片_2025-10-10_105353_532.png

    This topic has been closed for replies.
    Best answer by Yz2
    1. Currently, I can read the device ID 0x2A from address 0x0C and the acceleration values. However, the response to all my commands shows SPI_ERROR, as shown in the figure below.
    2. I know I should write to the FIR_BWregister, and this should be done during initialization. But I don't know how to enter (and subsequently exit) the initialization mode.
    3. I'm not sure if the sensor is in normal mode by default if I don't perform any specific action. If I want to change configuration settings (like FIR_BW), what should I do?微信图片_2025-10-11_085227_460.png微信图片_2025-10-11_085737_860.png微信图片_2025-10-11_085742_966.png微信图片_2025-10-11_085747_582.png

    2 replies

    Yz2Author
    Visitor II
    October 10, 2025

    微信图片_2025-10-10_111909_733.png微信图片_2025-10-10_111913_995.png

    The above is the entire process.

    1.I'm not sure if the sensor automatically enters normal mode after power-on.

    2.I need to modify FIR_BW. How should I do it?

    Yz2Author
    Visitor II
    October 10, 2025

    @Federica Bossi 
    Could you offer me some suggestions? Thank you very much.

    Yz2Author
    Visitor II
    October 10, 2025
    Super User
    October 10, 2025

    Surely most of this is covered in the datasheet or related technical documentation.

    > I keep having communication issues

    Kind of vague. SPI is straightforward, what issue are you having specifically? What data do you get vs what do you expect? Consider using a logic analyzer to view in more detail.

     

    > 1.I'm not sure if the sensor automatically enters normal mode after power-on.

    No immediately, but eventually it seems like it to me, if all is okay hardware-wise. Poll END_OF_INIT to find out.

    > 2.I need to modify FIR_BW. How should I do it?

    TDK_0-1760114835150.png

     

    Yz2AuthorAnswer
    Visitor II
    October 11, 2025
    1. Currently, I can read the device ID 0x2A from address 0x0C and the acceleration values. However, the response to all my commands shows SPI_ERROR, as shown in the figure below.
    2. I know I should write to the FIR_BWregister, and this should be done during initialization. But I don't know how to enter (and subsequently exit) the initialization mode.
    3. I'm not sure if the sensor is in normal mode by default if I don't perform any specific action. If I want to change configuration settings (like FIR_BW), what should I do?微信图片_2025-10-11_085227_460.png微信图片_2025-10-11_085737_860.png微信图片_2025-10-11_085742_966.png微信图片_2025-10-11_085747_582.png