cancel
Showing results for 
Search instead for 
Did you mean: 

STHS34PF80 how to use Unicleo-GUI with custom board

andywild2
Associate III

Hi ST-Team,

We want to use the STHS34PF80 for presence detection. I am not very familiar with the sensor, as a just watched
the webinar about the sensor last Tuesday.
I think a good way to check the capabilities of the sensor is the STM32 Open Development Environment (ODE).
With Unicleo-GUI we could test the sensor then and get used to it.
In terms of hardware we have the STEVAL-MKI231KA kit only, which can easily be adapted to our board which has
I2C bus to connect the sensor and USB (Virtual comport) to connect to the PC.

I found the GitHub Entry https://github.com/STMicroelectronics/sths34pf80-pid which provides the driver sths34pf80_reg.c
Using this I can easily pull some registers out of the sensor and send it to a terminal like in the example sths34pf80_tmos_data_polling.c

But how to use X-CUBE-MEMS1 with my custom board?
How can I provide the necessary protocol on my virtual comport, so that Unicleo-GUI is happy?

I installed X-CUBE-MEMS1 in CubeMX, but as far as I can see the libraries there are precompiled and no source code.
There is also another library called: InfraredPD presence and motion detection (UM3169).
This is obviously necessary to improve the sensors builtin compensation functions, when the gain is reduced.
But again this library has no source code.

So my problem is:
I could buy the whole set of NUCLEO-U575ZI-Q (Mother board) X-NUCLEO-IKS4A1 (Expansion) and
STEVAL-MKI231KA (Kit to adapt the sensor)
With this enivronment the Unicleo-GUI software probably works. But how can I get it transferred to my custom application? Why is it called STM32 Open Development Environment , if the major components are not provided in source code?

I am a bit irritated whether I can use the sensor for our application just with the driver sths34pf80_reg.c, which would be easy.
Or do I need to apply further compensation libraries which are just a blackbox?

Maybe it is like this:
The Unicleo-GUI combined with some dedicated hardware and X-CUBE-MEMS1 is only meant to check the sensor
parameters. It will never be transferred to a real application. Only the specific results are thereafter transferred to the sensor registers using sths34pf80_reg.c.
But if this is the case I could buy STEVAL-MKI109V3 with Unico-GUI which is more Plug&Play and doesn´t involve CubeMX configurations...

A apologize for my possible missunderstandings.

Any help for my questions would be highly appreciated

Andy

 

4 REPLIES 4
tech2399
Associate II

Hi,

I'm sitting with a similar hurdle as we are trying to implement it on the STM32WL and the library is compiled for FPU

 

Stefan

Federica Bossi
ST Employee

Hi @andywild2 ,

Unicleo-GUI is a software tool for demonstrating the functionality of features embedded in sensors and software libraries available in the X-CUBE-MEMS1 package. In order to use it, you need to load the appropriate firmware into the NUCLEO board (info can be found on the Unicleo-GUI page). The user can't create the communication protocol to make Unicleo work with his firmware, in fact it is not intended to be used with custom boards.

Regarding InfraredPD, we do not release the source code of the library. The software libraries are ST's IP and for that reason are only provided in binary format.
If you are using an STM32, then you can use CubeMX to generate the FW with the X-CUBE-MEMS1 package and integrate the compiled library, and then customize that FW with CubeIDE or another IDE.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

Hi Stefan,

Meanwhile I came to the conclusion that you don´t need all this fancy visualisation stuff at all.
When I first read the datasheet of the sensor the amount of configuration registers was a bit confusing to me.
So I had the hope to get in touch with the sensor using the demo kits more easily and thus I would be able to adjust the parameters accordingly.

Because the eval board STEVAL-MKI109V3 is quite expensive and useless after the evaluation, I implemeted the sensor straight away into my application. It is just to get the I2C going, which worked easy with sths34pf80_reg.c.
And the sensor turned out to be very good! The only configuration necessary is adusting the thresholds to your needs.
In our case presence. The built in algorithm works very good with the default parameters. You can play with low path filter if you like in this environment with your OWN application. But safe the money for STEVAL-MKI109V3 and Unicleo-GUI.

The other visualisation approach is using X-CUBE-MEMS1. But this involves a lot of configuration in CubeMX. It is not Plug & Play. I was just reluctant to do all this work for no real effect.

Conclusion: Buy the STEVAL-MKI231KA eavl kit for the sensor and get it going with your hardware (I2C).
Here you find easy demo code:
https://github.com/STMicroelectronics/STMems_Standard_C_drivers/tree/master/sths34pf80_STdC/examples

Good success!
Andy

tech2399
Associate II

Hi Andy,

Thanks for the reply and clarification on the usefullness of the library.

Don't get me wrong, I love the IDE and Cubemx, but it's not the first time I've gone down the rabbit hole of trying to make the example code work on my board and then abandent that to get the plain C code from somewhere and get it working.

On the dev kit, I firmly believe the boy with the most toys wins, so I have all the dev kits for this.😀

Thanks again.

Stefan