2023-04-26 10:37 PM
I have a STEVAL-STWINBX1 (released a few weeks ago). It sports a STM32U585AI MCU.
I found is repository that claims it is an SDK for my exact device model (STWINBX1), but when I run the recorder suggested here it complains that no device has been detected.
I connected it to my Debian 12 machine via USB-C. The kernel log says:
[945818.718642] usb usb2-port1: attempt power cycle
[945827.214601] usb usb2-port1: unable to enumerate USB device
Or, if I put it in firmware upgrade mode, it says:
[934225.084403] usb 3-8: new full-speed USB device number 44 using xhci_hcd
[934225.306745] usb 3-8: New USB device found, idVendor=0483, idProduct=df11, bcdDevice= 2.00
[934225.306756] usb 3-8: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[934225.306759] usb 3-8: Product: DFU in FS Mode
[934225.306762] usb 3-8: Manufacturer: STMicroelectronics
[934225.306765] usb 3-8: SerialNumber: 2075337F5752
How do I manually verify if the device connected successfully? For example I don't see any new files like /dev/ttyUSB0 or anything.
2023-04-27 02:37 AM
Hello @Community member ,
STEVAL-STWINBX1 board default firmware is not DATALOG2.
Have you already flashed the right firmware on the board before running the python SDK or the recorder?
You can update the firmware both via USB through STM32CubeProgrammer or via BLE through ST BLE Sensor app, as explained in Quick Start Guide (link).
I shared your feedback with the app developer and we found a bug in iOS version, that will be soon fixed in the next version of the app.
Android version seems working as expected. Can you share with us app version and the phone you are testing?
Once shared with us all the information, we can debug together the issue on your Linux machine.
Best regards
Simone
2023-04-27 11:38 PM
Hi Simone.
Thank you very much for your reply. The quick start guide you linked was very helpful!
I think I figured out why Android had trouble connecting. There was another device in the area, and eventually I noticed that the pairing PIN kept appearing on its screen. It seems that it was interfering with the process somehow.
I was able to connect, and I flashed DATALOG2. I've tried some of the device_config.json files from your repo. The data is successfully getting recorded.
The config file in Utilities/STWIN.box_acquisition_examples/ seems to record 9 separate data files, which seems like the complete set. Where could I find the explanations of the parameters in config file?
Could you also give me some guidance on whether the board would be able to continuously record for 12 hours non-stop (while powered)? I did the math and I think that'll require ~35 GB of data, which my SD card can support. Hopefully the board is OK with large SD cards.
2023-04-28 01:51 AM
Hello,
I suggest you to configure the board via ST BLESensor app, where all the sensors parameters are showed in a easy and human-readable way.
Once the setup is done, you can start the acquisition session directly through the app or simply save the configuration file on the SD card.
Follow the steps provided in the Quick Start Guide.
Have a look also to the User Manual (link), where you can find all the details about the fields available in the JSON config files.
Regarding long-time sessions, I suggest you to enable the automode mode via SD card, so to setup an automatic saving period and avoid losing data.
It is a huge amount of data: file handling on SD card is critical and you should avoid saving too much big files.
It is better to make more consecutive acquisitions rather than a unique big one.
Another tip to reduce data amount. STWIN.box mounts different accelerometers, microphones and environmental sensors: maybe you can let switched on only 1 microphone and 1 accelerometer.
Still refer both to Quick Start Guide and User Manual for the full details.
Best regards
Simone
2023-04-28 01:59 PM
I enabled automode (see attached config) and have tried 3000 ms and 10000 ms recording periods, but I only end up seeing a single folder, and all files are empty.
Only if I repeatedly start and stop the recording every 10-20 seconds do I see proper data recorded.
How much RAM does this device have? I want to calculate the time before it has to write to disk.
All the numbers I see in the data brief are too small (2 MB) to be the real RAM, unless I am wrong.
2 MB at 6 Mbps = 2666 ms. So realistically 2000 ms assuming RAM partially used for other data structures?
2023-04-29 01:45 PM
I've realized what the problem is. The device is completely ignoring the device_config.json file that I place on the SD card. I know this because when I hit the USR button to record and I inspect the device_config.json file in the recorded data folder, I see that it looks nothing like the one in root of the SD card.
I have used the phone app to load my desired configuration file, but it seems to ignore that as well.
The only thing that works is manually starting and stopping which is not possible for my purpose.
What do you suggest I try?
2023-05-02 06:27 AM
Hello,
The attached device_config is not setting up properly the idle time.
That's why the firmware is not saving data as you are expecting.
You must also fill the start_delay_ms and the idle_time_length.
Can you try using this configuration?
"automode": {
"enabled": true,
"nof_acquisitions": 0,
"start_delay_ms": 5000,
"datalog_time_length": 10000,
"idle_time_length": 5000,
"c_type": 2
}
Best regards
Simone
2023-05-02 10:43 AM
Thank you Simone.
I just tried your suggestion. I pressed USR, saw the green light start flashing quickly. Then 30 minutes later I saw that it became solid green. I extracted the SD card and inspected it and found only zero length files.
According to the Getting Started guide, automode has the following parameters:
This suggests that idle_time_length = 0 is OK? I do want continuous recording with no gaps.
What are the files supposed to look like during automode? Is it growing big files, or many small files?
2023-05-02 11:49 AM
I also tried this automode config:
"automode": {
"enabled": true,
"nof_acquisitions": 60,
"start_delay_ms": 500,
"datalog_time_length": 30000,
"idle_time_length": 5000,
"c_type": 2
}
The device recorded for a while, but after 30-60 minutes the flashing green light stops (or becomes solid). When I look at the new folder all the files are empty. Strangely the date on the empty files is 2016, while normally on successfully recorded files (if I manually stop the recording early) it is 1999.
I still suspect the device is completely ignoring my device_config.json.
2023-05-03 02:50 AM
automode is used to automatically open and close new files. So, the expected result is to have many folders with small acquisitions.
Solid green light means that FW is broken: maybe because of some misconfiguration in the json file, some broken files on SD card or a poor SD card quality that can't support the 6Mbit/s high-rate default data stream.
I'm replicating your setup and I can't reproduce your issue.
Is "device_config.json" placed in the root of the SD card with the exact name "device_config.json"?
Is the SD card already inserted during the STWIN.box boot?
Is the issue persisting also enabling less sensors (i.e.: switch off IIS3DWB and IMP23ABSU)?
Which SD card are you using?
Is SD card blank/formatted?
Let me share the User Manual (link) newly. Here you can find a specific chapter for automode and SD card use cases, where we've highlighted the suggested part number for SD card and a testing procedure.
We can't grant DATALOG2 can work on any SD card, so please align to the part number we are proposing or follow the procedure described in the manual to test your SD card.