2016-04-20 09:24 AM
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 confusedthanks2016-04-20 07:50 PM
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)SusanPS: the only stupid questions are the ones you don't ask..... or ask twice!2016-04-21 03:59 AM
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 User Manual-Syrine-2023-10-06 06:21 AM
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.
2023-10-06 06:36 AM
I would hope not as they are by no means the same.
2023-10-06 11:27 AM - edited 2023-10-06 11:34 AM
@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).