cancel
Showing results for 
Search instead for 
Did you mean: 

STEVAL-STWINBX1 datalogger V2.2.0 - Python GUI does not work

johngj
Senior

I am using the STEVAL-STWINBX1 development board with the FP-SNS-DATALOG2 software V2.2.0.

When I try to connect using the Python GUI tool, it gets stuck at "Device Template Model Loading"....

johngj_0-1722592833105.png

I reverted back to V2.1.1 and the GUI tool works.

Is there a bug in this new release V2.2.0 ?

 

1 ACCEPTED SOLUTION

Accepted Solutions
matteo_ronchi
ST Employee

Hello @johngj,

Looking at your screenshot, it seems that you are using an old GUI version (maybe the one within FP-SNS-DATALOG2 v2.1.1) with the latest version of the FW v2.2.0.

To solve your issue, please update your installed version of the HSDPython_SDK by running the HSDPython_SDK_install.bat installer script found in your STM32CubeFunctionPack_DATALOG2_V2.2.0\Utilities\HSDPython_SDK folder.

At the end of the installation process, your installed Python package versions should be the following:

  • st_pnpl v2.3.0
  • st_dtdl_gui v2.3.0
  • st_hsdatalog v3.3.0

You can check this by launching the python -m pip list command. To ensure you start from a clean environment, I suggest you create and activate a virtual environment before launching the installer script.

Best regards,
Matteo

View solution in original post

9 REPLIES 9
matteo_ronchi
ST Employee

Hello @johngj,

Looking at your screenshot, it seems that you are using an old GUI version (maybe the one within FP-SNS-DATALOG2 v2.1.1) with the latest version of the FW v2.2.0.

To solve your issue, please update your installed version of the HSDPython_SDK by running the HSDPython_SDK_install.bat installer script found in your STM32CubeFunctionPack_DATALOG2_V2.2.0\Utilities\HSDPython_SDK folder.

At the end of the installation process, your installed Python package versions should be the following:

  • st_pnpl v2.3.0
  • st_dtdl_gui v2.3.0
  • st_hsdatalog v3.3.0

You can check this by launching the python -m pip list command. To ensure you start from a clean environment, I suggest you create and activate a virtual environment before launching the installer script.

Best regards,
Matteo

johngj
Senior

Many thanks Matteo, that fixed the problem :)

Hi @matteo_ronchi 

I am using the STEVAL-MKBOXPRO development board with the FP-SNS-DATALOG2 software V2.2.0, and i already checked that i have all the right versions of 

  • st_pnpl v2.3.0
  • st_dtdl_gui v2.3.0
  • st_hsdatalog v3.3.0

However, i am still getting the message "Device Template Model Loading".

Do you have any other recommendations?

 

Thanks

 

matteo_ronchi
ST Employee

Hi @FilipeLourenço 

We have tried to replicate your setup in our lab, but we were unable to reproduce the error. Everything works correctly on our end.
Which Python version and OS are you using?
In addiction, could you please share a screenshot of the stuck Python GUI? This would provide us with more information to support you more effectively.

In any case, we recommend starting from a clean initial state. Meanwhile, you can try the following steps:

  1. Re-download the FP-SNS-DATALOG2 from here being sure to select the v2.2.0 from the "select version" dropdown menu
  2. Re-flash your STEVAL-MKBOXPRO with the correct binary, which you can find in:
    Projects/STM32U585AI-SensorTile.boxPro/Applications/DATALOG2/Binary
  3. Re-install the HSDPython_SDK packages within the FP you downloaded in a new clean Python virtual environment (venv): First, activate it, then run the installer script (HSDPython_SDK_install.bat or  HSDPython_SDK_install.sh depending on your OS) that you can find in the following folder:
     Utilities/HSDPython_SDK

Let me know if you need any further assistance.

Best regards,
Matteo

Hi @matteo_ronchi 

Thank you for the help.

I am using python 3.12 and windows 11.

I already dis this:

  1. Re-download the FP-SNS-DATALOG2 from here being sure to select the v2.2.0 from the "select version" dropdown menu
  2. Re-flash your STEVAL-MKBOXPRO with the correct binary.

I already created a virtual environment but i don't know how to install  HSDPython_SDK packages with that.

I just installed HSDPython_SDK packages and launched hsdatalog_GUI.py and i am stuck in the same part.

FilipeLoureno_0-1734347860610.png

I am sure that i flashed the v.2.2.0 but this says v2.3.0, i really don't know what to do.



matteo_ronchi
ST Employee

Hi @FilipeLourenço,

I'm sorry, but the only reason you see v2.3.0 in the dropdown menu of connected boards is that the board is flashed with firmware version 2.3.0.

Have you ever flashed the firmware on your board using the mobile app "ST BLE Sensor"?
Since STM32U5 microcontroller families support double-bank flash memory, when the firmware is flashed using this app, it is automatically loaded into the second bank, and when the flashing process is finished, the bank is switched, and the firmware is set to boot from the second bank.

matteo_ronchi_2-1734362061199.png

 

 

If you then tried to reflash the firmware (v2.2.0) via USB, it might be that you flashed it to the first bank.
This would explain your issue with the GUI because the firmware that boots remains the one previously flashed with the "ST BLE Sensor" app (presumably v2.3.0) due to the swapped banks.

If this is the situation, you can easily swap the memory banks from the app by selecting the "Firmware Swap" option in the "Board Control" section of the "Board Configuration" menu.

matteo_ronchi_1-1734361993445.png

 

 

I hope this helps!
Please let me know if you have any further questions or need additional assistance.

In any case if you need further or more specific information please refer to "Setup & Demo Examples" section of the Function Pack Quick Start Guide

Best regards,
Matteo

Hi @matteo_ronchi ,

I tried to flash using the mobile app, but as far as i know without sucess. But i have flashed the board via usb using the STM32CubeProgrammer previously, and maybe i flashed the v2.3.0.

I used the app and saw that i have 2 versions and the current firmware is the v2.3.0. I tried to switch the firmware in the app but it keeps showing v2.3.0 in the GUI.
Then i tried to do it Via STM32CubeProgrammer app in Option bytes> User Configuration > SWAP_BANK or BFB2, but get an error and, after that, when i turn on the device there is no light that stays on , as usually, and can detect the device on GUI or STM32CubeProgrammer or in the apps.

Imagem WhatsApp 2024-12-17 às 10.19.30_76103b5d.jpg

Thanks for the help.

 

Best regards,
Filipe

matteo_ronchi
ST Employee

Hi @FilipeLourenço,

I'm sorry that you haven't been able to properly configure your board yet.
Let's try following this procedure to start from a clean and stable situation:

  1. Try updating STM32CubeProgrammer by clicking on the icon shown in the screenshot below.
    matteo_ronchi_1-1734433656704.png
  2. Reconnect the board via USB using STM32CubeProgrammer in DFU mode by holding down the Button 2 (keep holding the button until the board is connected).
  3. Click the refresh button. In the dropdown menu, you should see "USB1" instead of "No DFU detected".
    matteo_ronchi_4-1734439019652.png
  4. Connect the board by clicking on Connect.
  5. Perform a full chip erase by clicking on the button highlighted in the following screenshot.
    matteo_ronchi_2-1734434155845.png
  6. Ensure that the SWAP_BANK checkbox is disabled (as shown in your screenshot).
    matteo_ronchi_3-1734438654622.png
  7. Program the board by selecting the correct binary (v.2.2.0).

Now, your board should be configured correctly.
If you continue to experience issues, please don't hesitate to reach out for further assistance.

 

Best regards,
Matteo

Hi @matteo_ronchi ,

Thanks a lot for your time and patience! I finally could enter in the GUI interface to start using it.

One more question, i never achieved to use STM32CubeProgrammer in my actual laptop, but then after too many tries i decided to try on my old one and done it sucessfully, do you know any limitations that are blocking me to do that conection? Both windows, my old laptop is a Acer Aspire A515-51 and my actual is a ASUS Vivobook Pro 15.

Best regards, 

Filipe