I am trying to port the simplefoc code related to STM32 from Arduinuo to Keil. Have you done similar work before?

Hey @loganlos , welcome to SimpleFOC!

I think there have been some similar attempts to port to STM32 HAL for use without Arduino framework.

It should not be too hard for someone familiar with their target environment. In the end a lot of the work will revolve around replacing the functions provided by Arduino framework, other than this the code should be fairly portable…