2025-10-09 8:14 PM
I'm encountering many issues while using the AIS2120 accelerometer sensor and would greatly appreciate your assistance. Thank you very much!
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;
}Solved! Go to Solution.
2025-10-10 5:58 PM
2025-10-09 8:23 PM
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?
2025-10-09 9:00 PM
@Federica Bossi
Could you offer me some suggestions? Thank you very much.
2025-10-09 11:23 PM
2025-10-10 9:52 AM
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?
2025-10-10 5:58 PM