简体   繁体   中英

How do I port STM32F3 code with SPL to STM32F7

fI have software running on the 72MHz STM32F303 with some real tight control loops and have come to realize that my loops aren't running fast enough. I need to port the code to the faster 216MHz STM32F765 but I'm finding that the F7 series doesn't support the F3's SPL, and only supports the newer HAL. There is a lower layer driver for HAL, but I'm trying to save months of re-coding my software if I can. Does anyone know of any way to port the code to the F7 that won't involve months of coding?

Seems like you are going to need to do some work. Indeed the SPL is dead and HAL seems for this use case very unsuitable as you are talking about tight control loops.

My suggestion is to switch to HAL and roll your own functions for controlling the peripherals you use. This allows you to still use typedefs such as UART_HandleTypeDef which ST maintains and works with the HAL for less performant things. This also allows you to quickly add something new and optimize later.

Also important: test your preconceptions , HAL could be slower as it is more generic and I personally wouldn't recommend it on the SPI peripheral. (I have seen the HAL take more time between transmissions than necessary. As in two thirds of the time on the line was pause instead of data.) BUT what is your requirement ? It could be that HAL suffices and if so then you should use it. If it doesn't suffice then implement a better more optimized version for your platform (F7) and test it against the HAL implementation.

I just received word from ST - there is an SPL to CUBE LL migration guide:

SPL2LL CONVERTER DOCUMENTATION

CONTENT TRANSLATIONS

There is apparently also an SPL to LL conversion tool:

SPL2LL CONVERTER

If anyone has used these, please comment on efficiency and ease of porting with these tools.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM