Controlling servos with Nicla Vision

Hello, I was hoping to use up to 6 of the announced 12 PWM pins on the Nicla Vision board to drive servos as a function of the image processing. Plus I will also need to use the i2c interface. The pinout diagram for the board doesn't seem to mention the PWM pins, and the Servo library documentation mentions the Portenta H7 but not the Nicla, even if both use STM32H747. Can someone give me some guidelines on how to proceed? Thanks in advance.

While technically servos use a form of PWM, it is not the sort of PWM that we normally mean with an Arduino. That is the rectangular variable duty cycle type.

For a servo you need a one to two mS pulse every 250 mS or so. Therefore you can't drive a servo from a normal PWM pin, you need a servo library to generate these pulses.

If there isn't one for your processor you are out of luck unless you can write one yourself. This is not so easy as in involves a timed interrupt and the timer feature are different from processor to processor.

You can always add a hardware PWM chip to the I2C bus, search for examples of a PWM generating chip / board from Adafruit.

You can use a servo with the Nicla vision. It's as @Grumpy_Mike said, the servo library does not use PWM. Instead, it uses a timer.

You can select your board under Tools -> Board -> Arduino Mbed OS Nicla boards -> Nicla Vision. If you don't see the board go to the board manager to install it.
After this you can find the servo example under File -> Examples -> Servo (scroll all the way down) -> Sweep

Keep in mind that the pinout of the Nicla vision is not very straightforward. See the Pinout
SCLK is pin 9 or PE_12
CIPO is pin 10 or PE_13
COPI is pin 8 or PE_14
CS is pin 7 or PE_11
GIPO0 is pin 0 or PG_12
GPIO3 is pin 3 or PG_1