Hello, tell me why there is no standard library "STSW-STM32065" in plug-ins? Attempt to add the archive en.stm32f4_dsp_stdperiph_lib to the PaÑk installer did not lead to success. I understand that you can add the required files to the pens, but this is not always convenient.
then explain why the two identical blinking LED programs written in HAL and SPL differ in timing? when debugging HAL programs in asm mode, unreported transfers appear in the registers that take CPU time ... what is it? whence? how to fight? I actually do not care what to write, but often I have to go as far as the assembler in critical places in interrupts, and working with screens is generally a separate song especially when there is no possibility to use 8080 interface but only SPI ... and the conclusion is simple in practice SPL faster than HAL . I just drew attention to the fact that in one MK there are not in others ... like that it's not right that this standardization seems to be missing :)
If blinking LEDs is the core competency of your application, this comparison makes a valid benchmark. If not, guess what. Look at the peripherals today. Almost no need to poll any registers or anything that would require a high amount of register interaction frequently. The type of HAL structure is more and more a "don't care" with DMAs, FIFOs and autonomous peripherals. The quality, software architecture, test-ability and documentation are important unless you have unlimited time and money. And the well-known song of "I even need to program in assembler". Awesome. Do it. No HAL would stop you from that. Write magic numbers into registers, never have a line of comment with it. This will secure your job in the company, unless the project dies.
Your reasoning reminded me of the case: In the distant 1993, when I was training two programming teachers wrote a program for IBM 286 and a driver for a disk drive. There were 256 kilobytes of RAM. So these two teachers could not share the memory and one talked about expanding the memory in the computer and the second said that you need to write the program correctly! and everything will turn out ... Ultimately, two programs appeared on the market, one needed only 100 kilobytes of RAM and the second program needed 300 kilobytes of RAM, they performed the same functions, but the speed of execution was different. Everything always depends on the tasks that you or you have set. If you need to write quickly and not very expensive, then the program is written and then the microcontroller that pulls it out is selected ... and if you need fast and high-quality products for a specific microcontroller, then you'll excuse all possible tricks to go even in writing the code in the asm. For limitations of the type of microcontroller limits both in memory and in speed. And what about HAL then look at the code carefully! everywhere control where necessary and not necessary, everywhere the return of the state and much more that slows down the program. I do not mind HAL but on the tasks and means I choose.