This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/LPSTK-CC1352R: Periodic update of ADXL362 data

Part Number: LPSTK-CC1352R


Tool/software: Code Composer Studio

Hi,

In the last days I have been trying to obtain data of xAxis, yAxis and zAxis from ADXL362 in a periodic way instead of only when the accelerometer tilts (default case for LPSTK-CC1352R). I followed your instructions in my previous post, reviewing the SPI accelerometer code at Sensor Controller Studio, but still cannot find a way to report data from the accelerometer with the same reporting interval as for the other sensors of the LPSTK board. Is it possible? From the code of SPI accelerometer, I guess it would necessary to generate interruptions (fwGenAlertInterrupt()) with the reporting interval but I am not sure how to do it. 

I already added the lines pMsg->accelerometerSensor.xAxis, pMsg->accelerometerSensor.yAxis, pMsg->accelerometerSensor.zAxis at the code, as said here, but I get 0,0,0 except when the accelerometer is tilted that I get different values (and the rest of sensors are 0).

Just to clarify, I need to read data from all the sensors simultaneously (at the same reporting interval). Can this be done with the Sensor Controller? Or I need to avoid its use for this case?

Thank you in advance,

Mario

  • Hi Mario,

    Is the question how to trigger data handoff from the sensor controller at a given rate? If that is correct then yes, it should boil down to calling the fwGenAlertInterrupt() at a higher interval. My initial suggestion would be to simply move it out of the "if tilt detected" case so that it is always called during every readout. 

  • Hi M-W,

    Thank you for your response. Yes, that is the question. I followed your suggestion and moved fwGenAlertInterrupt() out of the "if tilt detected" case. Now I am continuously getting the data (as fast as the sampling rate I guess). However, I would like to get the data with the same rate as the other sensors (7 seconds in my case), how can I do that? The idea is to get the data of all the sensors simultaneously as I stated before, now I am only getting the data of the accelerometer at the console (the data of the other sensors is shown as 0).

    Thank you,

    Mario

  • Maybe I need the main CPU to tell the Sensor Controller that data needs to be read, how can I do it?

  • Hi Marie,

    The SC -> System CPU is only a way to let the CPU know that there is new data, it is not needed for the system CPU to be able to read out the data. The system CPU can always access the data and you could for example just read out the current data when you need it to get the latest data.