2024-06-19 04:09 AM
I am using the STEVAL-STWINBX1 development board and have downloadedthe FP-SNS-DATALOG2 software to the board.
I compiled and flashed the FP-SNS-DATALOG2 software to the board using the ST Cube IDE and a Segger J-Link.
I am trying to use the Python GUI, I can connect to the board....
But there is nothing on the screen once I have connected...
Does the Python GUI work with the FP-SNS-DATALOG2 software ?
At the time of flashing the software to the board, I wasn't aware of the different flash banks on the micro. Im not sure if its related to the flash banks, but when flashing I got the the following warning which I clicked yes to...
Hopefully I haven't broken anything by doing this ?
I am able to use the phone app to swap firmware...
If I swap to BLEDfFw firmware (running on bank 2), the Python GUI does not even detect the device.
2024-06-19 07:40 AM
I can't get hsdatalog_plot.py to work either.
I try to plot one of the examples that come with the software zip file using...
python hsdatalog_plot.py ..\..\STWIN.box_acquisition_examples\20221017_12_50_55
It then asks which sensor measurement I want to plot...
0 - imp23absu_mic
1 - imp34dt05_mic
q - Quit
Select one PnPL_Component (q to quit) ==> 1
I then get a whole lot of errors...
←[31;21m2024-06-19 15:34:30,450 - HSDatalogApp - ERROR - int() argument must be a string, a bytes-like object or a number, not 'KeyboardModifier' (hsdatalog_plot.py:118)←[0m
Traceback (most recent call last):
File "C:\Projects\STHUMS\STM32CubeFunctionPack_DATALOG2_V2.1.1\Utilities\HSDPython_SDK\examples\hsdatalog_plot.py", line 112, in plot
df = HSDatalog.plot(hsd, component, start_time, end_time, label, subplots, raw_data, fft_plots)
File "C:\Users\JohnLintern\AppData\Roaming\Python\Python39\site-packages\st_hsdatalog\HSD\HSDatalog.py", line 616, in plot
hsd.get_sensor_plot(c_name, c_type, start_time, end_time, label = label, subplots = subplots, raw_flag = raw_data, fft_plots = fft_plots)
File "C:\Users\JohnLintern\AppData\Roaming\Python\Python39\site-packages\st_hsdatalog\HSD\HSDatalog_v2.py", line 1493, in get_sensor_plot
self.__plot_mems_audio_sensor(sensor_name, ss_data_frame, cols, dim, subplots, label, raw_flag, ss_stat.get('unit'), fft_params)
File "C:\Users\JohnLintern\AppData\Roaming\Python\Python39\site-packages\st_hsdatalog\HSD\HSDatalog_v2.py", line 1390, in __plot_mems_audio_sensor
fig = plt.figure()
File "C:\Program Files\Python39\lib\site-packages\matplotlib\pyplot.py", line 808, in figure
manager = new_figure_manager(
File "C:\Program Files\Python39\lib\site-packages\matplotlib\pyplot.py", line 326, in new_figure_manager
_warn_if_gui_out_of_main_thread()
File "C:\Program Files\Python39\lib\site-packages\matplotlib\pyplot.py", line 316, in _warn_if_gui_out_of_main_thread
if (_get_required_interactive_framework(_get_backend_mod())
File "C:\Program Files\Python39\lib\site-packages\matplotlib\pyplot.py", line 217, in _get_backend_mod
switch_backend(dict.__getitem__(rcParams, "backend"))
File "C:\Program Files\Python39\lib\site-packages\matplotlib\pyplot.py", line 268, in switch_backend
switch_backend(candidate)
File "C:\Program Files\Python39\lib\site-packages\matplotlib\pyplot.py", line 288, in switch_backend
class backend_mod(matplotlib.backend_bases._Backend):
File "C:\Program Files\Python39\lib\site-packages\matplotlib\pyplot.py", line 289, in backend_mod
locals().update(vars(importlib.import_module(backend_name)))
File "C:\Program Files\Python39\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "C:\Program Files\Python39\lib\site-packages\matplotlib\backends\backend_qtagg.py", line 12, in <module>
from .backend_qt import (
File "C:\Program Files\Python39\lib\site-packages\matplotlib\backends\backend_qt.py", line 73, in <module>
_MODIFIER_KEYS = [
File "C:\Program Files\Python39\lib\site-packages\matplotlib\backends\backend_qt.py", line 74, in <listcomp>
(_to_int(getattr(_enum("QtCore.Qt.KeyboardModifier"), mod)),
TypeError: int() argument must be a string, a bytes-like object or a number, not 'KeyboardModifier'
Traceback (most recent call last):
File "C:\Projects\STHUMS\STM32CubeFunctionPack_DATALOG2_V2.1.1\Utilities\HSDPython_SDK\examples\hsdatalog_plot.py", line 121, in <module>
hsd_plot()
File "C:\Users\JohnLintern\AppData\Roaming\Python\Python39\site-packages\click\core.py", line 1157, in __call__
return self.main(*args, **kwargs)
File "C:\Users\JohnLintern\AppData\Roaming\Python\Python39\site-packages\click\core.py", line 1078, in main
rv = self.invoke(ctx)
File "C:\Users\JohnLintern\AppData\Roaming\Python\Python39\site-packages\click\core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Users\JohnLintern\AppData\Roaming\Python\Python39\site-packages\click\core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "C:\Projects\STHUMS\STM32CubeFunctionPack_DATALOG2_V2.1.1\Utilities\HSDPython_SDK\examples\hsdatalog_plot.py", line 108, in hsd_plot
plt.show()
File "C:\Program Files\Python39\lib\site-packages\matplotlib\pyplot.py", line 388, in show
_warn_if_gui_out_of_main_thread()
File "C:\Program Files\Python39\lib\site-packages\matplotlib\pyplot.py", line 316, in _warn_if_gui_out_of_main_thread
if (_get_required_interactive_framework(_get_backend_mod())
File "C:\Program Files\Python39\lib\site-packages\matplotlib\pyplot.py", line 217, in _get_backend_mod
switch_backend(dict.__getitem__(rcParams, "backend"))
File "C:\Program Files\Python39\lib\site-packages\matplotlib\pyplot.py", line 268, in switch_backend
switch_backend(candidate)
File "C:\Program Files\Python39\lib\site-packages\matplotlib\pyplot.py", line 288, in switch_backend
class backend_mod(matplotlib.backend_bases._Backend):
File "C:\Program Files\Python39\lib\site-packages\matplotlib\pyplot.py", line 289, in backend_mod
locals().update(vars(importlib.import_module(backend_name)))
File "C:\Program Files\Python39\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "C:\Program Files\Python39\lib\site-packages\matplotlib\backends\backend_qtagg.py", line 12, in <module>
from .backend_qt import (
File "C:\Program Files\Python39\lib\site-packages\matplotlib\backends\backend_qt.py", line 73, in <module>
_MODIFIER_KEYS = [
File "C:\Program Files\Python39\lib\site-packages\matplotlib\backends\backend_qt.py", line 74, in <listcomp>
(_to_int(getattr(_enum("QtCore.Qt.KeyboardModifier"), mod)),
TypeError: int() argument must be a string, a bytes-like object or a number, not 'KeyboardModifier'
Below is the screen capture...
2024-06-19 08:40 AM
Un-installation of python.... re-installation of python.... un-installation of python.... re-installation of python.... managed to finally get it working !