cancel
Showing results for 
Search instead for 
Did you mean: 

What is MSP for?

stanzanim
Associate III
Posted on April 20, 2016 at 18:24

This is a maybe stupid question but I cannot find a good (for me) explaination of how to use them. What the acronym is meant for?

I see in the docs

'The peripheral initialization is done through HAL_PPP_Init() while the hardware resourcesinitialization used by a peripheral (PPP) is performed during this initialization by callingMSP callback function HAL_PPP_MspInit().The MspInit callback performs the low level initialization related to the different additionalhardware resources: RCC, GPIO, NVIC and DMA. '

but I am still a bit confused

thanks
5 REPLIES 5
Mackay.Susan
Associate II
Posted on April 21, 2016 at 04:50

MCU Support Package

(Taken from ''Mastering STM32'' by Carmine Noviello; this is a 'Leanpub' book that is currently being written and available with updates as they are created)

Susan

PS: the only stupid questions are the ones you don't ask..... or ask twice!

Nesrine M_O
Lead II
Posted on April 21, 2016 at 12:59

Hi stanzani.marco,

•Peripheral system level initialization/ de-Initialization callbacks : HAL_PPP_MspInit() / _DeInit() : Ex: HAL_SPI_MspInit() Called from HAL_PPP_Init() API function to perform peripheral system level initialization (GPIOs, clock, DMA, interrupt)

•Initialization and de-initialization functions:HAL_PPP_Init(), HAL_PPP_DeInit():Ex: HAL_SPI_Init() this function initializes the peripheral and configures the low -level resources (clocks, GPIO, AF..)

•For more details about The HAL drivers layer please refer to the

http://www2.st.com/content/ccc/resource/technical/document/user_manual/2f/71/ba/b8/75/54/47/cf/DM00105879.pdf/files/DM00105879.pdf/jcr:content/translations/en.DM00105879.pdf

User Manual

-Syrine-

jerry_sandc
Associate III

I wondered the same.  MSP is "MCU Support Package", similar to BSP "Board Support Package".  I'm not sure if ST intended to replace BSP with MSP.

I would hope not as they are by no means the same.

Pavel A.
Evangelist III

@jerry_sandc "MCU support package" in this context is the "pinmux" layer responsible to configure pins, interrupt routing, clock and power sources of "devices". When a device driver initializes a device, it first makes a call to the "pinmux layer" to claim the needed pins and power the device up. For this it needs to know the pins and so on. In a "rich" OS like Linux this information is contained in the device tree. In bare metal STM32, the "pinmux" stuff is hardcoded in "msp" files or functions. (of course the bare metal BSPs contain the "msp" layer too).