Porting to STM32F302CCT6 with DRV8323R

I downloaded SImpleFOC and started porting code for STM32F302CCT6 connected to DRV8323R and 1kW BLDC in sensorless operation. Problem seem to be Arduino headers and dependencies. Not really needing Arduino code in this project as STM32F302CCT6 code has all of the hardware with 5MHz ADC, hardware PWM, Is there someone who has done this kind of porting work or attempted it to cleanly separate the Arduino code from FOC code? Even partial work to serve as a guide.

Thanks.

You do need arduino code, don’t you? You want to use SimpleFOC. That’s an arduino library.

So, to get things working… just install the support package for STM32 and select the ‘F302 processor.

Once you get things working like this, you’re in a much better position to port the code to “non-arduino” enviroment, if you really want to.

(Note that “arduino” used to refer to a hardware board with an AVR ATMEGA328 as the processor. Nowadays it more refers to “a software package able to support many different processors and boards, among others the original AVR processor stm32, NXP and Raspberry pi microcontrollers. )