Buck-Boost Controller Arduino Nano vs STM32
For your Buck Converter How much load regulation and line regulation you want?

For example, For 12V Output if you take 1% Regulation then you are allowing your output voltage to vary 1% from 12V during no load to full load.

Speaking about PWM Freuency usually, Buck Converter will range from 100KHz to even 4MHz.

However, using Digital Control it is not possible to go above 63kHz or 100kHz without High Resolution PWM. Hence, you should consider STM32F334R8 otherwise you may face stability issue in closed loop control.

Your switching loss is definately depends upon switching frequency but not only switching frequency, MOSFET parasitics are also plays important role. Based upon your mosfet you should choose 100kHz. to avoid high switching loss.

For calculation of inductance, you can use Power Stage Designer from Texas  Instrument