How to control AC supply servo in nucleo F746ZG

how to control AC supply servo IN nucleo F746ZG board ,
i was done electrical connection , i was run with Stepper i have this code,now i want increase the speed so i will go for pwm ,

Hello,

I suppose you have a stepper driver. So which one?
I do not know what is AC supply servo. AC tell me just “Alternating current”

BR, Jan

Stepper Driver DM542.
Alternating current servo, i want to control with pwm .

Usually is good to open datasheet and read something about the product - DM542T Full Datasheet Digital Stepper Driver 1.0-4.2A 20-50VDC for Nema 17, 23, 24 Stepper Motor - STEPPERONLINE)

According to datasheet (picture below) it seems you need a transistor between Mbed board and DM542. That is because DM542 needs 4-5V on PUL+ (Also DIR+) for high state and your board is able to produce just 3.3V

For the transistor you ned just PwmOut - API references and tutorials | Mbed OS 6 Documentation

BR, Jan

The input at DM542 is an optocoupler and there is a resistor for the current limit. When it does not work reliable with 3,3 Volts, you can change the resistor with a lower values.
The PWM makes only sense when the stepper motor should be driven with a fixed speed. Usually, you want to send a defined number of steps to the driver, and there you need a timer function. The Mbed Ticker can be used for this, but at higher frequencies it is not very efficient. Using a hardware timer is a better choice here, but that is not in the scope of Mbed API.

CAN you Suggestion which Driver Suitable for my Nucleo F746ZG,pls