cancel
Showing results for 
Search instead for 
Did you mean: 

AlgoBuild and MEMS1 for a custom board (B-L4S5I-IOT01A)

EAvina
Associate II

Hello,

I'm having trouble setting correctly AlgoBuild and MEMS1 in STM32CubeIDE, in order to use Algobuilder, Unicleo, and Unico to recover data via the accelerometer and create IA algos.

Here are my Algobuild and MEMS1 settings.

0693W000008zyObQAI.png0693W000008zyOgQAI.png0693W000008zyPKQAY.png0693W000008zyORQAY.png 

When I compile the project, there are some minor errors, that can be easily resolved by manually including the missing files.

Then, I copy the repertory where my project is, in Users\user\STMicroelectronics\AlgoBuilder\FirmwareTemplate so my firmware is recognized by AlgoBuilder.

0693W000008zyR6QAI.png0693W000008zyR1QAI.png 

Generating and compiling the Firmware gives no error, neither when I program the MCU. My main problem arrives when I try to use Unicleo, it tells me that it can't recognize any boards connected to my computer. I have checked the setting option to list all COM ports, but that doesn't resolve anything; I can now see the COM port where my board is, but when I select connect, the option to Start doesn't become available.

0693W000008zyUjQAI.png0693W000008zyUZQAY.png 

Does anyone have an idea where I made a mistake? Or if I'm missing a step somewhere?

Thank you in advance,

Best Regards.

Eli A.

1 ACCEPTED SOLUTION

Accepted Solutions

Hi Miroslav,

Thank you for your quick reply.

I finally did it work. I indeed put it on a high priority task, one that is called each 200 ms, but since AlgoBuilder uses the UART that I was using to send debug info to my computer, it didn't work. I think that they can't coexist since the resources must be available to be used by Unicleo that is why it couldn't recognize my "custom" board. But after commenting all my prints, it worked.

Another thing that I noticed is that when you include your firmware into the AlgoBuilder path

(C:\Users\user\STMicroelectronics\AlgoBuilder\FirmwareTemplate) with also a folder called METADATA (originating from the STM32CubeIDE build), AlgoBuilder will not rebuild your Firmware and take into account your design (.xml/algo_builder.c), it will still use the "design" (algo_builder.c) generated by the STM32CubeMX.

Thank you so much again for the help you gave me. I will continue now to recover data and process it on Unico, hoping that everything goes well.

If you need me to give you more details about how I make it work, let me know.

Have a nice day.

Eli A

View solution in original post

17 REPLIES 17
Eleon BORLINI
ST Employee

Hi Eli @EAvina​ ,

I checked with out experts, and they told me that the firmware generated by AlgoBuilder use the proper communication protocol so the Unicleo-GUI doesn’t need to know the board.

The problem could be in the so called firmware template generated in STM32CubeMX (using X-CUBE-ALGOBUILD and X-CUBE-MEMS1). Can you please share this firmware template for a check? Maybe some settings is not correct.

-Eleon

EAvina
Associate II

Hi Eleon @Eleon BORLINI​ 

Thank you for your reply. Here are the screenshots of the configurations that I use in CubeMX and the generated files as well. Please let me know if you need anything more.

 0693W00000AM58xQAD.png0693W00000AM58iQAD.pngEli A.

Hi,

thank you for sharing the files but I would need the complete directory or the ioc file to be able check your configuration.

Hi Miroslav,

Yes, here you have it.

Thank you.

Eli A.

Hi Eli,

I would propose following:

  • remove X-CUBE-AI components (at least temporarily)
  • check settings of peripherals required by X-CUBE-ALGOBUILD (you can check the UM2689)

0693W00000AMLKkQAP.png 

At first glance I see following problems:

  • I see the UART has wrong baud rate, missing DMA configuration
  • You should enable Capture Compare interrupt for TIM1 in NVIC

Hi Miroslav,

Indeed, I didn't have the same configurations as the example in file UM2689; I used the same settings but still no luck with Unicleo.

These are the changes that I made :

  • Added the DMA for the RX of the UART and adjusted the baud rate.
  • Enabled the following interruptions that I didn't have before:
    • EXTI Line [15:10] and EXTI Line [9:5].
    • TIM1 Capture and compare.
  • Changed the I2C's speed from normal to fast.
  • Disabled the X-CUBE-AI module

Do I need to see any changes in Algobuilder when I look for my Firmware and Target? Because all my sensors are Unknown.

Eli A.

Hi Eli,

the settings seems to be OK, but I still see the X-CUBE-AI in the project. Could you please remove it?

It is OK to see Unknown instead of the names of the sensors, this information is loaded from capabilities.xml file but so far the file must be added and modified manually.

Hi, Miroslav,

Sorry for the late reply.

I thought that I have it disabled, but here is the project without the AI module.

Thank you for the advice. But I'm not sure where the xml should be placed, and it has to have the same name as the template right?

Eli A.

Hi Eli,

would you please try the attached project?

I did some changes in your ioc file, I have removed the FreeRTOS and changes some function visibility settings.

At least the projects is compiled without any error but I don't the board you use next to me so I can not test it.

You can see also usage of capabilities.xml file.