Skip to main content
Terence D
Associate III
January 12, 2018
Solved

STM32 BSP Documentation?

  • January 12, 2018
  • 3 replies
  • 4299 views
Posted on January 12, 2018 at 03:14

I've just purchased an STM32F469 Discovery development board.  I've got the latest version of STM32Cube and able to build and run various examples on the board.  What I'm not finding is some decent documentation for the BSP drivers. 

There is of course the STM32469I-Discovery_BSP_User_Manual.chm located in Drivers\BSP\STM32469I-Discovery\ but this is pretty basic Doxygen documentation generated from the headers and not really a 'how to use' document.

Does any 'how to' document exist for the BSP drivers?  I would love a document that explains, for example, the basic initialization steps necessary to use the LCD screen on the board.  Just some basic explanations of how to initialize like 'first call BSP_LCD_Init(), then call BSP_LCD_LayerDefaultInit(), etc'.

Anyone know if a document like this exist?  Googling is turning up nothing.

#stm32 #lcd #stm32f469 #bsp
This topic has been closed for replies.
Best answer by Bogdan Golab
Posted on January 12, 2018 at 08:56

You are not the first one;) The problem is that ST does not generate code for the BSP using CubeMx so the examples provided for the BSP are diffucult to integrate with the new project (I guess it is your ultimate goal)

I prepared several CubeMX project file for a few disco boards e.g.

https://community.st.com/0D50X00009bMM6pSAG

 

And prepared a procedure how to handle BSP in Cube:

https://community.st.com/0D50X00009bMM6QSAW

 

3 replies

Bogdan Golab
Bogdan GolabBest answer
Lead
January 12, 2018
Posted on January 12, 2018 at 08:56

You are not the first one;) The problem is that ST does not generate code for the BSP using CubeMx so the examples provided for the BSP are diffucult to integrate with the new project (I guess it is your ultimate goal)

I prepared several CubeMX project file for a few disco boards e.g.

https://community.st.com/0D50X00009bMM6pSAG

 

And prepared a procedure how to handle BSP in Cube:

https://community.st.com/0D50X00009bMM6QSAW

 
Terence D
Terence DAuthor
Associate III
January 12, 2018
Posted on January 12, 2018 at 17:30

Bogdan - Thanks for the reply and helpful links.  So, I take it that it is largely correct to assume that people/firms are not using the BSP code in production (real world) software, right?  And are instead likely using the HAL or LL APIs?

Bogdan Golab
Lead
January 12, 2018
Posted on January 12, 2018 at 17:48

I am a hobbyist - LL drivers require more understanding of the underlying hardware. I am just switching to LL because I can save a lot of memory.

ST wants SPL (previous library, before HAL/LL era) users to switch to LL. They released special tool for this purpose. So I guess professionals will use LL in the future.

I guess professionals use own libraries closed to LL levels. HAL consumes to much resources (memory at least). Switching to LL is really useful if you want to understand what is going on under the hood - I am spending a lot of time on debugging when trying to use LL drivers because many times I do not know what driver to use.

But the real answer (what drivers are likely to be used by professionals) may come from real professionals like

Turvey.Clive.002

Pavel A.
January 12, 2018
Posted on January 12, 2018 at 20:40

I would love a document that explains, for example, the basic initialization steps necessary to use the LCD screen on

> the board.  Just some basic explanations of how to initialize like 'first call BSP_LCD_Init(), then

> call BSP_LCD_LayerDefaultInit(), etc'.

> Anyone know if a document like this exist? 

While it's not a document, a project 'skeleton' generated by CubeMX  contains the initialization code, in a workable order. Unfortunately this is not 100% intuitive, I had to make and throw away half dozen of Cube sketches before understood (hopefully) how to get a usable result.

For custom components like so called 'BSPs', you just look at the example projects and then drill into the sources.

As to the size of HAL code vs. LL: yes it is fatter, but not too much. It

 matters when you use a 32 KB limited teaser version of Keil. Most demo projects fit in this size. By the time you hit the limit, you need to learn enough to be able to kick the greedy guys out and switch to a truly free toolchain. Or give Keil or IAR the money

-- pa

idrissmc
Associate III
July 4, 2019

can someone helps me how to use the LCD on the STM32F413H-Disco, I want to display a message on it.

Have you got some suggestions please?

thanks

Terence D
Terence DAuthor
Associate III
July 4, 2019

I haven't done much with my STM32 boards lately. I did mess around with the STM32F429 some though and made a ball bounce around the screen. The code is on GitHub if interested: https://github.com/tmdarwen/STM32/tree/master/STM32F429/BouncingBall

I'm not 100% sure about this, but I'd think for displaying text you're going to need to either make an array of pixel positions for each letter of a font or find some that someone has already created or maybe an STM32 SDK has these already??? For example, I recently purchased this OLED display from Adafruit. Fortunately they have an open source lib for graphics that allows you to easily display text:

https://github.com/adafruit/Adafruit_SSD1306

https://github.com/adafruit/Adafruit-GFX-Library

Hope this helps at least a little.