2024-01-22 05:23 AM
Hi,
I am running a project on NanoEdge AI (anomaly detection), using STEVAL-STWINKT1B SensorTile Wireless Industrial Node and STLINK-V3MINI. I am following st's youtube turotial NanoEdge AI Studio V3 - Anomaly Detection demo. I would like to load data from serial (USB), but no data is flowing.
What I did so far (mosty what is said in um2622) :
- Connected USB to the board while keeping USR button pressed
- Connected STLINK-V3MINI
- Erased all sectors and loaded DataLogExtended.bin into the board ( path fp-sns-stbox1\STM32CubeFunctionPack_FP-SNS-STBOX1_V1.6.0\Projects\STM32L4R9ZI-SensorTile.box\Applications\DataLogExtended\Binary)
- Loaded DataLogExtended.bin into STWIN-v3MINI ( path fp-sns-stbox1\STM32CubeFunctionPack_FP-SNS-STBOX1_V1.6.0\Projects\STM32L4R9ZI-SensorTile.box\Applications\DataLogExtended\Binary )
- Disconnected the board and STLINK-V3MINI and long pressed RESET button
- Reconnected the board first, and then STLINK-V3MINI
- at this step COM3 and COM4 both appear in device manager:
- Opened Nanoedge AI Studio
- Tried to import signals (regular ones) from USB using both COM port (COM 3) and COM4 (the virtual one) but when clicking "Start/STOP", data don't show up (see the following image) :
I have checked UART configuration and baud rate, parity, data bits, stop bits seem correct :
I also installed Tera Term to check if data is collected from COM3 and COM4 when clicking "Start/STOP"... it seems nothing is out.
There are probably steps I am missing but it is not clear to me how it works. Can I know the steps I should follow ?
Best,
Anthony
Solved! Go to Solution.
2024-01-23 08:01 AM
Okay for those who would be asking, nean_datalog.bin and hsdata_log.bin have to be loaded into BOTH the board AND STWIN-V3MINI. Here is how I solved it :
- Load HSDatalog.bin AND nean_datalog.bin into the board using STM32CubeProgrammer : 1. Connect the USB cable to the board. 2. press the RESET button while keeping the USR button pressed 2. in STM32CubeProgrammer, connect to USB, then, in the tab "Memory & file editing", I downloaded HSDatalog.bin first, then neai_datalog.bin, that's all.. 3. Click "disconnect"
- Load HSDatalog.bin AND nean_datalog.bin into STWIN-V3MINI using STWINCubeProgrammer : 1. Connect STWIN-v3MINI to the board. 2. instead of connecting to "USB" in STM32CubeProgrammer, connect to "ST-LINK". Then process the same steps as before.
- After loading these two bin files, press the RESET button, disconnet and reconnect the USB cable.
- Keep STWIN-V3MINI connected to the board and your computer. In device manager, check that the virtual COM port appears (serial port is not needeed)
- In NanoEdgeAIStudio, when logging signals, choose the virtual COM port and click START, data should appear in the plot after few seconds (depending on the buffer size)
That's sad this piece of info is not in the docs.
2024-01-22 11:38 PM
Hi @anthonyADV ,
It seems you are using the wrong firmware.
You can try to look at the function pack here (for the steval stwinkt1b):
https://www.st.com/en/evaluation-tools/steval-stwinkt1b.html#tools-software
Also, you can directly use the Nanoedge datalogger tool. Doc: https://wiki.st.com/stm32mcu/wiki/AI:NanoEdge_AI_Studio#Datalogger
Here is the github with the source code:
Hope this helps!
2024-01-23 02:22 AM - edited 2024-01-23 04:30 AM
Hi, thanks @Federica Bossi,
It is not clear which function pack I should use. In the youtube tutorial NanoEdge AI Studio V3 - Anomaly Detection demo, it seems they're using HSDatalog (see below) :
So I restarted from scratch. On STM32CubeProgrammer, I erased all sectors, then I loaded HSDatalog.bin (from FP-SNS-DATALOG1) into the board and STWIN-V3MINI. The bin file path is "STM32CubeFunctionPack_DATALOG1_V1.5.1\Projects\STM32L4R9ZI-STWIN\Applications\HSDatalog\Binary\HSDatalog.bin", is that the correct bin file ?
Then I opened my project on Nanoedge AI. The configuration is the following : output data rate : 833Hz, 3 axes (accelerations), full scale : 16g.
So I used the datalogger tool on Nanoedge AI (same configuration as my project, 3 axes (accelerations), output data rate 833Hz, full scale 16 g), I downloaded the .zip file and loaded the bin file (neai_datalog.bin) into the board (using STM32CubeProgrammer). That is what is said in the Nanoedge Ai's doc :
Finally, i followed these instructions (found at https://wiki.st.com/stm32mcu/wiki/AI:How_to_create_a_multi-state_vibrations_classifier_using_NanoEdge_AI_studio#Start_Datalogging:(
At this step, it seems the board is in datalogging mode as orange LED blinks. But in device manager serial COM port (COM3) no longer appears, there's just the virtual COM port (COM4):
So it comes as no suprise that live datalogging in NanoEdge AI is still not working. Can I know which steps I should follow ? I suppose I did not program the board correctly but idk what is missing.
Many thanks,
Anthony
2024-01-23 08:01 AM
Okay for those who would be asking, nean_datalog.bin and hsdata_log.bin have to be loaded into BOTH the board AND STWIN-V3MINI. Here is how I solved it :
- Load HSDatalog.bin AND nean_datalog.bin into the board using STM32CubeProgrammer : 1. Connect the USB cable to the board. 2. press the RESET button while keeping the USR button pressed 2. in STM32CubeProgrammer, connect to USB, then, in the tab "Memory & file editing", I downloaded HSDatalog.bin first, then neai_datalog.bin, that's all.. 3. Click "disconnect"
- Load HSDatalog.bin AND nean_datalog.bin into STWIN-V3MINI using STWINCubeProgrammer : 1. Connect STWIN-v3MINI to the board. 2. instead of connecting to "USB" in STM32CubeProgrammer, connect to "ST-LINK". Then process the same steps as before.
- After loading these two bin files, press the RESET button, disconnet and reconnect the USB cable.
- Keep STWIN-V3MINI connected to the board and your computer. In device manager, check that the virtual COM port appears (serial port is not needeed)
- In NanoEdgeAIStudio, when logging signals, choose the virtual COM port and click START, data should appear in the plot after few seconds (depending on the buffer size)
That's sad this piece of info is not in the docs.