Post Go back to editing

ADXL343 Data Ready interrupt behavior

Category: Software
Product Number: ADXL343


I'm currently working on a project using ADXL343 in a TI-RTOS microcontroller . 

There is a few problems occurred which I would like an explanation :

 I'm planning to let the MCU to read accelerometer  when Data Ready interrupt trigger but the problem is after configuring to start measurement the data ready interrupt won't trigger unless SPI command to read X,Y,Z data  is sent . I check the signal from INT1 pin using oscilloscope when there is no trigger, the  signal does not come out even though the measurement already started . Do data ready interrupt need to be polled since I expect the interrupt will generate after start measurement without SPI  command ?  Is there anything lacking in my configuration or  the method used is incorrect ?  

The project  also consists of multiple different sensors.

MCU SPI setting is as below:

  • SPI master mode
  • SPI bit rate 2MHZ
  • SPI polarity  1 , phase 1  

ADXL343 configuration is as below: 

  • ACC_REG_00_DEVID,  READ   // read device id data 
  • ACC_REG_49_DATA_FORMAT, ACC_CONF_SPI4_FULLRES_16G, WRITE  // data format SPI 4 wire mode16G  13bit mode , data ready is active high 

  • ACC_REG_46_INT_ENABLE, ACC_INT_DISABLE, WRITE // disable interrupt for interrupt configuration 

  • ACC_REG_48_INT_SOURCE,  READ // read interrupt source 
  • ACC_REG_47_INT_MAP, ACC_INT0_MAP_DATAREADY, WRITE // map data ready interrupt to int1 pin 
  • ACC_REG_56_FIFO_CTL, 0, WRITE   //FIFO bypass mode
  • ACC_REG_45_PWR_CTL, ACC_START_MEASUREMENT, WRITE // start measurement 
The project source code flow is as below (roughly):
Start Task → Peripheral etc. Initialization (including above config) → Main loop process start → ADXL343 wake up and start measurement (read 1s data) and sleep
→ read other peripheral → Send data  → Back to main loop 

Any response and help will be appreciated .

Thank you 

deleted unnecessary question
[edited by: dillzzz at 9:27 AM (GMT -4) on 9 Aug 2022]