Skip to main content
ANist
Associate III
January 25, 2019
Question

SensorTile and CubeMX integration

  • January 25, 2019
  • 4 replies
  • 1548 views

Hello, I've been learning and using CubeMX a lot for project generation. I work with VS code and compile via make through the generated makefile and it is going pretty good.

Now I have to work with the SensorTile and I really wish to use the cube configurator with it. Nevertheless I can't find the Tile among the selectable boards, is it possible to add CubeMX support for it?

Thanks

This topic has been closed for replies.

4 replies

Laurent Co
ST Employee
January 31, 2019

Hello Andrea,

The sensortile uses a 3 wire SPI interface. Its drivers can’t be configured and generated by CubeMX. That's why the board itself has not been integrated into CubeMX.

Regards,

Laurent

ANist
ANistAuthor
Associate III
January 31, 2019

Hello Laurent,

thanks for your reply. Since I am learning I would like to be able to create an empty project for the tile and then add what I need (I am trying to understand how configuration works in the example applications, what periherals need to be initialized and how).

So, the flow could be:

1) configure the project on CubeMX for the specific MCU --> set up the clock diagram, that's it I guess. Are there any other peripherals I may initialize from CubeMX? USB probably?

2) copy the sensortile firmware package inside my project that provides the BSP files

3) write a makefile for that (modify the generated one)

From here, I should have an empty and working project for the tile right?If I want to change some initialization code I can run CubeMX again, this is why I am trying to work in this way.

Sorry if my questions are very basic but I am still learning.

Regards,

Andrea

Laurent Co
ST Employee
January 31, 2019

Hello Andrea,

yes, you're right about your methodology. However as we are in a special case, you may be quicker to start from the evaluation kit than from CubeMX:

https://www.st.com/content/st_com/en/products/embedded-software/evaluation-tool-software/stsw-stlkt01.html

or other examples, called Function Packs : look for FP-AI-SENSING1 , FP-SNS-ALLMEMS1, FP-SNS-ALLMEMS2 on st.com.

Regards,

Laurent

ANist
ANistAuthor
Associate III
January 31, 2019

allright, well the idea of using CubeMX came from the fact that I am not expert and in this way I have a more visual feedback on configuration parameters, like clocks. On the other hand, within the code I find configuration more difficult and hard to spot.

In order to use those function pack one just includes them in a project right? How to "make" them board specific?

Laurent Co
ST Employee
January 31, 2019

Hello Andrea,

Ok, if you're used to CubeMX, please, use it to make a similar board that . Just take care about this specific driver: 3 wire SPI. You can find this specific driver into the FPs that i listed.

Regards,

Laurent

ANist
ANistAuthor
Associate III
July 29, 2019

Sorry for necroposting, I have a small question related. Is there a reason why this communication is implemented as a 3 wire instead of 4? What are the differences from performance and application design point of view?

Thanks a lot,

Andrea