cancel
Showing results for 
Search instead for 
Did you mean: 

NanoEdge AI : not data is flowing when loading data from serial (USB)

anthonyADV
Associate II

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: 

anthonyADV_2-1705927092218.png

- 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) : 

anthonyADV_1-1705926873383.png

I have checked UART configuration and baud rate, parity, data bits, stop bits seem correct : 

anthonyADV_3-1705927330328.png

I also installed Tera Term to check if data is collected from COM3 and COM4 when clicking "Start/STOP"... it seems nothing is out.  

anthonyADV_4-1705928070791.png

 

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

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
anthonyADV
Associate II

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. 

 

 

View solution in original post

3 REPLIES 3
Federica Bossi
ST Employee

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:

GitHub - stm32-hotspot/stm32ai-nanoedge-datalogger: STM32 Application for datalogging feature with NanoEdge AI Studio

 

Hope this helps!

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, 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) :  

anthonyADV_5-1706006686892.png

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  : 

anthonyADV_2-1706003174963.png

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:( 

anthonyADV_4-1706004899708.png

 

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): 

anthonyADV_3-1706004390851.png

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  

 

anthonyADV
Associate II

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.