cancel
Showing results for 
Search instead for 
Did you mean: 

AIS1120SX/AIS2120SX Tips and Suggestions

CJeff.1
Associate

I'm in the process of some development using ST's AIS1120SX Accelerometer, in conjunction with a Nucleo L432-KC development board. I thought I would share some tips and suggestions I have about the accelerometer, as I found it particularly difficult to get started with.

  • EOI/End of Initialization command: The datasheet is a little bit vague about what this command is, and how it is used. On page 46 (rev 4), it states that the device enters the programming phase until the EOI command has been sent (which I thought meant I had to send it). The EOI flag is set by the device itself, the user does not need to do this manually.
  • CRC calculation: CRC calculation is mandatory for bits sent to the device (SDI). If it is not implemented, the device will enter an error mode and not function. The CRC polynomial given by the datasheet is 0x97, which is not correct, unless you drop the +1. I think this must be industry standard, but it caught me out. The full polynomial is 0x12F. I think it could be helpful to clarify this in the datasheet. Additionally, it could be helpful to include a sample CRC calculation as a sanity check if you're getting stuck.
  • CRC calculation bits: The CRC calculation for the SDI bits must be performed on bits 31:8, and then appended to bits 7:0 before sending the data to the device. This could be worth mentioning in the datasheet.
  • CRC and the STM32: Don't bother trying to use the STM32 HAL function for CRC calculation. I couldn't get it to work and tried a few different combos. I found it easier to just implement my own version.
  • Converting output data to g's: I'm not 100% sure about this, but i think the device already has some form of compensation for gravity. To convert the output data, check the sign (MSB), then multiply the remaining bits by 0.0146.

If you have any issues, I can try to help, but hopefully this post can clear things up for the next person to try and use this sensor.

Cheers :)

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Eleon BORLINI​,

Can you clarify what you need me to write in the comments?

Cheers,

Cooper

View solution in original post

3 REPLIES 3
Eleon BORLINI
ST Employee

Hi @CJeff.1​ ,

Thank you very much for your "Tops and Suggestions" reporting.

I confirm you that your guess are correct, and I'll report the considerations internally to the relevant people.

In order to highlight your post, please comment this below so that I can mark you answer as "Best".

Thank you again,

-Eleon

Hi @Eleon BORLINI​,

Can you clarify what you need me to write in the comments?

Cheers,

Cooper

Hi Cooper,

that's enough, my intention was to mark a comment from you as BA so that the question can have more visibility.

Thank you again,

-Eleon