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.

LPSTK-CC1352R: not able to obtain data from DRV5032 hall effect sensor and ADXL362 accelerometer at reporting interval

Part Number: LPSTK-CC1352R
Other Parts Discussed in Thread: CC1352R, HDC2080, OPT3001, DRV5032

Hi,

This is Mario. I have been working again on the LPSTK-CC1352R for the last few weeks. I adapted the sensor and collector example for CC1352R Launchpad to make it work with LPSTK-CC1352R so that I could be able to read the data from the LPSTK sensors. To do this, I followed this post, and I could successfully obtain data from both HDC2080 and OPT3001, as you can see in the attached screenshot. However, this was not the case for DRV5032 and ADXL362, that show a constant value of 0 for all their fields. 

1) For DRV5032, my guess is that the problem is related with the format of the data (hallEffectSensor.flux is a float). I know that the sensor acts as a a digital switch, but I would expect to see a change of the state when I move the magnet near the sensor. I also watched this video from TI Precision Labs to try to properly understand the functioning of the sensor and make sure that the orientation of the magnet was the proper one. Here they are the modifications I made to the code to try to display its data:

- In csf.c, I added pMsg->hallEffectSensor.flux and try to print it as an int (%d) but it did not work. I also tried as a float (%.8f) adding System.extendedFormats = '%f%$L%$S%$F' in app.cfg, but still does not work. 

- In sensor.c, for the function Lpstk_initSensorReadTimer, I tried uncommenting LPSTK_HALL_EFFECT but it did not work. My guess is that it has to be commented, as it is commented in the dmm lpstk example too.

2) For ADXL362 I observe that the displayed data only updates when the sensor is tilted, which is not the desired behavior for our applications (we would need to obtain the orientation at the desired reporting interval, the same as for the other sensors). I saw that the accelerometer is managed by the Sensor Controller, so I do not exactly which modifications are needed to make it work like the other sensors. I would appreciate any hints about this.

I am working with the version v4.20.01.04 of the SimpleLink CC13x2 26x2 SDK.

Thank you in advance and best regards,

Mario

  • Hi Mario,

    1) Have you tried to to put a breakpoint in the code to verify the Hall effect value prior to printing it out?

    2) The behavior you describe is the expected one. I would advice you to download Sensor Controller Studio and check out the "LPSK" examples, you will find the ADC code there.

    The Sensor Controller is a separate MCU on the SoC that you write code for with Sensor Controller Studio (C like syntax). It should be quite clear once you got the example open in the IDE how the software is written to trigger only on tilt. If you have any additional questions regarding the Sensor Controller after looking at this just let me know.