2022-07-29 01:32 AM
Hi,
I have three questions about AIS2120 dual axis sensor, below is the power up sequence of the code implementation.
Soft reset -> Keep reading status 0 until value 0x82 is read (representing test phase and end of power up sequence, which takes around 335ms) -> Read register REG_CONFIG to verify the filter setting is 0x00 -> X positive selftest -> 0g selftest -> X negative selftest -> 0g selftest -> Y positive selftest -> 0g selftest -> Y negative selftest -> 0g selftest -> set EOI bit and then read status register from 0 to 2 (verify that there is no error and it’s in Normal mode. However, the END_OF_PWRUP is on) -> Looping read commands of X, Y and REG_STATUS
Question:
1. END_OF_PWRUP bit in the REG_STATUS_0 is 1 constantly throughout selftest mode and normal mode. Is it normal? On the page 55 of the datasheet, it says it would reply error frame if the flag is on. However, I don’t see any error frame during the flag (END_OF_PWRUP) is on.
2. I want to disable offset cancellation on both X and Y channels so I write 0x03 to register REG_CONFIG right before setting EOI bit, and then keep reading X Y acceleration values and REG_STATUS. The offset cancellation is disabled successfully but X acceleration value is about 94 (0x5E) when the sensor is placed horizontally, which is over 1G already. Typically, it should be something close to 0 and under 1G. Is it normal? Do I set the filter setting at the wrong time? (Y acceleration value is sitting around 15 (0xF) when sensor is horizontal.)
3. On the page of 37, the sensitivity value is 68 LSb/g. To be more precise, is it 68.238 LSb/g? (0x3FFF - 0x1) / 240g since it’s +/- 120g range.
Regards,
2022-07-29 08:45 AM
Hi @JHo.1 ,
1. As reported in the datasheet, p.18, the END_OF_INIT should be reset to "0" before starting the Self test procedure, or the configuration procedure;
2.You have to disable the offset cancellation when the END_OF_INIT is set back to "0";
3.I suggest you to keep the suggested value of 68 LSb/g: it typically includes a slight compensation for the high g (or the g near the full scale).
-Eleon
2022-07-31 12:12 AM
Hi Eleon,
Thanks for the reply. After soft resetting the sensor, the END_OF_INIT is 0, and then the initialization phase(0b00) will transition to test phase (0b10, which indicates it's in test phase and END_OF_INIT = 0.) I am certain that the actions of selftest and disabling the offset cancellation are before END_OF_INIT bit is set to 1.
If you attempt to write REG_CONFIG and REG_CTRL_1 in Normal mode (0b01, END_OF_INIT =1), it will generate error frame when you request X or Y acceleration data. (status = 0b11), I checked the status for every acceleration frame to make sure I was reading the sensor value legitimately,
Regards,